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++)
{
(*it)->Render();
}
}

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

Regards
Rakesh Patil