Add 10-10-10-2 pixel type

This commit is contained in:
Nikita Lisitsa 2020-12-15 09:45:41 +03:00
parent 42afb1692b
commit 7cf2a1d5ca

View file

@ -25,6 +25,11 @@ namespace psemek::gfx
struct uint10;
struct uint12;
struct uint10_10_10_2
{
std::uint32_t value;
};
template <typename T>
struct integer;
@ -127,6 +132,16 @@ namespace psemek::gfx
static constexpr GLenum type = gl::UNSIGNED_BYTE;
};
// Normalized 10-10-10-2
template <>
struct pixel_traits<uint10_10_10_2>
{
static constexpr GLenum internal_format = gl::RGB10_A2;
static constexpr GLenum format = gl::RGBA;
static constexpr GLenum type = gl::UNSIGNED_BYTE;
};
// Unsigned 8-bit
template <>