Reputation: 133
I have a rendering context with a color depth of 32-bits. I will be using some alpha blending, but not much; so using 24-bit images for most of the textures I need will greatly reduce the memory requirements. My question is, can I use 24-bit RGB textures with a 32-bit rendering context and expect the same performance as a 32-bit ARGB texture? I understand that the internal format is probably neither to begin with, but the target format of the RC is 32-bit ARGB.
Also, I am planning on using some form of texture compression. The platform will be Windows, exclusively. Which would provide the best compression and widest-compatibility? I am also hoping to use 24-bit compressed textures since I won't be using the alpha bits; but the rendering context will remain 32-bits.
Upvotes: 2
Views: 1615
Reputation: 5258
There is no problem at all using any texture format as input textures when rendering to a 32bit render context. The texture formats are either supported by the platform or not, that's about it, if it's supported you can use it without consideration of the format of the render context.
To compress your 24 bits textures, you could take a look at DXT1 texture compression that is supported on all OpenGL implementations on Windows PC. Note that depending on your content, and the compression quality you want to obtain, there are 'tricks' allowing to improve image quality using DXT compressions, alternative color spaces, and shader code for decoding, here is an example.
Upvotes: 0
Reputation: 52123
It looks like DXT5 should work for you.
Here are the details for GL_EXT_texture_compression_s3tc
Upvotes: 1