Results 1 to 4 of 4

Thread: Rendering a lot of vertex

  1. #1
    Member Contributor
    Join Date
    Apr 2011
    Location
    Barcelona, Catalunya
    Posts
    55

    Rendering a lot of vertex

    Hi,

    I need to render an object with a lot of vertex, so as I read in this forum, I need to use vertex arrays to do this more eficient.

    The question now is how eficient is this? The rendering is of 6 objects, each of them have for than 1400 vertex divided in groups of 3 (triangles).

    What I need to do? Sending arrays of 3 vertex at each time? Is this eficient? 6 objects * 1400/3 = 2796 arrays more or less(Do you understand my question?)

    Thanks

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2011
    Posts
    10

    Re: Rendering a lot of vertex

    Question was not understood, but..

    Vertex arrays allows you to send vertices for MORE than one primitive at once, so sending 6 vertex arrays 1400 vertices each seems like a good idea. This would result in only six draw calls.

    If vertices does not change in each frame you should also consider using VBO instead of user memory (keep vertex data in GL_ARRAY_BUFFER).
    http://en.wikipedia.org/wiki/Vertex_Buffer_Object

  3. #3
    Member Contributor
    Join Date
    Apr 2011
    Location
    Barcelona, Catalunya
    Posts
    55

    Re: Rendering a lot of vertex

    These objects are joints of a robot. So if I don't send any signal from my Qt interface they won't move.

    However, the problem, and the reason for this post, is the function paintGL. Each time I call updateGL (so paintGL), I redraw all vertex and it can be too much.

    VBO can fix this?

  4. #4
    Senior Member OpenGL Pro BionicBytes's Avatar
    Join Date
    Mar 2009
    Location
    UK, London
    Posts
    1,161

    Re: Rendering a lot of vertex

    Not necessarily. However you could draw to an offscreen framebuffer and then your paintGL function could simply paint the offscreen texture onto the main window.

Similar Threads

  1. Rendering without vertex data (gl_VertexID only)
    By BlackHC in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 08-14-2009, 04:46 AM
  2. Vertex Rendering
    By tiammazzo in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 06-05-2001, 09:51 AM
  3. Terrain Rendering Using Vertex Arrays?
    By Heaven in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-21-2001, 09:51 AM
  4. Rendering from vertex/index pointers
    By Wulf in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-17-2001, 12:19 PM
  5. vertex array is not rendering - why?
    By iLLuminatus in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 02-21-2001, 01:32 AM

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