DiligentGraphics / DiligentCore

A modern cross-platform low-level graphics API
http://diligentgraphics.com/diligent-engine/
Apache License 2.0
636 stars 140 forks source link

Wrong OpenGL equivalent for TEX_FORMAT_BC1_UNORM_SRGB #380

Open code-monkey-101 opened 2 years ago

code-monkey-101 commented 2 years ago

In GraphicTypes.h, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT is mentioned as the OpenGL counterpart of TEX_FORMAT_BC1_UNORM_SRGB (DXGI_FORMAT_BC1_UNORM_SRGB).

I think, the correct counterpart is GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT.

TheMostDiligent commented 2 years ago

The engine currently uses GL_COMPRESSED_SRGB_S3TC_DXT1_EXT for TEX_FORMAT_BC1_UNORM_SRGB.

code-monkey-101 commented 2 years ago

That will probably ignore the alpha bit.

TheMostDiligent commented 2 years ago

Do you need alpha?

code-monkey-101 commented 2 years ago

No, I'm good, thanks. I just noticed this when I was googling for the right OpenGL equivalent for BC1_UNORM_SRGB for my own engine ;)