Hello,
I've used the approach to have a simple Window containing an Image, as described here:
viewtopic.php?f=10&t=4744&p=22359&hilit=simple+image#p22359
It works just fine, except I want to add transparency - the Image tones out, but it seems like theres actually some constant color behind the image - it doesn't reveal whats actually behind the window.
Could anyone point me in the right direction?
Thank you so much!
[solved] Image Window alpha not working as expected
Moderators: CEGUI MVP, CEGUI Team
Re: Image Window alpha not working as expected
Just a guess, but it might be that the color you see is the actual background behind CEGUI windows.
If so, and you are using Irrlicht, read this:
viewtopic.php?f=3&t=4943
If so, and you are using Irrlicht, read this:
viewtopic.php?f=3&t=4943
Re: Image Window alpha not working as expected
agamemnus wrote:Just a guess, but it might be that the color you see is the actual background behind CEGUI windows.
If so, and you are using Irrlicht, read this:
viewtopic.php?f=3&t=4943
Not using IrrLicht though.. Ogre..
Re: Image Window alpha not working as expected
I've tried so much now, really can't solve it!
Is there no one out there who has had the same issue?
Is there no one out there who has had the same issue?
Re: Image Window alpha not working as expected
Check cegui/src/RendererModules/Ogre/CEGUIOgreGeometryBuffer.cpp. You can see it has both "S_alphaBlendMode" and "S_colourBlendMode".
Re: Image Window alpha not working as expected
Yes, I've checked that file and seen those two, but not been able to figure out furthermore what they are used for.
They are both used in initialiseTextureStates().
They are both used in initialiseTextureStates().
Re: Image Window alpha not working as expected
I've found that you don't actually see the viewport background of the renderer.
The image just doesn't alpha at all.
The image just doesn't alpha at all.
Re: Image Window alpha not working as expected
Finally!
Issue resolved!
Added a fifth argument to the draw call:
Ending with a function like this:
Issue resolved!
Added a fifth argument to the draw call:
Code: Select all
CEGUI::ColourRect(CEGUI::colour(1.f, 1.f, 1.f, this->getAlpha()))
Ending with a function like this:
Code: Select all
void ImageWindow::populateGeometryBuffer()
{
if(d_image)
d_image->draw(*d_geometry, CEGUI::Vector2(0, 0), d_pixelSize, 0, CEGUI::ColourRect(CEGUI::colour(1.f, 1.f, 1.f, this->getAlpha())));
}
Who is online
Users browsing this forum: No registered users and 13 guests