Sign in to follow this  

Multiple Rendering Contexts + Performance

This topic is 4852 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 am in the process of writing a simple animation editor that I have set up with two different windows on a dialog box. I create a device context and rendering context for each window. Right now I switch between windows every other frame, and get 60 fps (with vsync on). If I try to SwapBuffers() after drawing each window, the framerate drops to 30fps (still with vsync on). I'm wondering if the problem is with having two separate rendering contexts. If anyone has any ideas, they would be greatly appreciated. Thanks!

Share this post


Link to post
Share on other sites
its not really a problem as such, the system will just wait for a refresh before fliping the screen/context, so if your refresh rate was 60hz then swapping one window would give you a refresh of 60fps, but swapping two would drop it to 30fps coz you'd ahve to wait for two refresh for both to swap.

You could try playing with the swap interval extension, set it to 0 for the first window and then 1 before swapping the 2nd. I've not tried it myself, infact i wish i'd thought of it a few months back when i was testing out a duel rendering interface i was working on, hehe, but if the extension works how I think it does, it should help.

edit: after a quick search and afew mins of thinking i was going crazy I finaly found that WGL_EXT_swap_control is the extension you want

[Edited by - _the_phantom_ on August 27, 2004 11:09:50 PM]

Share this post


Link to post
Share on other sites

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