Results 1 to 2 of 2

Thread: Vertex Array Speed issue

  1. #1
    Senior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    374

    Vertex Array Speed issue

    Hi to all!

    I have a Scene where I draw 10000 boxes (most of the time not all are visible and my frustum culling works nice). I used to draw them in immediate mode with generating the vertices on the fly (knowing upper left front corner and width, length, height - just some additions/subtractions) every frame. So i thought why not just put the vertices and normals in a vertex array and use this. After i have done this i realized that performance dropped. Not very much but it did (btw I know that going with DLs is the best solution - but this is a test for my box class and i thought about giving the user the possibility to decide if he wants to draw the boxes in immediate mode, as VA (perhaps later as CVS or VAR) and DL. Now the question is, is there a minimun ammount of vertices you have to use to gain performance by using VAs (my boxes only have 24 vertices of course)? And when generating the DL shall i use immediate mode or VA? And since I am not only going to have classes for boxes and cubes (torus, cone, etc. - all childclasses of my object base class) shall i only provide VA usability for more complex objects?

    As you see i am writing a very generic unit/lib for my favorite language so that the user does not have to know all the opengl stuff but my unit will handle it for him. Therefor I want to provide many features, the user can then context sensitive decide what to use. But when VAs in some point are even slower than immediate mode, why shall i provide them (would be better to just use the array my vertexpointer is pointing at and use this values between a glBegin/glEnd).

    btw i am using GL_QUADS as primitive since i cannot use strips/fans due to lighting issues and GL_TRIANGLES would need six input vertices for every plane.

    very long post, but I want to make my point as clear as possible

    thx in advance

    [This message has been edited by satan (edited 04-29-2002).]

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    374

    Re: Vertex Array Speed issue

    really noone on this?
    thought it would be a very easy one with answers just like:

    'QUADS are evil do not use' or 'man are you stupid, vertex arrays make sense when you have more than x vertices' or 'do not use standard vertex arrays, they are even slower than immediate mode use CVA, VAR' or something like that

Similar Threads

  1. Vertex Array Speed
    By gordon1 in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 04-08-2007, 09:04 AM
  2. Vertex attributes array issue
    By Zengar in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-06-2003, 07:49 AM
  3. vertex array speed question
    By HamsterofDeath in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 02-12-2003, 08:09 AM
  4. Vertex Array Issue??
    By dabeav in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-13-2002, 04:56 AM
  5. Vertex array speed relative to compiled DL
    By Sinnsyk in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 03-16-2001, 04:11 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