Geometry buffers usage to draw custom geometry?
Posted: Mon Jan 21, 2013 02:07
I want to draw custom geometry. I have to draw a lot of textured rectangles on screen and their positions may change in every frame. Using a cegui window for each is overkill. I want to send them to the GPU in the same batch. (in case it matters, I'm on 0.7.9, using Ogre3D 1.8.1 with D3D9.)
I've searched for a couple of hours now and my current understanding is that I have to subclass CEGUI::Window and override getGeometryBuffer() and supply my own geometry. Is this correct?
Is there documentation or an example somewhere? Has anybody done this? Any pointers would be appreciated. If possible I would prefer not to go into this without any documentation because I may be leaking something without knowing or doing something that will be broken in the next major version of CEGUI. I can perhaps contribute a snippet to the wiki with what I learn.
I feel a little silly asking this because the description of this subforum includes "- Writing custom Window and WindowRenderer classes." Yet I cannot find a thread about somebody writing a custom window with custom vertex data.
EDIT: I did see the Wiki article about this but it doesn't quite do what I need, I want CEGUI to draw the geometry that I supply, not me.
I've searched for a couple of hours now and my current understanding is that I have to subclass CEGUI::Window and override getGeometryBuffer() and supply my own geometry. Is this correct?
Is there documentation or an example somewhere? Has anybody done this? Any pointers would be appreciated. If possible I would prefer not to go into this without any documentation because I may be leaking something without knowing or doing something that will be broken in the next major version of CEGUI. I can perhaps contribute a snippet to the wiki with what I learn.
I feel a little silly asking this because the description of this subforum includes "- Writing custom Window and WindowRenderer classes." Yet I cannot find a thread about somebody writing a custom window with custom vertex data.
EDIT: I did see the Wiki article about this but it doesn't quite do what I need, I want CEGUI to draw the geometry that I supply, not me.