Performance Issues with OpenGL

Started by
0 comments, last by _the_phantom_ 15 years, 11 months ago
Hello, First, I need to point out that I am relatively new to OpenGL. I am currently developing a 2D mobile game under OpenGL ES 1.1 and have some serious issues I am currently dealing with... The project is a port, and was initially develop without OpenGL (just don't ask, what a mess). All resources were devided in small images with dimentions different than a degree of 2. As a consequence a lot of memory was wasted. Initially I was drawing about 100 textures per frame, FPS was bad but bearable (20-25 frames). Some additional resources were added to the game and the memory said "Kaboom" So I saved some momory by rearranging texture boundaries... In short I made the dimensions of the images equal to degrees of 2. Memory waste was minimal. The tradeoff was that I now have at least 4 times more textures to draw per frame and the FPS sux. I am currently devoid of any profiling tools regarding specific device performance issues so I just want to ask: What is the most common technique for resource management and texture drawing? Is it good to put everything in one giant texture and find a method to draw specific portions of it? Is it better to have as many smaller textures as possible and search for problems elsewhere? What means "optimal" in OpenGL? My question is too general, I understand that. I am not asking "what will work in my case", just "what works in most of the cases". Thank you
Advertisement
Putting as many images as you can into one texture is the best way forward, however you need to couple this with batching so that you draw as many images from the same texture as possible without swapping textures.

This means you might need to arrange your images and group them in a certain way in the texture.

Texture coordinates are used for accessing different parts of the image.

This topic is closed to new replies.

Advertisement