From 82ff0dc96964adc782897abe09cfad5e0625ba26 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 14 Nov 2024 14:58:38 -0800 Subject: [PATCH] [Impeller] libImpeller: Add a warning about OpenGL state being trampled. --- impeller/toolkit/interop/impeller.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/impeller/toolkit/interop/impeller.h b/impeller/toolkit/interop/impeller.h index aed8a8beb1ea7..fe1b3bb98094f 100644 --- a/impeller/toolkit/interop/impeller.h +++ b/impeller/toolkit/interop/impeller.h @@ -689,6 +689,14 @@ void ImpellerSurfaceRelease(ImpellerSurface IMPELLER_NULLABLE surface); /// @brief Draw a display list onto the surface. The same display list can /// be drawn multiple times to different surfaces. /// +/// @warning In the OpenGL backend, Impeller will not make an effort to +/// preserve the OpenGL state that is current in the context. +/// Embedders that perform additional OpenGL operations in the +/// context should expect the reset state after control transitions +/// back to them. Key state to watch out for would be the viewports, +/// stencil rects, test toggles, resource (texture, framebuffer, +/// buffer) bindings, etc... +/// /// @param[in] surface The surface to draw the display list to. /// @param[in] display_list The display list to draw onto the surface. ///