DirectX 9 renderer in an injected overlay not rendering correctly

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

raptorfactor
Just popping in
Just popping in
Posts: 4
Joined: Wed Nov 18, 2015 13:13

DirectX 9 renderer in an injected overlay not rendering correctly

Postby raptorfactor » Wed Nov 18, 2015 13:40

I'm currently writing an overlay for games (similar to Steam, Overwolf, etc.), and am trying to port my current code-base to use CEGUI (in the past I had used GWEN and AntTweakBar, but both have pretty fundamental design problems which limit their usefulness to my application). However, I've run into a problem where under the DirectX 9 renderer (the only one I've tried so far) I'm getting incorrect rendering on some games. I looked around in the CEGUI code to obvious things missing from beginRendering() and couldn't spot anything, but that being said I'm not an expert by any means.

Here's a couple of screenshots showcasing the problem I'm having (one working, one broken):
http://imgur.com/a/ebMFz

I'm using the code from here in order to get that:
http://cegui.org.uk/wiki/CEGUI_In_Pract ... me_Console

Relevant part of CEGUI log:
19/11/2015 00:35:46 (Std) ---- Version: 0.8.4 (Build: Nov 18 2015 Debug Microsoft Windows MSVC++ Great Scott! 32 bit) ----
19/11/2015 00:35:46 (Std) ---- Renderer module is: CEGUI::Direct3D9Renderer - Official Direct3D 9 based 2nd generation renderer module. ----
19/11/2015 00:35:46 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
19/11/2015 00:35:46 (Std) ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
19/11/2015 00:35:46 (Std) ---- Scripting module is: None ----


The other libraries I have render just fine in the game that CEGUI is not working correctly on (CSGO).

Does CEGUI expect the device to be in any particular state before rendering is attempted? Right now I just have a state block that captures before rendering and reapplies afterwards so I don't interfere with the game, I don't do any device state modifications other than what CEGUI itself is doing.

raptorfactor
Just popping in
Just popping in
Posts: 4
Joined: Wed Nov 18, 2015 13:13

Re: DirectX 9 renderer in an injected overlay not rendering correctly

Postby raptorfactor » Wed Nov 18, 2015 13:56

Fixed it. Turns out I wasn't careful enough with my checking of the beginRendering function. There were a few differences between CEGUI and other libs, but this is the important one for CSGO:
device->SetRenderState(D3DRS_COLORWRITEENABLE, 0x0000000F);

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: DirectX 9 renderer in an injected overlay not rendering correctly

Postby Ident » Wed Nov 18, 2015 19:25

Keep us updated on your project, if it is presentable you are allowed to advertise it on the User Project page with screenshots and description ;)
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests