How to render window with texture?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

makofierce
Just popping in
Just popping in
Posts: 12
Joined: Mon Aug 16, 2010 02:02

How to render window with texture?

Postby makofierce » Fri Sep 10, 2010 18:14

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.

IR3uL
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Wed Aug 25, 2010 00:32
Location: Buenos Aires - Argentina

Re: How to render window with texture?

Postby IR3uL » Sat Sep 11, 2010 23:21

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).

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: How to render window with texture?

Postby CrazyEddie » Mon Sep 13, 2010 08:52

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 3 guests