molecular
|
Conversion between PixelFormat and OpenGL type, format and internalFormat. More...
Typedefs | |
using | Gl = GlConstants |
Functions | |
uint32_t | ToGlType (PixelFormat format) |
uint32_t | ToGlFormat (PixelFormat format) |
uint32_t | ToGlInternalFormat (PixelFormat format) |
PixelFormat | ToPixelFormat (uint32_t, uint32_t, uint32_t glInternalFormat) |
Conversion between PixelFormat and OpenGL type, format and internalFormat.
Also used outside of the OpenGL module, so this must not depend on OpenGL headers. Hence the use of uint32_t instead of glEnum.
using molecular::gfx::PixelFormatConversion::Gl = typedef GlConstants |
uint32_t molecular::gfx::PixelFormatConversion::ToGlFormat | ( | PixelFormat | format | ) |
uint32_t molecular::gfx::PixelFormatConversion::ToGlInternalFormat | ( | util::PixelFormat | format | ) |
Defaults to sRGB formats where applicable and possible, except for pixel formats ending with _LINEAR.
uint32_t molecular::gfx::PixelFormatConversion::ToGlType | ( | PixelFormat | format | ) |
util::PixelFormat molecular::gfx::PixelFormatConversion::ToPixelFormat | ( | uint32_t | glType, |
uint32_t | glFormat, | ||
uint32_t | glInternalFormat | ||
) |
Only implemented for a few compressed types.