Results 1 to 2 of 2

Thread: Performance with some old code

  1. #1
    Newbie Newbie
    Join Date
    Mar 2014
    Posts
    2

    Performance with some old code

    I've inherited a project using some pretty old OpenGL code. I haven't really used OpenGL in a while nor did I ever use it in a production environment. It's a 3D visualization program and its performance leaves a lot to be desired. I've tried running the project using gDEBugger but I'm a bit stumped as to what I'm seeing.

    It appears that the program is using a lot of deprecated functionality. gDEBugger is saying that 78.13% of calls are to deprecated functions (yay?). Of those I'm seeing things like glVertex3d, glNormal3f, glVertex2d near the top in terms of calls. These seem to be being called by things like gluCylinder and the like. In school we learned to use glBegin/end with shapes from glu. It seems that nowadays it's prefered to use vertex buffer arrays.

    The vertex batches section in gDEBugger is telling me that 99% of my batches are made up of 1 vertex. I'm assuming this has to do with the glu functions. I understand that using larger vertex batches would be preferred.

    Should I consider rewriting all the opengl code to use vertex batches, drawing all the shapes manually this way? Or is there a way to use the glu functions with vertex batches?

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2008
    Posts
    25
    RE: I'm assuming this has to do with the glu functions.
    I would more likely assume it relates to each call to things like glVertex3d. last I saw(anybody can correct me if things have changed) the fixed function pipeline "under the hood" is actually implemented with the programmable pipeline vertex buffer stuff. So the 99% of the batches made up of one vertex seems consistent with this.


    RE: Should I consider rewriting all the opengl code to use vertex batches, drawing all the shapes manually this way?
    most certainly

    RE:Or is there a way to use the glu functions with vertex batches? I doubt it. You have to make your own. But I do recall the OpenGL SuperBible 5 code has some example substitutes using vbos. It's GLTools library is really worth a look (for close substitutes of fixed pipeline api) in general aswell, which may suit your current context.

Similar Threads

  1. Improving the performance of current opengl code.
    By Remaldeep in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 08-10-2016, 09:16 PM
  2. Replies: 4
    Last Post: 10-15-2014, 02:56 AM
  3. Replies: 1
    Last Post: 04-30-2013, 06:38 AM
  4. OpenGL code performance
    By digitalshooter in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-25-2008, 04:48 PM
  5. Poor Game Performance, High Performance Machine
    By Hardlion in forum OpenGL: User Software
    Replies: 2
    Last Post: 03-05-2005, 11:46 AM

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