Sign in to follow this  
PasalicZaharije

Separate thread for rendering

Recommended Posts

Is there any drawback to make separeta thread just for rendering (mostly for "linear-DOS" programming). I write code so that all global varables is used only by render thread? Thanks, Zaharije Pasalic

Share this post


Link to post
Share on other sites
Mattman    336
Well does the rendering thread also include the buffer flipping? If not, there's a chance that the backbuffer could be flipped to the screen in the middle of a scene rendering, making everything partially drawn to the user.

Share this post


Link to post
Share on other sites
Yes. Everything is in one thread "from Clear to Present". I used threading just to avoid message-pump and to migrate to old-dos-linear style of programming.

I am interested is there any performance penality?

Thanks,
Zaharije Pasalic

Share this post


Link to post
Share on other sites
Mattman    336
I've never tried this before...so I can't answer your question, sorry :-P If you do your coding right, I can't imagine that it would be very difficult to test the differences between linear and threaded to see what works best for your game.

Share this post


Link to post
Share on other sites

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