Results 1 to 5 of 5

Thread: Question on VBO

  1. #1
    Member Contributor
    Join Date
    Jun 2009
    Posts
    60

    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++)
    {
    (*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

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    171

    Re: Question on VBO

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

    www.songho.ca/opengl/gl_vbo.html

    but i hope you also go at
    http://www.opengl.org/registry/specs...fer_object.txt

    there is simple way
    DrawArrays
    and other bla-bla in the above opengl extension
    haven't made a game [img]<<GRAEMLIN_URL>>/frown.gif[/img]

  3. #3
    Member Contributor
    Join Date
    Jun 2009
    Posts
    60

    Re: Question on VBO

    hey dude.. thanks for a quick reply... I'll definitely go through those links..

    Thanks once again..

  4. #4
    Member Contributor
    Join Date
    Jun 2009
    Posts
    60

    Re: Question on VBO

    Hi..

    How can i select a primitive when i'm rendering objects using VBOs..??

    Thanks

  5. #5

Similar Threads

  1. Replies: 5
    Last Post: 04-23-2018, 12:03 AM
  2. Texture question and sphere question...
    By detzel in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-19-2001, 12:02 PM
  3. Matrix question (Not really an OGL Question)
    By KurtCob in forum OpenGL: Basic Coding
    Replies: 22
    Last Post: 04-04-2001, 07:55 AM
  4. Quake3 bsp question (not really openGL question)
    By ribblem in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-15-2001, 10:13 AM
  5. Replies: 2
    Last Post: 01-08-2001, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean