i've been trying for a while now to make a particle system appear over my cegui windows,
at some point i got it to work just by setting the render queue group of the particles to 101,
Code: Select all
mPS->setRenderQueueGroup(101);at the moment my best guess is that OgreCEGUIRenderer is doing some state changes that prevent anything from being rendered properly after it.
from OgreCEGUIRenderer.cpp:
Code: Select all
void OgreCEGUIRenderer::initRenderStates(void)
{
using namespace Ogre;
// set-up matrices
d_render_sys->_setWorldMatrix(Matrix4::IDENTITY);
d_render_sys->_setViewMatrix(Matrix4::IDENTITY);
d_render_sys->_setProjectionMatrix(Matrix4::IDENTITY);
// initialise render settings
d_render_sys->setLightingEnabled(false);
d_render_sys->_setDepthBufferParams(false, false);
d_render_sys->_setCullingMode(CULL_NONE);
d_render_sys->_setFog(FOG_NONE);
d_render_sys->_setColourBufferWriteEnabled(true, true, true, true);
d_render_sys->unbindGpuProgram(GPT_FRAGMENT_PROGRAM);
d_render_sys->unbindGpuProgram(GPT_VERTEX_PROGRAM);
d_render_sys->setShadingType(SO_GOURAUD);
d_render_sys->_setPolygonMode(PM_SOLID);
// initialise texture settings
d_render_sys->_setTextureCoordCalculation(0, TEXCALC_NONE);
d_render_sys->_setTextureCoordSet(0, 0);
d_render_sys->_setTextureUnitFiltering(0, FO_LINEAR, FO_LINEAR, FO_POINT);
d_render_sys->_setTextureAddressingMode(0, d_uvwAddressMode);
d_render_sys->_setTextureMatrix(0, Matrix4::IDENTITY);
d_render_sys->_setAlphaRejectSettings(CMPF_ALWAYS_PASS, 0);
d_render_sys->_setTextureBlendMode(0, d_colourBlendMode);
d_render_sys->_setTextureBlendMode(0, d_alphaBlendMode);
d_render_sys->_disableTextureUnitsFrom(1);
// enable alpha blending
d_render_sys->_setSceneBlending(SBF_SOURCE_ALPHA, SBF_ONE_MINUS_SOURCE_ALPHA);
}(Before each time the UI is rendered)
i tried registering a RenderQueueListener and setting those states back after the RenderQueueGroup i used for the CEGUI ended but unfortunatly i had no luck there either. (I guess it is possible i didnt set the right ones, or used the right values, etc)
One more thing i found out is that i could only get the cegui to render on a queue that had other entities (or particles, whatever) set to it. (except if set to 100, RENDER_QUEUE_OVERLAY), this behaviour wasn't very clear to me but maybe it will be to someone else
Hopefully this is enough information for someone to try and help me out here
any help would be appriciated, thanks in advance