Move render target clear mapping to renderer gl
This commit is contained in:
@@ -43,6 +43,8 @@ constexpr std::uint32_t gl_framebuffer_unsupported = 0x8CDDU;
|
||||
constexpr std::uint32_t gl_framebuffer_undefined = 0x8219U;
|
||||
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_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;
|
||||
@@ -121,6 +123,11 @@ std::uint32_t texture_upload_type_for_internal_format(std::uint32_t internal_for
|
||||
}
|
||||
}
|
||||
|
||||
std::uint32_t rgba_pixel_format() noexcept
|
||||
{
|
||||
return gl_rgba;
|
||||
}
|
||||
|
||||
OpenGlPixelFormat texture_format_for_channel_count(std::uint32_t channel_count) noexcept
|
||||
{
|
||||
switch (channel_count) {
|
||||
@@ -267,6 +274,16 @@ std::uint32_t framebuffer_color_buffer_mask() noexcept
|
||||
return gl_color_buffer_bit;
|
||||
}
|
||||
|
||||
std::uint32_t framebuffer_depth_buffer_mask() noexcept
|
||||
{
|
||||
return gl_depth_buffer_bit;
|
||||
}
|
||||
|
||||
std::uint32_t color_write_mask_query() noexcept
|
||||
{
|
||||
return gl_color_writemask;
|
||||
}
|
||||
|
||||
std::uint32_t framebuffer_blit_filter(bool linear) noexcept
|
||||
{
|
||||
return linear ? gl_linear : gl_nearest;
|
||||
|
||||
@@ -43,6 +43,7 @@ struct OpenGlReadbackFormat {
|
||||
OpenGlRuntime runtime) noexcept;
|
||||
|
||||
[[nodiscard]] std::uint32_t texture_upload_type_for_internal_format(std::uint32_t internal_format) noexcept;
|
||||
[[nodiscard]] std::uint32_t rgba_pixel_format() noexcept;
|
||||
[[nodiscard]] OpenGlPixelFormat texture_format_for_channel_count(std::uint32_t channel_count) noexcept;
|
||||
[[nodiscard]] OpenGlReadbackFormat rgba8_readback_format() noexcept;
|
||||
[[nodiscard]] OpenGlReadbackFormat rgba32f_readback_format() noexcept;
|
||||
@@ -67,6 +68,8 @@ struct OpenGlReadbackFormat {
|
||||
[[nodiscard]] std::uint32_t framebuffer_complete_status() noexcept;
|
||||
[[nodiscard]] const char* framebuffer_status_name(std::uint32_t status) noexcept;
|
||||
[[nodiscard]] std::uint32_t framebuffer_color_buffer_mask() noexcept;
|
||||
[[nodiscard]] std::uint32_t framebuffer_depth_buffer_mask() noexcept;
|
||||
[[nodiscard]] std::uint32_t color_write_mask_query() noexcept;
|
||||
[[nodiscard]] std::uint32_t framebuffer_blit_filter(bool linear) noexcept;
|
||||
[[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;
|
||||
|
||||
Reference in New Issue
Block a user