Skip to main content
GameDev.net gamedev.net
🔒 Locked

Rendering in a seperate thread?

Started by acid2 Sep 13, 2005 at 2:19 PM 1 replies 550+ views
Original Post
acid2
acid2
I just realised that this ties in with the multicore programming thread, but because I've got a specific question - I felt it would be best to start my own thread. What is the use/frequency of rendering in a seperate thread - and how possible is this? I've seen people playing world of warcraft, and at points - everything seems frozen, but the mouse and ui is still responsive. To me, this seems like a threading thing - is it? Any other feedback appriciated!
SOS
SOS
In general, threading is only good for really-really-really separated systems. Every interaction between threads causes them to "stop and talk" which is probably pretty bad for performance.

Now since your "game" system will most likely want to change the graphical world often (add/remove stuff, move stuff around, change graphics), there's little use for threading.

What threading IS useful for (and I suspect this is what happens in the examples you have) is loading game/level/whatever data and other such longer-lasting non-interactive functions.

Also know that, for example, DirectX already basically renders "in the background". (I'm not too sure whether it always does it or whether you have to toggle it somehow...)
davedx
davedx
The freezes in WoW are more likely to be related to some network critical code I'd imagine. I'm pretty sure WoW does stream in a lot of the terrain though, so that part's probably multithreaded...

As for DX, well, any graphics API that runs on modern hardware is naturally going to be parallel, since the rendering is done on the GPU. DX basically sends 'commands' via a buffer to the GPU, which does the actual rendering independent of whatever's running on the CPU.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.