• GWEN/d3d separate device overlay questions
    2 replies, posted
I'm trying to use the GWEN gui library to design a little toolkit I can use to overlay settings into any window without having conflicts with existing devices. I'm reading and trying to figure this out myself, but I figured maybe somebody here knows. [img]http://puu.sh/2Bnid[/img] [img]http://puu.sh/2BnMI[/img] Basically I'm creating another D3DDevice and using it to render right on top of the existing content (I'm assuring that the devices are synced in their calls to prevent flicker). I have a few questions about this though. Firstly, how do I get the thing to stop rendering a giant black canvas over everything, or at least only render the part of the window that has a gui element on it? I've been trying to figure this out to no avail. Secondly, and this seems like a no-brainier now that I'm writing it, but since I'm just creating another device to overlay the existing, should I just use direct2d? In the mean time I'll be running through some directx tutorials so I can better educate myself.
I was always under the impression people hooked the existing D3DDevice, and didn't create a new one on top of the existing content... presumably due to this issue and other screenspace problems.
[QUOTE=acpm;40305901]I was always under the impression people hooked the existing D3DDevice, and didn't create a new one on top of the existing content... presumably due to this issue and other screenspace problems.[/QUOTE] Yes, I have intercepted the class instance pointer for the existing D3D virtual table in order to sync the rendering. I was mainly trying to avoid the vastly differing rendering settings in different games, as this can create per-instance problems that can presumably be avoided by just rending on your own device: The example being rendering to notepad, or any window with a different renderer. Rather than having to write a dozen different versions for all the different renderers I can merely make sure the rendering is synced and use a single unified renderer for the gui.
Sorry, you need to Log In to post a reply to this thread.