Page 1 of 1
How to render window with texture?
Posted: Fri Sep 10, 2010 18:14
by makofierce
Hi.
I am trying to put a cegui texture directly into a window, via:
(myWindow->getGeometryBuffer()).setActiveTexture( (myImageset->getTexture()) );
It's just a blank... what extra code is needed?
Thanks in advance.
Re: How to render window with texture?
Posted: Sat Sep 11, 2010 23:21
by IR3uL
I think a GeometryBuffer (noob here) is used to draw 3d geometry. Perhaps an StaticImage is better to draw something to a window. I'm not exactly sure what are you trying to do tho.
If you wanna try the StaticImage approach you might want to take a look at the samples (all the samples with the space background use a StaticImage to draw it).
Re: How to render window with texture?
Posted: Mon Sep 13, 2010 08:52
by CrazyEddie
Setting the texture on a GeometryBuffer will not draw anything, it just sets the texture to use for subsequently added geometry. Also, if the window is not 100% under your control, then it's highly likely that any geometry you add will get erased during the next rendering pass.
To have a window draw a texture you can either use a StaticImage as already suggested, or you could create a simple WidgetLook just does minimal rendering, or create a Window subclass that can draw the texture directly.
CE.