Results 1 to 2 of 2

Thread: Vertices: from GL_FLOAT to GL_UNSIGNED_SHORT killed performance?

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    4

    Vertices: from GL_FLOAT to GL_UNSIGNED_SHORT killed performance?

    Hi Everybody!

    I am building a game engine. My primary world geometry is currently fed to OpenGL using several arrays: coordinates, texture, etc.

    My coordinates were simple [x,y,z] using GL_FLOAT, but to save space I decided to try GL_UNSIGNED_SHORT.

    When I made that switch, my frame-rate dropped from ~150fps to ~40fps.

    In retrospect, I realized I was feeding it six bytes per vertex, resulting in alignment problems so I changed the vertex data to [x,y,z,1], and got up to 80 fps.

    But this is still just over 1/2 of what I was getting using GL_FLOAT. Is there some secret here, or is the on-the-fly conversion so expensive that it causes this issue?

    Note: I am using shaders and none of the fixed-function pipeline.

    I very much appreciate any insight or help

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    4
    Redaction: I was mistaken. The frame rates are exactly the same. It turns out that my frame rate flip-flops between the 80/150 number depending upon a random fluctuation in my game, and it just happened that several runs using FLOAT found the higher number, then several runs using SHORT found the lower one.

    <whew> I was a bit concerned on this one

Similar Threads

  1. Replies: 1
    Last Post: 10-04-2013, 02:50 PM
  2. Performance VBOs on Nvidia with GL_UNSIGNED_SHORT
    By Mars_999 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-03-2007, 02:13 AM
  3. Configuration change killed my FPS
    By Drakkhen in forum OpenGL: Windows
    Replies: 7
    Last Post: 07-27-2005, 06:04 AM
  4. help - 4in1 drivers have killed my opengl..!
    By ExileGL in forum OpenGL: User Software
    Replies: 4
    Last Post: 08-16-2004, 02:39 PM
  5. VBOs, performance and shared vertices
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-19-2004, 02:43 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