diff --git a/libs/gfx/include/psemek/gfx/pixel.hpp b/libs/gfx/include/psemek/gfx/pixel.hpp index e6ab0620..1557aea1 100644 --- a/libs/gfx/include/psemek/gfx/pixel.hpp +++ b/libs/gfx/include/psemek/gfx/pixel.hpp @@ -6,6 +6,17 @@ namespace psemek::gfx { + struct depth24_pixel + { + std::uint8_t depth[3]; + }; + + struct depth24_stencil8_pixel + { + std::uint8_t depth[3]; + std::uint8_t stencil; + }; + template struct pixel_traits; @@ -81,4 +92,20 @@ namespace psemek::gfx static constexpr GLenum type = gl::FLOAT; }; + template <> + struct pixel_traits + { + static constexpr GLenum internal_format = gl::DEPTH_COMPONENT24; + static constexpr GLenum format = gl::DEPTH_COMPONENT; + static constexpr GLenum type = gl::UNSIGNED_BYTE; + }; + + template <> + struct pixel_traits + { + static constexpr GLenum internal_format = gl::DEPTH24_STENCIL8; + static constexpr GLenum format = gl::DEPTH_STENCIL; + static constexpr GLenum type = gl::UNSIGNED_BYTE; + }; + }