|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Rendering threads in DirectX games?
Hi Atool I am not at the moment using DirectX but as windows development goes, it is more efficeint to do all screen operation in the main thread, because I think window will need a message handler for the thread that is doing screen operation, so to prevent the second, third and so on threads, for using this extra memory and extra proccessing time used by window to handle message loops it will be better to handle all direct screen operation by the main loop, allowing the other threads (workers) to do all the organizing. I hope this will help a bit. Force --- Atool Varma <varmaa@kenyon.edu> wrote: > Hail again, > > Thanks for the replies to my past emails. Does > anyone know if > many commercial games use separate threads to render > the image to the > screen? E.G., a game logic thread could compute AI > and take input from > the user and when it has to blit, it could just tell > the rendering thread > to blit and immediately continue to do game logic, > saving any time wasted > from waiting for the surfaces to become unlocked, or > waiting for a > vertical blank, or some other latency issue. The > rendering thread would > then take its own time to blit everything the game > logic thread gave it to > the screen; it could have a queue of the graphical > operations to do, and > execute them as fast as it could, waiting through > the vblanks and > whatnot... That way if the OS balanced the two > threads well, the game > could go fast and not have to worry so much about > slowdown from waiting > for those surfaces to get unlocked or for hardware > blits to finish, since > it could easily do AI or something while the > rendering thread did > all the blitting. > > I guess the main bottleneck here depends on how well > the system balances > the threads. But if it balanced them well, do you > think this would > potentially improve the speed of the game? Do any > commercial games > currently use this technique? > > Atul > > ================================================================= > The GameProgrammer.Com mailing list is for the open > discussion > of any topic related to the art, science, and > business of > programming games. This list is especially tolerant > of beginners. > We were all beginners once > > To SUBSCRIBE or UNSUBSCRIBE please visit: > http://gameprogrammer.com/mailinglist.html > ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com ================================================================= The GameProgrammer.Com mailing list is for the open discussion of any topic related to the art, science, and business of programming games. This list is especially tolerant of beginners. We were all beginners once To SUBSCRIBE or UNSUBSCRIBE please visit: http://gameprogrammer.com/mailinglist.html
|
|