Hi,
I want to draw one texture on top of another so that the second texture is only drawn on the opaque parts of the first texture, and is tiled with a position and size.
The specific example is for instance something like a cup or other object being filled in a button... the partly transparent texture inside the cup moves up to simulate the cup being filled while the rest of the (transparent) background stays the same.
Is there a way to do this? Thanks.
XORing textures...
Moderators: CEGUI MVP, CEGUI Team
Re: XORing textures...
There is definitely a way to do this. Typically people will use a RTT (Render To Texture) technique for things like this; and it sounds like you will also want to apply a Masking technique when painting the texture.
CEGUI uses Imagesets for imagery, and Imagesets are wrappers for the underlying rendering systems textures. Basically you create a texture using the rendering subsystem, assign the texture to an imageset, and assign the imageset to the window. Then you manually render your scene to the underlying texture whenever it needs to be updated; when CEGUI renders the window it will use that texture.
I am not sure if RTT has been made any easier in v0.7+ since I have not upgraded yet, but there are many threads about RTT and a few concerning Masking on the forums, and there are many sources on the internet in general so you should not have much trouble figuring it out.
CEGUI uses Imagesets for imagery, and Imagesets are wrappers for the underlying rendering systems textures. Basically you create a texture using the rendering subsystem, assign the texture to an imageset, and assign the imageset to the window. Then you manually render your scene to the underlying texture whenever it needs to be updated; when CEGUI renders the window it will use that texture.
I am not sure if RTT has been made any easier in v0.7+ since I have not upgraded yet, but there are many threads about RTT and a few concerning Masking on the forums, and there are many sources on the internet in general so you should not have much trouble figuring it out.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 4 guests