Map renderer viewport and scissor to OpenGL
This commit is contained in:
@@ -34,6 +34,23 @@ struct OpenGlTextureParameter {
|
||||
std::uint32_t value = 0;
|
||||
};
|
||||
|
||||
struct OpenGlViewportRect {
|
||||
std::int32_t x = 0;
|
||||
std::int32_t y = 0;
|
||||
std::int32_t width = 0;
|
||||
std::int32_t height = 0;
|
||||
float min_depth = 0.0F;
|
||||
float max_depth = 1.0F;
|
||||
};
|
||||
|
||||
struct OpenGlScissorRect {
|
||||
std::uint8_t enabled = 0;
|
||||
std::int32_t x = 0;
|
||||
std::int32_t y = 0;
|
||||
std::int32_t width = 0;
|
||||
std::int32_t height = 0;
|
||||
};
|
||||
|
||||
struct OpenGlEnumMapping {
|
||||
std::uint32_t value = 0;
|
||||
bool supported = false;
|
||||
@@ -158,6 +175,8 @@ struct OpenGlWindowsWglContextConfig {
|
||||
[[nodiscard]] std::uint32_t renderer_string_name() noexcept;
|
||||
[[nodiscard]] std::uint32_t shading_language_version_string_name() noexcept;
|
||||
[[nodiscard]] std::uint32_t viewport_query() noexcept;
|
||||
[[nodiscard]] OpenGlViewportRect viewport_for_renderer_viewport(
|
||||
pp::renderer::Viewport viewport) noexcept;
|
||||
[[nodiscard]] std::uint32_t color_clear_value_query() noexcept;
|
||||
[[nodiscard]] std::uint32_t current_program_query() noexcept;
|
||||
[[nodiscard]] std::uint32_t active_texture_query() noexcept;
|
||||
@@ -171,6 +190,8 @@ struct OpenGlWindowsWglContextConfig {
|
||||
[[nodiscard]] OpenGlDepthState depth_state_for_renderer_depth_state(
|
||||
pp::renderer::DepthState state) noexcept;
|
||||
[[nodiscard]] std::uint32_t scissor_test_state() noexcept;
|
||||
[[nodiscard]] OpenGlScissorRect scissor_rect_for_renderer_scissor(
|
||||
pp::renderer::ScissorRect scissor) noexcept;
|
||||
[[nodiscard]] std::uint32_t program_point_size_state() noexcept;
|
||||
[[nodiscard]] std::uint32_t line_smooth_state() noexcept;
|
||||
[[nodiscard]] std::uint32_t source_alpha_blend_factor() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user