Jump to content
  • Advertisement
Sign in to follow this  
vNeeki

OpenGL Compressed textures (.dds)

This topic is 2497 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi , im thinking to add support for compressed textures , and i've got the following questions looking for an answer :rolleyes.gif
1:Is glCompressedTexImage2D supported by all opengl versions (1.1~3.0 & GLES)?
2:Does the GPU transfer a texture in every glBindTexture call ? If so would compression help or not ?
3:Can i use "The Compressonator"(by ati) to compress the textures for general usage(for any GFX card) or
does it pack them differently ?

Thanks for any help!

Share this post


Link to post
Share on other sites
Advertisement

1:Is glCompressedTexImage2D supported by all opengl versions (1.1~3.0 & GLES)?

Texture compression was promoted from extension to the core in 1.3, but was available as an extension before then.

2:Does the GPU transfer a texture in every glBindTexture call ? If so would compression help or not ?

Unless textures has been swapped out from the graphics card because you have too many textures, then the texture most likely won't be transferred at all, except when you load it the first time of course. If it has to be swapped, there is probably a benefit with compression since less data has to be transferred.

3:Can i use "The Compressonator"(by ati) to compress the textures for general usage(for any GFX card) or
does it pack them differently ?

The method for compressing the image is standard. You can use any compression program as long as the graphics card claims to support that particular standard.

Share this post


Link to post
Share on other sites

[quote name='vNeeki' timestamp='1328766546' post='4911195']
1:Is glCompressedTexImage2D supported by all opengl versions (1.1~3.0 & GLES)?

Texture compression was promoted from extension to the core in 1.3, but was available as an extension before then.

2:Does the GPU transfer a texture in every glBindTexture call ? If so would compression help or not ?

Unless textures has been swapped out from the graphics card because you have too many textures, then the texture most likely won't be transferred at all, except when you load it the first time of course. If it has to be swapped, there is probably a benefit with compression since less data has to be transferred.

3:Can i use "The Compressonator"(by ati) to compress the textures for general usage(for any GFX card) or
does it pack them differently ?

The method for compressing the image is standard. You can use any compression program as long as the graphics card claims to support that particular standard.
[/quote]

Thank you!smile.png
I thought that it was an important step for optimal performance but looks like its not(in most cases).

Share this post


Link to post
Share on other sites
It is mostly a benefit when your performance is limited by texture transfers or texture sampling; less data has to be transferred and more effective texture data can be stored in the caching mechanisms. Otherwise, the lossy compression can introduce quality issues for no practical gains. So it is a performance gain, but the question is if the gain has any practical benefits if that particular part of the program is not what is limiting your performance.

Share this post


Link to post
Share on other sites

It is mostly a benefit when your performance is limited by texture transfers or texture sampling; less data has to be transferred and more effective texture data can be stored in the caching mechanisms. Otherwise, the lossy compression can introduce quality issues for no practical gains. So it is a performance gain, but the question is if the gain has any practical benefits if that particular part of the program is not what is limiting your performance.


My renderer displays maximum 40 unique mip mapped textures per frame.Do you think that its a big deal ?

Share this post


Link to post
Share on other sites
Let's say the textures are 512 by 512 RGBA images. That makes it a total of 20 MB of image data. Double that to account for mipmaps, other overhead, and to be on the high side of the approximation. That makes it 40 MB for your 40 textures.

How much memory does your graphics card or device have? If you are distributing your application, how much memory do you expect your low-end users to have access to? Do you have a performance problem because of texturing, and would it be reasonable to sacrifice quality to improve it?

Whether it's a big deal is for you to decide. I don't know how much memory there is on a modern hand held device for graphics resources, but I can definitely imagine that 40 MB of textures is pushing it and that you need to do something. I can also say that 40 textures at 1 MB a piece is nothing on a modern desktop graphics card.

Share this post


Link to post
Share on other sites

Let's say the textures are 512 by 512 RGBA images. That makes it a total of 20 MB of image data. Double that to account for mipmaps, other overhead, and to be on the high side of the approximation. That makes it 40 MB for your 40 textures.

How much memory does your graphics card or device have? If you are distributing your application, how much memory do you expect your low-end users to have access to? Do you have a performance problem because of texturing, and would it be reasonable to sacrifice quality to improve it?

Whether it's a big deal is for you to decide. I don't know how much memory there is on a modern hand held device for graphics resources, but I can definitely imagine that 40 MB of textures is pushing it and that you need to do something. I can also say that 40 textures at 1 MB a piece is nothing on a modern desktop graphics card.


My Graphics Card has 1GB of VRAM but i would also like to see my game running on GPUs with up to 32-64Mb of RAM.As for the textures that im using they are all animated tiles of 128x128x4 or 256x256x4.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!