Results 1 to 4 of 4

Thread: Time to call glCallList

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Posts
    28

    Time to call glCallList

    I have a program that renders a 1,000,000 triangle display list. Each frame, all it does is call glCallList. I'm timing the call with gettimeofday(), and it seems to take 11-12ms to call glCallList. Now, I thought glCallList would return right away, even if it hasn't quite finished drawing. Then I changed everything around to use vertex/normal arrays instead of a display list, and it didn't speed up at all. What could be slowing down this call, and why would it be taking any time in the first place?

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Time to call glCallList

    This is all very OpenGL implementation dependent and dependent on your display list contents.
    12 ms per CallList means you drew at least 83 million vertices per second, this is not too bad.
    If you have a hardware which can deal with a million triangles in a buffer it might send it and be done with it, returning immediately, if not, then not.
    If the display list contains multiple primitives in begin-end chunks or other stuff, this is more work than if not.
    If the hardware cannot deal with a million vertices in one primitive, try chunking it into smaller begin-end parts. 16 bit counts are a good idea.
    Vertex Arrays are not the same as highly optimized display lists, but nearer to immediate mode. Put the vertex arrays into vertex buffer objects, this brings the data on server side.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Time to call glCallList

    Hi !

    1M triangles might use huge amounts of GPU memory and may not fit in there, in that case you will not find much difference in speed with or without display lists because it will normal ram instead.

    Mikael

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2004
    Posts
    28

    Re: Time to call glCallList

    Do you think that might be why glCallLists is blocking for 12ms instead of returning immediately? Because it has to keep retransferring all those triangles? Is there something I can do to make all those triangles smaller, like using a lower-precision form of glVertex?

Similar Threads

  1. Occasional spikes in time taken to call glBufferSubData
    By Xardov in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 06-08-2014, 07:10 AM
  2. Can i call a same kernel more than a time?
    By luizdrumond in forum OpenCL
    Replies: 4
    Last Post: 09-02-2011, 02:01 PM
  3. glCallList not working
    By NossC in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 10-27-2009, 07:43 PM
  4. glCallList very slow
    By David Doria in forum OpenGL: Basic Coding
    Replies: 19
    Last Post: 11-21-2008, 04:35 PM
  5. glcalllist
    By fobru in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 10-13-2003, 06:49 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