Jump to content
  • Advertisement

Archived

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

31337

DirectX Resizeing?

This topic is 5473 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

I''m currently writing some windowing code that will run for with both DirectX and OpenGL. I have a problem though and that''s with resizeing. It seems as though DirectX just magically resizes its windows on its own, because I am looking at the Directx9 SDK tutorial on matrices and I can''t see a single line of code dedicated to window resizeing. In OpenGL when the window is resized you must set the viewport, load the identity matrix, and all that good stuff. Is this nessecary in D3D? NeXe doesn''t have resize code, yet NeHe does. What do I do?

Share this post


Link to post
Share on other sites
Advertisement
D3D will automatically scale the buffer to the size of the output window, but this is often slow, and can distort the output. It is usually better to create a resize handler that Reset()''s the device with the new size. Don''t forget that you must release all objects in the DEFAULT pool before calling Reset(), or else it will fail.

Share this post


Link to post
Share on other sites
Can''t I just use SetViewport and then set all the matrices except the view one to the identity matrix?

What is the equivalent command to gluPerspective?

Share this post


Link to post
Share on other sites
I took your advice and used the Reset method, yet for some reason my OpenGL window will resize yet my DirectX window will not. Any suggestions?

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!