Results 1 to 8 of 8

Thread: Performance increasing

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Poland
    Posts
    196

    Performance increasing

    Hi,

    I was experimenting with that code:
    Code :
    void render()
    {
    glBegin( GL_QUADS );
    for( float i = 0; i < 100; i += 0.1f )
    {
     glVertex3f( 0, 1, i );
     glVertex3f( 0, 0, i );
     glVertex3f( 1, 0, i );
     glVertex3f( 1, 1, i );
    }
    glEnd();
    }
    First I called render() for every frame, next I've compiled this function into display list, and later I used LockArraysEXT (with created array of vertices with that coordinates). In all three cases I've got the same number of FPS. Is it normal?

    I've checked this codes on AMD K6-2 500 MHz and AMD Athlon XP 2000+. There was the same result: 42 FPS. I've tested it on the same GPU GeForce2 GTS and I think that no matter what CPU I've got because I'm calling only OpenGL commands which contains GPU? Am I right? But could someone give me an example of using display lists or EXT_compiled_array that speeds up the rendering?

    thanks
    yaro

    [This message has been edited by glYaro (edited 07-15-2003).]

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

    Re: Performance increasing

    Check if you have disabled wait on vertical blank (vsync) in the OpenGL of the display control panel.
    What are the sizes of these quads? Does it get faster if you're reducing the window's size? (fill rate bound)

  3. #3
    Member Newbie
    Join Date
    Aug 2003
    Location
    asda
    Posts
    47

    Re: Performance increasing

    Compiled vertex arrays, CVA, is not important and if you use vertex buffers objects, VBO, do they give you the same benefits and also a lot of other advantages. Take a look at this CVA demo with a babe too see the point. http://opengl.nutty.org/extensions/index.html

    The important difference is if the graphics hardware can get the vertices without any help. This will become more and more important since GPUs is getting higher performance faster than CPUs. Most real programs can not afford to waste CPU cycles on something like this.

    In your program does display lists have the above mentioned advantage. This should give a lot more time for the CPU to do other stuff.

    I am also at the same line as Relic concerning the equal fps.
    asd

  4. #4
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    Toulouse, France
    Posts
    133

    Re: Performance increasing

    only 42 fps ... with this little rendering function ... it sound like a vertical sync problem.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    340

    Re: Performance increasing

    How is the Render method called? Do you use a (Win32) timer?

  6. #6
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Poland
    Posts
    196

    Re: Performance increasing

    There should be i += 0.01f in code above (yeah, I know it is a very big difference).
    But is it a way to speed that simple code (of 10000 quads) up?
    I render the scene in loop, I don't use any timer.
    I will look at CVA demo, thanks for link.
    But disabling/enabling vsync changes nothing because my monitor refresh frequency is 85 Hz. If I change the window size (I was testing it with glViewport) my prog speeds up so the speed depends on fill rate. Now I'm sure that all of this is processed only by GPU (dontcare about CPU working on for loop). Thanks for help.

    Is disabling vsync safe for monitor?

    thanks in advance


    [This message has been edited by glYaro (edited 07-16-2003).]

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

    Re: Performance increasing

    Disabling "wait for vertical blank" does not change how the monitor operates. It just means that a SwapBuffers() call is executed _immediately_ when processed.
    With wait for vertical blank" it waits until the monitor has fully refreshed its last image and swaps then, so that you never see parts of different images of an animation on the screen. This prohibits disturbing tearing effects, but limits the framrates to full denominators of your monitor refresh (e.g. 60, 30, 20, 15, 12, 10,... frames per second).

  8. #8
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Poland
    Posts
    196

    Re: Performance increasing

    Thanks.

Similar Threads

  1. Increasing the redering performance??
    By dvwood in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 01-09-2009, 12:17 PM
  2. increasing performance
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-21-2003, 07:22 AM
  3. Increasing attenuation
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-01-2003, 11:09 AM
  4. increasing the size of objects on the fly
    By fox in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 03-21-2001, 10:26 AM
  5. Depth increasing
    By Starnut coder in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-20-2001, 07:04 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