Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Evil Bill

Probably a Simple D3DX Question...

This topic is 5829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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,

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.



Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!