Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: why speed decrease when using Lists or vertex pointer

  1. #1
    Intern Newbie
    Join Date
    Sep 2000
    Location
    ch
    Posts
    37

    why speed decrease when using Lists or vertex pointer

    hi, please help

    Gotta problem with gl lists. Normaly Lists are faster than raw geometry, but I get some understandible "hitches" with many or small geometry count. Even with 10 polygon they get slower... Is this due to a bad list pointer (generated with glGenLists) ?

    When using vertex pointer there is less render time, but there is still a terrible hitch ! PFD is under Double Buffering so this is not the problem...

    Code :
    		int ivert=0;
    		int itex=0;
     
    		for (int t=0; t<tri_count; t++){
     
    			glBegin(GL_TRIANGLES);
     
    				glTexCoord2f(ptex_coord[itex], ptex_coord[itex+1]);
    				itex+=2;
    				vec v = pvert[ivert];
    				glVertex3f(v.x,v.y,v.z);
    				ivert++;
     
    				glTexCoord2f(ptex_coord[itex], ptex_coord[itex+1]);
    				itex+=2;
    				v = pvert[ivert];
    				glVertex3f(v.x,v.y,v.z);
    				ivert++;
     
    				glTexCoord2f(ptex_coord[itex], ptex_coord[itex+1]);
    				itex+=2;
    				v = pvert[ivert];
    				glVertex3f(v.x,v.y,v.z);
    				ivert++;
     
    			glEnd();
    now add the functions of newlists and pointers...

    This code is perfectly speed enough for small polygon count... But why, why with display lists the frame time raise suddenly very very high for only a couple frame (even worse with vertex pointer and 10 polygon)??? There is no tasks running on the system... Cpu is at 98% free on 3ghz so performance is not the problem.

    Maybe some know... well even if not, thank you for your time

  2. #2
    Member Regular Contributor
    Join Date
    Feb 2002
    Location
    Hamburg, Germany
    Posts
    413

    Re: why speed decrease when using Lists or vertex pointer

    when you are using display lists with 10 tris your driver probably spends more time handling the displaylists on the cpu then the actual rendering takes.
    so your first optimization should be, not to worry about this performance problem, and simply draw more polygons...and of course, use vertex arrays. (with VBO's would be the best solution...)

    for more deatiled informations:
    http://developer.nvidia.com/docs/IO/...BatchBatch.pdf

    http://developer.nvidia.com/object/gdc_pipeperf.html

    http://developer.nvidia.com/object/g...rformance.html

  3. #3
    Intern Newbie
    Join Date
    Sep 2000
    Location
    ch
    Posts
    37

    Re: why speed decrease when using Lists or vertex pointer

    I found the problem... If I use glDeleteLists to delete only ONE list, the app will "pause". This must be a bug or what ? The program doesn't crash... well well

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •