Results 1 to 6 of 6

Thread: need some performance hints!

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    8

    need some performance hints!

    Hello there!

    I'm currently reprogramming an old computer game called ultima online. I'm trying to setup the map an the static data, but i have some serious problems with performance.

    The game is split into quads 44x44 pixel.
    There is my first question:
    I use a VBO to push all my vertexdata(pos * 3, color * 4, tex * 2) into the graphic memory. Now i can render easily with
    Code :
    glDrawArrays(GL_QUADS,0,x); //x is the count of quads

    BUT: QUADS are deprecated reffering to this post: link
    would it be faster to set up index data and render triangles?

    Further more i use sometimes alot of textures (~200) per frame (it is not possible to use less, because i already render with ZBuffer and bind every texture just once)
    Is there any performance hint you can give me?

    This are 2 important questions and i hope some of you can help a beginner in opengl!

    thx prich

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: need some performance hints!

    some serious problems with performance
    Can you be more precise ? milliseconds per frame ? your computer and video card specs ? viewport size ?

    Quads are only deprecated from GL 3.x so you don't need to worry too much about deprecation.
    would it be faster to set up index data and render triangles?
    No.

    200 textures is quite a lot, switching textures has a cost. sounds like you can put all your texture ona single one, with carefull texture coordinates : this is called a "texture atlas".

    EDIT: and make sure you just rebind textures, and NOT reupload them at each frame (ie. glTexImage2D only called once per texture during the whole life of the program)

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    8

    Re: need some performance hints!

    ok

    the renderaction takes about 1,3 ms
    if have about 200 fps every frame (but there will be added more textures)

    i use archlinux with flgrx. Card: ATI Mobility Radeon HD 3650

    the application is developed in java using lwjgl...

    i only bind my textures and upload them once

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: need some performance hints!

    1.3 ms ? come back when you are at 130 ms per frame

    You have to understand that performance is never completely linear to one criterion. Maybe the limiting factor is number of pixel to render, or number of calls, or number of triangles, or maybe number of textures, or other things...

    Out of curiosity, do you have any reasons to use lwjgl, instead of jogl ?

  5. #5
    Junior Member Newbie
    Join Date
    Oct 2009
    Posts
    8

    Re: need some performance hints!

    when i started i only knew lwjgl because of jMonkeyEngine and Slick2D...
    Also lwjgl offers OpenAL which i really like

    would you recommend jogl? is there such a HUGE difference?

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: need some performance hints!

    Probably not much, but jogl became standard for jdk 1.5 or 1.6 so it might help for the deployment.
    I don't have a lot of experience with either lwjgl or jogl, so I was just asking.

Similar Threads

  1. GPGPU on uint64, hints please
    By piotr.wyderski in forum OpenCL
    Replies: 2
    Last Post: 10-02-2014, 11:54 AM
  2. Non-Deprecated Essentials Hints
    By Roaoul in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-30-2013, 02:58 PM
  3. historic hints about COLLADA
    By paolino in forum COLLADA
    Replies: 1
    Last Post: 03-15-2007, 03:22 PM
  4. alt + tab hints
    By markfcsl in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-03-2003, 03:09 AM
  5. implementation hints to application
    By ScottManDeath in forum OpenGL: General
    Replies: 0
    Last Post: 03-20-2002, 04:10 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