Add depth32f pixel

This commit is contained in:
Nikita Lisitsa 2023-07-22 20:04:06 +03:00
parent 02ecca5ebc
commit 644c9ca5b6

View file

@ -17,6 +17,11 @@ namespace psemek::gfx
std::uint8_t stencil; std::uint8_t stencil;
}; };
struct depth32f_pixel
{
float depth;
};
struct float16 struct float16
{ {
std::uint16_t value; std::uint16_t value;
@ -456,6 +461,14 @@ namespace psemek::gfx
static constexpr GLenum type = gl::UNSIGNED_INT_24_8; static constexpr GLenum type = gl::UNSIGNED_INT_24_8;
}; };
template <>
struct pixel_traits<depth32f_pixel>
{
static constexpr GLenum internal_format = gl::DEPTH_COMPONENT32F;
static constexpr GLenum format = gl::DEPTH_COMPONENT;
static constexpr GLenum type = gl::FLOAT;
};
std::size_t pixel_size(GLint internal_format); std::size_t pixel_size(GLint internal_format);
} }