Original Post
Hi,
I am designing a custom 3D GUI system using C++ which is kind of similar to the windows gui.
Every thing in the GUI is an individual object and can contain other GUI elements.
e.g. A window will have four borders by default but could then contain a titlebar, a scrollbar and a text area all as child objects.
When an object is draw it draws itself then all of its child objects in order.
I can do all this fine in 2D but the problem comes in drawing it in 3D.
I am vaguely familiar with the openGL API. My plan is to create a polygon the shape of the primary container then draw to this.
My first thought it:
Create a 2D image of the window then render this on the polygon but I have no idea how to do this. Would I just create a bitmap in memory and then make this a texture or is there a better way to do this. Bear in mind that individual elements in a container may change and it seems a waste to redraw the entire polygon each time (although it may be and probably is quicker).
My googling has came up a little blank but I''ve probably searched quite poorly. I''m off to search some more now but if anyone has anything to add I''d add apreciate it.
Thanks, Meto