March 28, 2024, 06:00:32 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


How to tell size of windowed Direct 3D screen when resized?

Started by RG, July 26, 2009, 02:04:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RG

This is probably obvious but I can't figure it out. I've created a Direct 3D screen as a child of the main window using this command:

screen.CreateWindowed(4,380,500,380,@size|@noautodraw,"3D View",winmain,true)

I render the 3D mesh to this screen and it looks fine. I expand the window labeled "3D View" and the 3D mesh expands with it, but is now pixelated. From the help manual, it looks like I should use the command: screen.Reset(w,h,bPP,bFullScreen) to set the Direct 3D screen to match the new "3D View" window size.

But how do I get the new "3D View" window size? I would use GETSIZE windowname, l, t, w, h but there's no obvious name for the Direct 3D screen window other than "screen". I could create an intermediate window (screen is child of winintermediate is child of winmain) and resize when winintermediate is changed, but I thought there might be a more direct way to tell when the "3D View" window was changed.

Hope this is clear. Thanks for any help, Rich

(The program Vasemaker is an example of code using this: http://www.ionicwind.com/forums/index.php/topic,2000.0.html

Ionic Wind Support Team

Rich,
the member variable m_win is the window the 3D screen is created in.

So it would be GetSize screen.m_win, ......

Paul.
Ionic Wind Support Team

RG