Map renderer depth state to OpenGL
This commit is contained in:
@@ -733,6 +733,17 @@ OpenGlEnumMapping compare_function_for_renderer_compare_op(pp::renderer::Compare
|
||||
}
|
||||
}
|
||||
|
||||
OpenGlDepthState depth_state_for_renderer_depth_state(pp::renderer::DepthState state) noexcept
|
||||
{
|
||||
const auto compare_function = compare_function_for_renderer_compare_op(state.compare);
|
||||
return OpenGlDepthState {
|
||||
.test_enabled = state.test_enabled ? gl_boolean_true : gl_boolean_false,
|
||||
.write_enabled = state.write_enabled ? gl_boolean_true : gl_boolean_false,
|
||||
.compare_function = compare_function.value,
|
||||
.supported = compare_function.supported,
|
||||
};
|
||||
}
|
||||
|
||||
std::uint32_t scissor_test_state() noexcept
|
||||
{
|
||||
return gl_scissor_test;
|
||||
|
||||
Reference in New Issue
Block a user