Hello there,
I am happily using the gui system (with Ogre) for some days now and stumbled upon an issue:
Whenever I use a material with alpha blending enabled and an object using this material is visible, all GUI elements suddenly disappear. They reappear when the object using the respective material is culled...
I am a bit puzzled by that behaviour. All gui elements have an alpha setting of 1.0.
I am using the dotsceneoctree scene manager, i don't know if the behaviour can be related to that.
Any idea greatly appreciated.
Injector
GUI disappearing when using alpha blending
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
GUI disappearing when using alpha blending
It must be missing state setting in the Ogre GUI renderer object I'll see if I can identify which setting is being missed and add it in (could be alpha testing or something silly like that).
I'll post back here when I've fixed it in CVS (may not be before Sunday). Thanks for the report
CE.
I'll post back here when I've fixed it in CVS (may not be before Sunday). Thanks for the report
CE.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
GUI disappearing when using alpha blending
Hi,
I will be looking at this tomorrow - sorry for the delay
I don't suppose you could put together a minimal demo that demonstrates the issue (so that I can test it and know when I've fixed the problem)?
If not don't worry too much, but the fix may take a little longer (as I'll need to find a way to reproduce the problem first!).
Thanks,
CE.
I will be looking at this tomorrow - sorry for the delay
I don't suppose you could put together a minimal demo that demonstrates the issue (so that I can test it and know when I've fixed the problem)?
If not don't worry too much, but the fix may take a little longer (as I'll need to find a way to reproduce the problem first!).
Thanks,
CE.
GUI disappearing when using alpha blending
Thanks for the reply.
I will try to compile a little demo later today.
Stay tuned.
I will try to compile a little demo later today.
Stay tuned.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
GUI disappearing when using alpha blending
Thanks, that will be an enourmous help
GUI disappearing when using alpha blending
Ok, I modified the CameraTrack demo to include a simple message box (from one of your demos).
There are three files (case sensitive).
http://www.deck13.com/Ogre.material
http://www.deck13.com/CameraTrack.rar
http://www.deck13.com/Release.rar
I added the line "scene_blend alpha_blend" to the earrings material within Ogre.material. CameraTrack.rar contains the source code, Release.rar the binaries which are supposed to go in the common Ogre directory "Samples/Common/bin/Release" to make sure the app finds all materials, textures, etc. (Don't forget to put your Layout.tga in a place where Ogre can find it ). I updated Ogre and CEGUI from CVS this morning.
I hope rar's are ok for you and that this demo helps you finding the problem. If I have missed anything, let me know.
Thank you very much.
There are three files (case sensitive).
http://www.deck13.com/Ogre.material
http://www.deck13.com/CameraTrack.rar
http://www.deck13.com/Release.rar
I added the line "scene_blend alpha_blend" to the earrings material within Ogre.material. CameraTrack.rar contains the source code, Release.rar the binaries which are supposed to go in the common Ogre directory "Samples/Common/bin/Release" to make sure the app finds all materials, textures, etc. (Don't forget to put your Layout.tga in a place where Ogre can find it ). I updated Ogre and CEGUI from CVS this morning.
I hope rar's are ok for you and that this demo helps you finding the problem. If I have missed anything, let me know.
Thank you very much.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
GUI disappearing when using alpha blending
Yep rar files are fine.
Thanks for doing this - definately a problem somewhere With any luck I'll have a solution in CVS tomorrow.
Thanks for doing this - definately a problem somewhere With any luck I'll have a solution in CVS tomorrow.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
GUI disappearing when using alpha blending
This issue is now fixed. Thanks for reporting this, and for the demo - it was a great help
CVS has a 5 hour sync time for anonymous access, in the mean time see the patch below.
CE.
CVS has a 5 hour sync time for anonymous access, in the mean time see the patch below.
CE.
Code: Select all
Index: src/renderers/OgreGUIRenderer/ogrerenderer.cpp
===================================================================
RCS file: /cvsroot/crayzedsgui/cegui_mk2/src/renderers/OgreGUIRenderer/ogrerenderer.cpp,v
retrieving revision 1.13
diff -u -r1.13 ogrerenderer.cpp
--- src/renderers/OgreGUIRenderer/ogrerenderer.cpp 4 Jul 2004 10:27:18 -0000 1.13
+++ src/renderers/OgreGUIRenderer/ogrerenderer.cpp 19 Jul 2004 18:57:48 -0000
@@ -357,6 +357,7 @@
d_render_sys->_setColourBufferWriteEnabled(true, true, true, true);
// 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, TextureUnitState::TAM_CLAMP);
GUI disappearing when using alpha blending
The fix indeed fixed the issue in the little demo I supplied, thanks for this.
Unfortunately, in my 'real' application, the problem was still there and here is why: I use vertex/fragment programs.
So without thinking about it too much I added the following two lines to the OgreRenderer::initRenderStates() method:
and this seems to do the trick.
Unfortunately, in my 'real' application, the problem was still there and here is why: I use vertex/fragment programs.
So without thinking about it too much I added the following two lines to the OgreRenderer::initRenderStates() method:
Code: Select all
d_render_sys->unbindGpuProgram(GPT_FRAGMENT_PROGRAM);
d_render_sys->unbindGpuProgram(GPT_VERTEX_PROGRAM);
and this seems to do the trick.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
GUI disappearing when using alpha blending
Hehe
Thanks for this. I think it now has all the settings covered, at least I hope so. I'll add these calls to CVS in a little while
Thanks for this. I think it now has all the settings covered, at least I hope so. I'll add these calls to CVS in a little while
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 13 guests