Move texture cube mapping to renderer gl
This commit is contained in:
@@ -45,6 +45,7 @@ constexpr std::uint32_t gl_framebuffer_incomplete_multisample = 0x8D56U;
|
||||
constexpr std::uint32_t gl_color_buffer_bit = 0x00004000U;
|
||||
constexpr std::uint32_t gl_depth_buffer_bit = 0x00000100U;
|
||||
constexpr std::uint32_t gl_color_writemask = 0x0C23U;
|
||||
constexpr std::uint32_t gl_texture_cube_map = 0x8513U;
|
||||
constexpr std::uint32_t gl_texture_cube_map_positive_x = 0x8515U;
|
||||
constexpr std::uint32_t gl_texture_cube_map_negative_x = 0x8516U;
|
||||
constexpr std::uint32_t gl_texture_cube_map_positive_y = 0x8517U;
|
||||
@@ -328,6 +329,20 @@ std::uint32_t primitive_mode_for_stroke_count(std::uint32_t vertex_or_index_coun
|
||||
return gl_lines;
|
||||
}
|
||||
|
||||
std::uint32_t texture_cube_map_target() noexcept
|
||||
{
|
||||
return gl_texture_cube_map;
|
||||
}
|
||||
|
||||
std::uint32_t cube_map_allocation_face_texture_target(std::uint32_t face_index) noexcept
|
||||
{
|
||||
if (face_index >= 6U) {
|
||||
return 0U;
|
||||
}
|
||||
|
||||
return gl_texture_cube_map_positive_x + face_index;
|
||||
}
|
||||
|
||||
std::span<const std::uint32_t> panopainter_cube_face_texture_targets() noexcept
|
||||
{
|
||||
static constexpr std::array<std::uint32_t, 6> targets {
|
||||
|
||||
@@ -75,6 +75,8 @@ struct OpenGlReadbackFormat {
|
||||
[[nodiscard]] std::uint32_t index_type_for_index_size(std::uint32_t index_size_bytes) noexcept;
|
||||
[[nodiscard]] std::uint32_t primitive_mode_for_fill_count(std::uint32_t vertex_or_index_count) noexcept;
|
||||
[[nodiscard]] std::uint32_t primitive_mode_for_stroke_count(std::uint32_t vertex_or_index_count) noexcept;
|
||||
[[nodiscard]] std::uint32_t texture_cube_map_target() noexcept;
|
||||
[[nodiscard]] std::uint32_t cube_map_allocation_face_texture_target(std::uint32_t face_index) noexcept;
|
||||
[[nodiscard]] std::span<const std::uint32_t> panopainter_cube_face_texture_targets() noexcept;
|
||||
[[nodiscard]] std::uint32_t cube_face_texture_target(std::uint32_t face_index) noexcept;
|
||||
[[nodiscard]] std::span<const OpenGlTextureParameter> default_render_target_texture_parameters() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user