Jump to content
  • Advertisement
Sign in to follow this  
GuyWithBeard

Multiple calles to BeginScene/EndScene [SlimDX]

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

Hi! I am currently working on adding multi viewport support to my engine written in C# using SlimDX. I found the following line in the DX documentation at MSDN: "There should be at most one IDirect3DDevice9::BeginScene/IDirect3DDevice9::EndScene pair between any successive calls to present..." http://msdn2.microsoft.com/en-us/library/bb174375(VS.85).aspx Currently I work out the order of the viewports and their attached cameras, render all the viewports in their own BeginScene/EndScene-pairs and then call Present once. This seems to work, but the line above made me think that this might not be okay... Does anyone know if this is okay? Thanks! //chinc

Share this post


Link to post
Share on other sites
Advertisement
Hmm...

Okay, I apparently can call BeginScene once, then set the Viewport of the device multiple times and draw the objects in between, then call EndScene once and finally call Present. This is the correct way to do it, right?

Share this post


Link to post
Share on other sites
Quote:
Original post by chinc
Hmm...

Okay, I apparently can call BeginScene once, then set the Viewport of the device multiple times and draw the objects in between, then call EndScene once and finally call Present. This is the correct way to do it, right?


Yes that's fine.

Share this post


Link to post
Share on other sites
One last thing...

Can I call Clear on all the viewports between the calls to BeginScene and EndScene? I searched the net for info about this but did not find anything. All books/pages/tutorials tell me to call Clear before BeginScene. They do not say that it would be wrong to call Clear AFTER BeginScene, but nobody seems to do it.

This okay?

//chinc

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!