Jump to content
  • Advertisement
Sign in to follow this  
discman1028

very strange multiple viewports problem

This topic is 4522 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 wrote a demo yesterday to create multiple viewports. All went well, and I had the same scene rendered to the center of each viewport, from different camera angles. A screen shot can be seen here: http://users.wpi.edu/~wap/CS_MQP/weeks/week_2.htm The next morning, I didn't TOUCH the code, and I was getting different behavior. Both scenes were overlapping in the middle of the window instead of the center of each viewport!! The source code is a link near the bottom of the page, as well as an executable, to see the problem. It's very strange! I can't figure out how to fix it. Thanks for any insight

Share this post


Link to post
Share on other sites
Advertisement
Sounds like you haven't set all your device states and that the only reason it was sorking before was because something you ran before your application setup the device states that you didn't.

Hope that helps. Greg

Share this post


Link to post
Share on other sites
Okay, thanks, I'll check, and do comparisons with other source.

Could you run the executable and see if maybe it looks okay for you? I swear I didn't change any source code overnight, but I may be going crazy. :)

Share this post


Link to post
Share on other sites
You have turned on the debug runtime right?

The Z values for a viewport need between 0 and 1. You use -1 as MinZ. The debug Runtime checks this and will not set the new viewport. The release runtime doesn’t do this checks and it will work even with the wrong values because the driver is more tolerant then the debug runtime.

Share this post


Link to post
Share on other sites
I don’t talk about the debug build from the compiler. The DirectX SDK install an additional Direct3D debug Runtime and a control panel program that allow you to switch between the debug and release runtime. It will add an additional option page to Visual Studio, too. If you enable this debug runtime it will do additional checks at runtime.

Share this post


Link to post
Share on other sites
Yeh, I believe I have DX debug mode always turned on (set from the Windows Control Panel). Though, I have not seen the "additional options" page.

Share this post


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