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

Thread: Optimization

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2003
    Posts
    12

    Optimization

    Howdy all,

    I have a quick yet rather ambigious question (but don't worry, I'm not asking you to help me with an exact, specific problem ) Here's my general problem:

    I have an Athlon 3000+, 1024 of PC3200 and a TI4600. The application I'm developing currently has a textured sphere of a couple thousand tris using a single, 2048 x 1024 texture of Earth ( Blue Marble is win ). My sphere does some spinning, but that's pretty much the extent of his liveliness.

    Now, doing all this fun stuff in display lists, I'm getting a mighty 78 fps (without DLs it was around 50). This seems mighty slow to me, so I figured I'd ask all of you out there for some general opengl optimization rules, without having to make you suffer through reading a bunch of my code.

    I know a little bit about VBOs, but haven't gotten to the point of implimenting them yet. Seems like I've probably got something more fundamentally wrong than just the raw vertex pushing power, though, so I figured I'd ask you gurus for some basic suggestions

    Also, one other little question. Does anyone know of a profiler specifically for OpenGL (on windows). I found a bunch of stuff about OpenGL Profiler for Mac, but nothing for Windows. Anyway, thanks for any advice!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    718

    Re: Optimization

    * Use mip mapping for the earth texture
    * Use a compressed texture
    * Read the presentation on performance from GDC 2004 byt ATI and Nvidia (available at their developer sites).

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: Optimization

    Display lists often can improve performance by caching repetitively used commands (althoug I'm as skeptical as you about a performance gain of 28fps).
    Thanks for trying to spare us a code review, but it sounds like your render function shouldn't be all that complicated and in this case could help diagnose the problem.

    as far as VBOs or VARS (simple vertex arrays)- use them. You will obtain massive performance gains if you do. A couple thousand (i.e. 2,000) tris means 6,000 vertices for your globe; certainly enough to warrant the use of VARS or VBOs.

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2004
    Location
    Edmonton Alberta Canada
    Posts
    7

    Re: Optimization

    A quick question: You aren't building a display list every frame are you?

    Also: You are only binding the Earth texture once, before you begin drawing, right?

Posting Permissions

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