Route grid render state through GL backend
This commit is contained in:
@@ -503,6 +503,18 @@ pp::foundation::Status clear_opengl_color_buffer_with_write_mask(
|
||||
return pp::foundation::Status::success();
|
||||
}
|
||||
|
||||
pp::foundation::Status apply_opengl_color_write_mask(
|
||||
OpenGlColorWriteMask mask,
|
||||
OpenGlColorWriteMaskDispatch dispatch) noexcept
|
||||
{
|
||||
if (dispatch.color_mask == nullptr) {
|
||||
return pp::foundation::Status::invalid_argument("OpenGL color-write-mask dispatch callback must not be null");
|
||||
}
|
||||
|
||||
dispatch.color_mask(mask.r, mask.g, mask.b, mask.a);
|
||||
return pp::foundation::Status::success();
|
||||
}
|
||||
|
||||
pp::foundation::Status activate_opengl_texture_unit(
|
||||
std::uint32_t unit_index,
|
||||
OpenGlActiveTextureDispatch dispatch) noexcept
|
||||
|
||||
@@ -575,6 +575,10 @@ struct OpenGlColorMaskedClearDispatch {
|
||||
OpenGlClearFn clear = nullptr;
|
||||
};
|
||||
|
||||
struct OpenGlColorWriteMaskDispatch {
|
||||
OpenGlColorMaskFn color_mask = nullptr;
|
||||
};
|
||||
|
||||
struct OpenGlViewportDispatch {
|
||||
OpenGlViewportFn viewport = nullptr;
|
||||
};
|
||||
@@ -883,6 +887,9 @@ struct OpenGlMeshDeleteDispatch {
|
||||
[[nodiscard]] pp::foundation::Status clear_opengl_color_buffer_with_write_mask(
|
||||
OpenGlColorMaskedClear clear,
|
||||
OpenGlColorMaskedClearDispatch dispatch) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status apply_opengl_color_write_mask(
|
||||
OpenGlColorWriteMask mask,
|
||||
OpenGlColorWriteMaskDispatch dispatch) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status activate_opengl_texture_unit(
|
||||
std::uint32_t unit_index,
|
||||
OpenGlActiveTextureDispatch dispatch) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user