Sign in to follow this  

Multiple calles to BeginScene/EndScene [SlimDX]

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this