Question on VBO

hello there…

I want to use VBOs for optimization of displaying data… Now i went through many tutorials… So, my concept (theoretically) is clear… I mean which function does what task and all i know…

But only thing is am confused where to write the code… Now in my case, i have, base class called Objects, and am deriving various objects from this, like, Circle, Rectangle, Lines and points… And each of these classes are having their own Render function… In my paint event of GLCanvas, i call a function which in turn traverses a list of objects and calls their corresponding render functions…

void MainRender()
for(std::map<unsigned int, EObjects *>::iterator it = ObjList.begin(); it != ObjList.end(); it++)

Now, glGenBuffer() has to be called only once… So i guess it will be ok if i call it in the constructor of GLcanvas class… Secondly, where do i write a code for binding of buffer and data.?? in the corresponding classes render event or in the MainRender() function…???

Can anyone please help me to how to proceed with…??

Thanks in advance…

Rakesh Patil

you may also know which function where fitted
i hope you have seen songho and might as it at first place by google search

but i hope you also go at

there is simple way
and other bla-bla in the above opengl extension

hey dude… thanks for a quick reply… I’ll definitely go through those links…

Thanks once again…


How can i select a primitive when i’m rendering objects using VBOs…??