Move pixel buffer mapping to renderer gl
This commit is contained in:
@@ -48,6 +48,10 @@ constexpr std::uint32_t gl_texture_wrap_t = 0x2803U;
|
||||
constexpr std::uint32_t gl_texture_wrap_r = 0x8072U;
|
||||
constexpr std::uint32_t gl_texture_border_color = 0x1004U;
|
||||
constexpr std::uint32_t gl_clamp_to_edge = 0x812FU;
|
||||
constexpr std::uint32_t gl_pixel_pack_buffer = 0x88EBU;
|
||||
constexpr std::uint32_t gl_pixel_unpack_buffer = 0x88ECU;
|
||||
constexpr std::uint32_t gl_stream_read = 0x88E1U;
|
||||
constexpr std::uint32_t gl_map_read_bit = 0x0001U;
|
||||
|
||||
[[nodiscard]] bool contains(std::string_view text, std::string_view needle) noexcept
|
||||
{
|
||||
@@ -149,6 +153,26 @@ std::uint64_t readback_byte_count(
|
||||
return static_cast<std::uint64_t>(width) * height * format.bytes_per_pixel;
|
||||
}
|
||||
|
||||
std::uint32_t pixel_pack_buffer_target() noexcept
|
||||
{
|
||||
return gl_pixel_pack_buffer;
|
||||
}
|
||||
|
||||
std::uint32_t pixel_unpack_buffer_target() noexcept
|
||||
{
|
||||
return gl_pixel_unpack_buffer;
|
||||
}
|
||||
|
||||
std::uint32_t pixel_buffer_stream_read_usage() noexcept
|
||||
{
|
||||
return gl_stream_read;
|
||||
}
|
||||
|
||||
std::uint32_t pixel_buffer_map_read_access() noexcept
|
||||
{
|
||||
return gl_map_read_bit;
|
||||
}
|
||||
|
||||
const char* framebuffer_status_name(std::uint32_t status) noexcept
|
||||
{
|
||||
switch (status) {
|
||||
|
||||
@@ -50,6 +50,10 @@ struct OpenGlReadbackFormat {
|
||||
OpenGlReadbackFormat format,
|
||||
std::uint32_t width,
|
||||
std::uint32_t height) noexcept;
|
||||
[[nodiscard]] std::uint32_t pixel_pack_buffer_target() noexcept;
|
||||
[[nodiscard]] std::uint32_t pixel_unpack_buffer_target() noexcept;
|
||||
[[nodiscard]] std::uint32_t pixel_buffer_stream_read_usage() noexcept;
|
||||
[[nodiscard]] std::uint32_t pixel_buffer_map_read_access() 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_blit_filter(bool linear) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user