From dddda6e4a5353f1e5518bca175b523f1231fa700 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 5 Aug 2017 15:17:18 +0200 Subject: vo_opengl: move GL state resetting to vo_opengl_cb This code is pretty much for the sake of vo_opengl_cb API users. It resets certain state that either the user or our code doesn't reset correctly. This is somewhat outdated. With GL implicit state being so awfully large, it seems more reasonable require that any code restores the default state when returning to the caller. Some exceptions are defined in opengl_cb.h. --- libmpv/opengl_cb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libmpv') diff --git a/libmpv/opengl_cb.h b/libmpv/opengl_cb.h index fb8b928889..7d3a64e604 100644 --- a/libmpv/opengl_cb.h +++ b/libmpv/opengl_cb.h @@ -69,6 +69,9 @@ extern "C" { * standard defaults. The following state is excluded from this: * * - the current viewport (can have/is set to an arbitrary value) + * - the glScissor state (but GL_SCISSOR_TEST is expected disabled) + * - glBlendFuncSeparate() state (but GL_BLEND is expected disabled) + * - mpv always disables GL_DITHER at init * * Messing with the state could be avoided by creating shared OpenGL contexts, * but this is avoided for the sake of compatibility and interoperability. -- cgit v1.2.3