From 644c9ca5b6fe8d2c140440934532b69847c27e9a Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sat, 22 Jul 2023 20:04:06 +0300 Subject: [PATCH] Add depth32f pixel --- libs/gfx/include/psemek/gfx/pixel.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); }