Skip to main content
gamedev.net
🔒 Locked

Performance Check

Started by horizon981 Jul 12, 2006 at 9:05 PM 6 replies 700+ views
Original Post
horizon981
horizon981
I made a flight simulator some days back. It's terrain was a square 400x400 units apiece. That time, I used BMP files for texture mapping. Now, Im working on its second version and must use TGA because of game requirements. This time however, the game works fine only till 200x200. The Frame Rate really falls when a 400x400 was used. Does TGA degrade performance more than BMP files? I also tried display lists but the results are same. Please help with suggestions.
darookie
darookie
Quote:
Original post by horizon981
Does TGA degrade performance more than BMP files?

No. That's technically impossible unless the pixel format has changed along with the file format. A file format is nothing but a container for pixel data, so the differences between file formats lie without the scope of the OpenGL API.
Double check whether the pixel formats of the BMP and the TGA match (e.g. the number of bits-per-pixel is identical for both files).
horizon981
horizon981
Definitely not. BMP is 24 bpp, TGA is 32 bpp. Now what?
darookie
darookie
Have your artist convert the TGA to 24 bit. Also make sure that both textures (in BMP and TGA) have the same dimensions. If the pixel format was changed, the size might have changed as well. Depending on your hardware and your texture setup, both can influence the performance.
horizon981
horizon981
Quote:
Original post by darookie
Have your artist convert the TGA to 24 bit.


Thanks, but I am the only one in the development team! [smile]
The textures require transparency, and so must be 32 bpp, which is impossible with BMPs.
deavik
deavik
Hi,

a) Please post your glTexImage2D call
b) Use power-of-two textures

The difference between a 32 bit TGA and a 24 bit BMP is that they serve different purposes. If you need the alpha channel, use a internal format that has one. Once you have passed it to GL, the texture lookup can hardly take more time for a GL_RGBA8 TGA than a GL_RGBA8 BMP.
CTar
CTar
Quote:
Original post by horizon981
The textures require transparency, and so must be 32 bpp, which is impossible with BMPs.


So do you have transparency enabled when using TGAs and transparency disabled with BMPs? If that is so then that might explain it.
_the_phantom_
_the_phantom_
Quote:
Original post by CTar
Quote:
Original post by horizon981
The textures require transparency, and so must be 32 bpp, which is impossible with BMPs.


So do you have transparency enabled when using TGAs and transparency disabled with BMPs? If that is so then that might explain it.


Indeed, blending increases framebuffer traffic significantly, also in a way that ram doesn't like access wise (read-modifiy-write cycles are murder on DDR ram, more so when other read traffic is going on).

general tip: only ever enable blending when you required it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.