Probably a Simple D3DX Question...

Started by
6 comments, last by Evil Bill 21 years, 4 months ago
Hey, i'm trying to create a 3D desktop program, and so i need it to start up fullscreen. Does anyone know how to do this using the D3DX framework (as in creating a new project with "DirectX AppWizard"). Setting m_bWindowed to FALSE in the constructor doesn't work. Its bound to be something obvious, isn't it? Edit: Forgot to say, its DX8 under Windows 98 SE (if it matters) [edited by - Evil Bill on December 3, 2002 10:59:26 AM]
Member of the Unban Mindwipe Society (UMWS)
Advertisement
Search the gamedev.net archives for ''Introduction to Direct Graphics''...
Search isn''t working, and ive seen that page before. I''ve been programming with D3D for quite a while, just ive never used D3DX or the framework.

Thanks for the reply anyway,

Member of the Unban Mindwipe Society (UMWS)
the only simple way i''ve found how to do it so far is to put the following in my classes FrameMove function:
static firstTime = true;if( firstTime ) {    firstTime = false;    SendMessage(m_hWnd, WM_COMMAND, IDM_TOGGLEFULLSCREEN, 0);} 

it''s really sucky, but it works for now.

i tried modifying the CD3DApplication functions but that code was written by a masochistic SOB. there''s hardcoded assumptions all over the friggin'' place.

i also had to modify the CD3DApplication::BuildDeviceList code that sets the default fullscreen width/height/color depth. do a search for "640x480" and you''ll find it.

HTH.
Yeah, i noticed in Create(), that it assumes it''ll be going straight into windowed mode. Ah well, i''ll play about with it and see what i can come up with.



Member of the Unban Mindwipe Society (UMWS)
If you are using the class that is generated by the DirectX AppWizard you only have to modify the constructor of the generated class that extends CD3DApplication. Just set m_dwCreationWidth, and m_dwCreationHeight to be the maximum displayable height and width. You of course will have to determine this value.

Note that if you change these values in your code you will not get the desired results immediately if you have already compiled and run the application. The reason being the class generated by the AppWizard has two methods "ReadSettings()" and "WriteSettings()", that read and write to the Registry. So even if you change the creation height and width they will be overriden by the subsquent call to "ReadSettings()" which will load the old window dimensions. To get around this make the changes to the constructor as mentioned before, then comment out the "ReadSettings()" method in your constructor, compile and run the app, close it, uncomment the "ReadSettings()" method and recompile and run. That should do it.
Tried that, but it still won''t run in fullscreen because the CD3DApplication::Create() method assumes its windowed mode. I''ve been playing aaround with it, and i''m getting somwhere tho.

Member of the Unban Mindwipe Society (UMWS)
Allow me to propose something quite different:

http://www.mvps.org/directx/articles/simpledx8frame.htm

This guy wrote the smallest, most elegant starter app for DirectX I''ve ever seen. Admiteddly, it isn''t the framework, but you can at least learn what code needs to run in what order.

Hope this helps.

=^.^= Leaders and teachers should remember: It is best to offer others what they Need, not what they Want.
=^.^= Leaders and teachers should remember: It is best to offer others what they Need, not what they Want.

This topic is closed to new replies.

Advertisement