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 2 of 2

Thread: switching rendering states

  1. #1
    Intern Contributor
    Join Date
    Apr 2002
    Posts
    85

    switching rendering states

    I heard that switching rendering states is slow in OpenGl. In my program, I am drawing regular textures and volume textures, switching between the two for each model. Is this bad? Should I instead go through each model and draw all of the regular textures first and then go through all of the models again and draw the volume textures? Do you think this would help performance?

    Thanks.
    P4 2Ghz, GEFORCE4, 512 Meg RAM, WIN2000, VStudio 6.0

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2003
    Location
    Grenoble, France
    Posts
    8

    Re: switching rendering states

    hi.

    IMHO, well, it's true... and false. I mean that if you change the OpenGL state without rendering something or clearing buffer, I think that you won't lose a lot of time [calls to functions], because in most drivers "real" state switch happens only when you send something to render (the driver tries to optimize your calls). and these switches are costly.

    So if I were you, I would try to sort objects to render in order to minimize states changes between rendering objects.

    Look at this link if you want to know more about increasing performances: http://www.opengl.org/developers/code/s2001/perfogl.pdf


    [This message has been edited by Evan Meakyl (edited 09-05-2003).]

Posting Permissions

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