Archived

This topic is now archived and is closed to further replies.

d9930380

Gui on top of a rendered scene

Recommended Posts

I want to Render a GUI (Windows, Edit Boxes, Scrollbars )ontop of my scene using Direct3D 8. Should I have the GUI module as a separate thread. With it''s own message loop etc. Just the "Mouse Pointer" as a separate thread. (Does anyone have any info about "Hardware Accelerated Mouse". I seem to remember reading something about that when DX 8 first came out but now I can''t find any more info). or neither. Also as these "Windows" will all have to be drawn using Direct3D how should I update the GUI (I guess, after every time I draw the scene). How will that be done if the GUI or mouse is running as a separate thread. Any ideas from experience would be great. Thanks

Share this post


Link to post
Share on other sites
The graphical part of the GUI can be separate from the actual device side of the GUI. In that case, you could do whatever you want (with the input) in terms of threading, etc.

This is how I do the rendering side of it:

SwitchTo3DMode()
Render3DScene()
SwitchTo2DOrthoMode()
Render2DGUI() <- this could take into account data that''s been updated in the other thread if you do go multithreaded.

Share this post


Link to post
Share on other sites
That is what I thought.

But that also means the GUI "Render" is only updated at the FPS of the scene, This is probably OK for most Windows/Controls but it could result in a "jerky" mouse.

Is this just an accepted problem with no fix or I''m I missing something ( maybe that "Hardware Accellerated Mouse" I remember reading about ).

Share this post


Link to post
Share on other sites