Jump to content
  • Advertisement
Sign in to follow this  
quaker

OpenGL Is it a bug or misunderstanding?

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

Hello, I'm trying to reset the viewport when the window is resized. however it does not seem working as expected as it does using OpenGL. When not resetting it manually using the SetViewport function the D3D resets it automatically but by scaling the rendered image from the original viewport (eindow size at start-up). Could this be a bug inthe DirectX 9c SDK? Or there's some trick around I missed. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
When you resize the window the backbuffer is still the same size and the viewport is used to render to the backbuffer. If the front buffer is a different size than the back buffer (such as when you resize the window) it's blit-scaled to the front buffer.

I think what you want to do is reset the device to change the backbuffer size when the window resizes.

Share this post


Link to post
Share on other sites
Then it will be more expensive doing it the right way than using OpenGL. What's exactly the functionality of SetViewport then? If I need to change buffer sizes each time the window resized?????????????

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Then Direct3D is either buggy and 50% of its functionality is not working properly, or the design is crappy.

Share this post


Link to post
Share on other sites
Quote:
Original post by quaker
Then it will be more expensive doing it the right way than using OpenGL.

OpenGL and Direct3D do similar things, but they are different API's. It's difficult (if a little pointless) to come up with an architectural comparison.

Quote:
Original post by quaker
What's exactly the functionality of SetViewport then? If I need to change buffer sizes each time the window resized?????????????

the Viewport is defined within your render target. I've used it a number of times to "clip" 3D rendering to a specific portion of the GUI. For example, having a 3D rendered image surrounded by a number of controls/displays etc..

Window resizing should be a fairly rare occurence - why are you so worried about it?

Quote:
Then Direct3D is either buggy and 50% of its functionality is not working properly, or the design is crappy.

[rolleyes] If you want to troll, then please take it somewhere else.

On the other hand, if you wish to partake in a constructive and intelligent debate on such things feel free to hang around [smile]

Jack

Share this post


Link to post
Share on other sites
First I'm asking a highky technical question. And it really matter to my appliaction if the window is resized. If Direct3D can do it simply say tell the answer otherwise keep ur comments for u.

Share this post


Link to post
Share on other sites
Your question was already answered. When the window is resized, Reset the device. You use the Reset method on the device giving it a Present Parameters matching your new requirements.

The Forum FAQ has a number of good resources and tutorials if you need more information.

Share this post


Link to post
Share on other sites
Ok but why is it different tha OpenGL inner working? Why is it necessary to reset the device with new parameters just to refelect the new viewport? I think the SDK is not well documented to cover all trickies.
Then it's more expensive to use the Direct3D than OpenGL, it's not a flame though. I want to say if Dirct3D complicates things and "invent" it's own hiddne pipe-line which has no origin in the HW then it's pointless to use it unless we want the sioftware to be exclusively Windows XP or Vista.

Share this post


Link to post
Share on other sites
I think you'll find the difference between them is not that you have to do some expensive reset operation for d3d and not for opengl, the difference is simply that, by default, d3d stretches it. So you have to tell it to resize the buffer, which opengl always does. Not that I know much about directx, I use opengl myself.

And a word of advice: Be nice to people who are helping you. Some very knowledgable people have been quite tolerant, and once you piss them off you only get posters like me (if your lucky).

EDIT: Thought better of the joke

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Then Direct3D is either buggy and 50% of its functionality is not working properly, or the design is crappy.

For the record: the anonymous wimp who posted this flame is quaker, the original poster.

Share this post


Link to post
Share on other sites

This topic is 4612 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.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • 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!