I'm developing an overlay application for TS3 (http://ts3overlay.r-dev.de).
Basically the UI consists on two different windows which are shown all the time: The one where you can see relevant content of the TS3 server (channels, users, ...) and a small icon. There are also two windows, that are not always shown: A context menu, and a notification, that the overlay now accepts mouse input.
The overlay so far works in most games that use D3D8 or higher or OpenGL (so it's Windows only)
However, with one game, I ran into a strange problem when injecting the overlay.
The small logo is visible on the screen, however the window isn't.
The context menu itself also isn't showing.
If I move the mouse where I know the window should be, the cursor changes to the resize-cursor, so I know, the window IS there, it's just not being painted.
I experienced similar things in the past and I always messed up some rendering states, but in these cases I simply saw nothing. This case now is somewhat different.
This is the initialization of the logo, that is visible:
Code: Select all
CEGUI::ImagesetManager::getSingleton().createFromImageFile("ts3overlay_logo", "ts3overlay_logo.png", "imagesets");
logo = wmgr.createWindow("WindowsLook/StaticImage", "ts3overlay_logo");
logo->setProperty("FrameEnabled", "false");
logo->setProperty("BackgroundEnabled", "false");
logo->setProperty("Image", "set:logo image:full_image");
logo->setPosition(logo_pos);
logo->setSize(CEGUI::UVector2(cegui_absdim(16), cegui_absdim(16));
root->addChildWindow(logo);
as well as the hint window:
Code: Select all
warning_window = wmgr.createWindow("WindowsLook/StaticText");
warning_window->setEnabled(false);
warning_window->setText("Blah blah");
warning_window->setProperty("BackgroundColours", "tl:FF758BB2 tr:FF758BB2 bl:FFA7C7FF br:FFA7C7FF");
warning_window->setProperty("BackgroundEnabled", "true");
warning_window->setProperty("HorzFormatting", "HorzCentred");
warning_window->setAlwaysOnTop(true);
warning_window->setClippedByParent(false);
warning_window->setAlpha(1.0f);
warning_window->hide(); // window gets visible if Scroll-Lock is pressed
root->addChildWindow(warning_window);
While these two windows aren't visible:
Code: Select all
popup_menu = (CEGUI::PopupMenu*)wmgr.createWindow("WindowsLook/PopupMenu");
popup_menu->setInheritsAlpha(false);
popup_menu->setAlwaysOnTop(true);
CEGUI::MenuItem* item1 = (CEGUI::MenuItem*)wmgr.createWindow("WindowsLook/MenuItem");
item1->setText("Item1");
popupMenu->addChildWindow(item1);
and
Code: Select all
ts3_window = (CEGUI::FrameWindow*)wmgr.createWindow("TS3Overlay/FrameWindow");
ts3_window->setProperty("BackgroundColour", backgroundColour);
myRoot->addChildWindow(ts3_window);
ts3_window->setPosition(ts3_window_pos);
ts3_window->setSize(ts3_window_size);
ts3_window->setText("ts3overlay.r-dev.de");
ts3_window->setMouseInputPropagationEnabled(true);
ts3_window->getTitleBar()->setInheritsAlpha(false);
ts3_window->getCloseButton()->setInheritsAlpha(false);
The mentioned game uses D3D9:
Code: Select all
22/05/2011 15:58:44 (Std) ---- Version 0.7.5 (Build: Dec 20 2010 Static Microsoft Windows MSVC++ 10.0 32 bit) ----
22/05/2011 15:58:44 (Std) ---- Renderer module is: CEGUI::Direct3D9Renderer - Official Direct3D 9 based 2nd generation renderer module. ----
22/05/2011 15:58:44 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
22/05/2011 15:58:44 (Std) ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
22/05/2011 15:58:44 (Std) ---- Scripting module is: None ----
The CEGUI version is basically on 0.7.5 but is slightly modified to link all different renderer modules into one single DLL (important if you try to inject the DLL into a game that uses a CEGUI DLL of another version), a D3D8 Renderer, some speed improvements in the Tree widget, as well as the fix for ticket #445.
Before rendering, I try to put the D3D9Device into a reasonable state, and did an output of the rendering states after modifying those, just in case it helps (which I doubt) ^^
Code: Select all
22/05/2011 15:58:44 (Std) D3DRS_ZENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_FILLMODE 3
22/05/2011 15:58:44 (Std) D3DRS_SHADEMODE 2
22/05/2011 15:58:44 (Std) D3DRS_ZWRITEENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_ALPHATESTENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_LASTPIXEL 1
22/05/2011 15:58:44 (Std) D3DRS_SRCBLEND 5
22/05/2011 15:58:44 (Std) D3DRS_DESTBLEND 6
22/05/2011 15:58:44 (Std) D3DRS_CULLMODE 1
22/05/2011 15:58:44 (Std) D3DRS_ZFUNC 8
22/05/2011 15:58:44 (Std) D3DRS_ALPHAREF 0
22/05/2011 15:58:44 (Std) D3DRS_ALPHAFUNC 8
22/05/2011 15:58:44 (Std) D3DRS_DITHERENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_ALPHABLENDENABLE 1
22/05/2011 15:58:44 (Std) D3DRS_FOGENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_SPECULARENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_FOGCOLOR 0
22/05/2011 15:58:44 (Std) D3DRS_FOGTABLEMODE 0
22/05/2011 15:58:44 (Std) D3DRS_FOGSTART 0
22/05/2011 15:58:44 (Std) D3DRS_FOGEND 1065353216
22/05/2011 15:58:44 (Std) D3DRS_FOGDENSITY 1065353216
22/05/2011 15:58:44 (Std) D3DRS_RANGEFOGENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_STENCILENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_STENCILFAIL 1
22/05/2011 15:58:44 (Std) D3DRS_STENCILZFAIL 1
22/05/2011 15:58:44 (Std) D3DRS_STENCILPASS 1
22/05/2011 15:58:44 (Std) D3DRS_STENCILFUNC 8
22/05/2011 15:58:44 (Std) D3DRS_STENCILREF 0
22/05/2011 15:58:44 (Std) D3DRS_STENCILMASK 4294967295
22/05/2011 15:58:44 (Std) D3DRS_STENCILWRITEMASK 4294967295
22/05/2011 15:58:44 (Std) D3DRS_TEXTUREFACTOR 4294967295
22/05/2011 15:58:44 (Std) D3DRS_WRAP0 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP1 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP2 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP3 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP4 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP5 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP6 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP7 0
22/05/2011 15:58:44 (Std) D3DRS_CLIPPING 1
22/05/2011 15:58:44 (Std) D3DRS_LIGHTING 1
22/05/2011 15:58:44 (Std) D3DRS_AMBIENT 0
22/05/2011 15:58:44 (Std) D3DRS_FOGVERTEXMODE 0
22/05/2011 15:58:44 (Std) D3DRS_COLORVERTEX 0
22/05/2011 15:58:44 (Std) D3DRS_LOCALVIEWER 1
22/05/2011 15:58:44 (Std) D3DRS_NORMALIZENORMALS 0
22/05/2011 15:58:44 (Std) D3DRS_DIFFUSEMATERIALSOURCE 1
22/05/2011 15:58:44 (Std) D3DRS_SPECULARMATERIALSOURCE 2
22/05/2011 15:58:44 (Std) D3DRS_AMBIENTMATERIALSOURCE 0
22/05/2011 15:58:44 (Std) D3DRS_EMISSIVEMATERIALSOURCE 0
22/05/2011 15:58:44 (Std) D3DRS_VERTEXBLEND 0
22/05/2011 15:58:44 (Std) D3DRS_CLIPPLANEENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_POINTSIZE 1065353216
22/05/2011 15:58:44 (Std) D3DRS_POINTSIZE_MIN 1065353216
22/05/2011 15:58:44 (Std) D3DRS_POINTSPRITEENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_POINTSCALEENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_POINTSCALE_A 1065353216
22/05/2011 15:58:44 (Std) D3DRS_POINTSCALE_B 0
22/05/2011 15:58:44 (Std) D3DRS_POINTSCALE_C 0
22/05/2011 15:58:44 (Std) D3DRS_MULTISAMPLEANTIALIAS 1
22/05/2011 15:58:44 (Std) D3DRS_MULTISAMPLEMASK 4294967295
22/05/2011 15:58:44 (Std) D3DRS_PATCHEDGESTYLE 0
22/05/2011 15:58:44 (Std) D3DRS_DEBUGMONITORTOKEN 3131951870
22/05/2011 15:58:44 (Std) D3DRS_POINTSIZE_MAX 1174405120
22/05/2011 15:58:44 (Std) D3DRS_INDEXEDVERTEXBLENDENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_COLORWRITEENABLE 15
22/05/2011 15:58:44 (Std) D3DRS_TWEENFACTOR 0
22/05/2011 15:58:44 (Std) D3DRS_BLENDOP 1
22/05/2011 15:58:44 (Std) D3DRS_POSITIONDEGREE 3
22/05/2011 15:58:44 (Std) D3DRS_NORMALDEGREE 1
22/05/2011 15:58:44 (Std) D3DRS_SCISSORTESTENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_SLOPESCALEDEPTHBIAS 0
22/05/2011 15:58:44 (Std) D3DRS_ANTIALIASEDLINEENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_MINTESSELLATIONLEVEL 1065353216
22/05/2011 15:58:44 (Std) D3DRS_MAXTESSELLATIONLEVEL 1065353216
22/05/2011 15:58:44 (Std) D3DRS_ADAPTIVETESS_X 0
22/05/2011 15:58:44 (Std) D3DRS_ADAPTIVETESS_Y 0
22/05/2011 15:58:44 (Std) D3DRS_ADAPTIVETESS_Z 1065353216
22/05/2011 15:58:44 (Std) D3DRS_ADAPTIVETESS_W 0
22/05/2011 15:58:44 (Std) D3DRS_ENABLEADAPTIVETESSELLATION 0
22/05/2011 15:58:44 (Std) D3DRS_TWOSIDEDSTENCILMODE 0
22/05/2011 15:58:44 (Std) D3DRS_CCW_STENCILFAIL 1
22/05/2011 15:58:44 (Std) D3DRS_CCW_STENCILZFAIL 1
22/05/2011 15:58:44 (Std) D3DRS_CCW_STENCILPASS 1
22/05/2011 15:58:44 (Std) D3DRS_CCW_STENCILFUNC 8
22/05/2011 15:58:44 (Std) D3DRS_COLORWRITEENABLE1 15
22/05/2011 15:58:44 (Std) D3DRS_COLORWRITEENABLE2 15
22/05/2011 15:58:44 (Std) D3DRS_COLORWRITEENABLE3 15
22/05/2011 15:58:44 (Std) D3DRS_BLENDFACTOR 0
22/05/2011 15:58:44 (Std) D3DRS_SRGBWRITEENABLE 0
22/05/2011 15:58:44 (Std) D3DRS_DEPTHBIAS 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP8 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP9 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP10 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP11 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP12 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP13 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP14 0
22/05/2011 15:58:44 (Std) D3DRS_WRAP15 0
22/05/2011 15:58:44 (Std) D3DRS_SEPARATEALPHABLENDENABLE 1
22/05/2011 15:58:44 (Std) D3DRS_SRCBLENDALPHA 2
22/05/2011 15:58:44 (Std) D3DRS_DESTBLENDALPHA 6
22/05/2011 15:58:44 (Std) D3DRS_BLENDOPALPHA 1
22/05/2011 15:58:44 (Std) D3DSAMP_ADDRESSU 1
22/05/2011 15:58:44 (Std) D3DSAMP_ADDRESSV 1
22/05/2011 15:58:44 (Std) D3DSAMP_ADDRESSW 3
22/05/2011 15:58:44 (Std) D3DSAMP_BORDERCOLOR 0
22/05/2011 15:58:44 (Std) D3DSAMP_MAGFILTER 1
22/05/2011 15:58:44 (Std) D3DSAMP_MINFILTER 1
22/05/2011 15:58:44 (Std) D3DSAMP_MIPFILTER 0
22/05/2011 15:58:44 (Std) D3DSAMP_MIPMAPLODBIAS 0
22/05/2011 15:58:44 (Std) D3DSAMP_MAXMIPLEVEL 0
22/05/2011 15:58:44 (Std) D3DSAMP_MAXANISOTROPY 1
22/05/2011 15:58:44 (Std) D3DSAMP_SRGBTEXTURE 0
22/05/2011 15:58:44 (Std) D3DSAMP_ELEMENTINDEX 0
22/05/2011 15:58:44 (Std) D3DSAMP_DMAPOFFSET 0
I already checked with PixWin, if they did some weird stuff, but couldn't find anything.
Does anyone have some ideas?