View Full Version : Increase performance
01-19-2006, 12:09 AM
I am working on an application which I do two types of rendering:
1. Raster layer composed of 128x128 tiled textures in tiff format.
2. Vector layer composed of points, lines, polygons in different color, width and stipple pattern.
What should I consider in order to get best possible performance?
01-19-2006, 04:50 AM
Put as much as possible in GPU memory.
Group geometry based on it properties, color and so on to minimize state changes.
01-23-2006, 10:36 PM
Thank you for the reply.
I am new to OpenGL and I don't know exactly how to write to GPU. I create textures by glTexImage2D and render them and also render lines etc using glBegin..glEnd.
I read about glDrawArrays and glDrawElements increase performance. My textures are square in shape in tile form (think of chess table). Each line, path, polygon may have different color, width and stipple pattern. How can I use vertex arrays in this context?
01-23-2006, 11:35 PM
I suggest you have a look at display lists first, these are easier to use and can improve performance a lot, what you do is that you "record" a set of OpenGL commands and save that "recording" in memory that the GPU can access fast, then when you "play" back the display list it will be executed just as if you would have executed the same set of opengl function calls.
Just make a google serach for opengl tutorials on display lists or look at any of the web sites you can find links to on this web site to get you started.
This will of course only work if you have static geometry that does not change all the time (you can transform the geometry before you call a display list though), so if you have very dynamic geometry you might want to have a closer like at other solutions.
01-24-2006, 02:22 AM
I think display lists will increase performance greatly. I did my textures so, already it began working faster. I have another question: Can I put boolean comparisons inside the list that will operate during execution, not compilation.
Originally posted by Bumbala:
I think display lists will increase performance greatly. I did my textures so, already it began working faster. I have another question: Can I put boolean comparisons inside the list that will operate during execution, not compilation.Not possible.
01-24-2006, 08:44 AM
Display list is definitely the solution :cool:
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.