diff --git a/libs/gfx/include/psemek/gfx/pixel.hpp b/libs/gfx/include/psemek/gfx/pixel.hpp index d30de69b..7c2c857f 100644 --- a/libs/gfx/include/psemek/gfx/pixel.hpp +++ b/libs/gfx/include/psemek/gfx/pixel.hpp @@ -17,6 +17,11 @@ namespace psemek::gfx std::uint8_t stencil; }; + struct depth32f_pixel + { + float depth; + }; + struct float16 { std::uint16_t value; @@ -456,6 +461,14 @@ namespace psemek::gfx static constexpr GLenum type = gl::UNSIGNED_INT_24_8; }; + template <> + struct pixel_traits + { + 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); }