summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-07 19:24:25 +0200
committerwm4 <wm4@nowhere>2017-08-07 19:24:25 +0200
commit168ffbaf23a26699140e3588dc80a6cd30cb59a9 (patch)
tree24d46834879ac1e182af5555764bc577653f85a6
parentd45fbecbb5d8ba2c782cc419fa386f78b9473d82 (diff)
downloadmpv-168ffbaf23a26699140e3588dc80a6cd30cb59a9.tar.bz2
mpv-168ffbaf23a26699140e3588dc80a6cd30cb59a9.tar.xz
client API: more opengl_cb clarifications
Also fix a typo in ra_gl.c. Too greedy for a separate commit.
-rw-r--r--libmpv/opengl_cb.h11
-rw-r--r--video/out/opengl/ra_gl.c2
2 files changed, 8 insertions, 5 deletions
diff --git a/libmpv/opengl_cb.h b/libmpv/opengl_cb.h
index 7d3a64e604..799e353a41 100644
--- a/libmpv/opengl_cb.h
+++ b/libmpv/opengl_cb.h
@@ -68,9 +68,11 @@ extern "C" {
* defaults. Likewise, mpv will attempt to leave the OpenGL context with
* 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)
+ * - the glViewport state
+ * - the glScissor state (but GL_SCISSOR_TEST is in its default value)
+ * - glBlendFuncSeparate() state (but GL_BLEND is in its default value)
+ * - glClearColor() state
+ * - mpv may overwrite the callback set with glDebugMessageCallback()
* - mpv always disables GL_DITHER at init
*
* Messing with the state could be avoided by creating shared OpenGL contexts,
@@ -78,7 +80,8 @@ extern "C" {
*
* On OpenGL 2.1, mpv will strictly call functions like glGenTextures() to
* create OpenGL objects. You will have to do the same. This ensures that
- * objects created by mpv and the API users don't clash.
+ * objects created by mpv and the API users don't clash. Also, legacy state
+ * must be either in its defaults, or not interfere with core state.
*
* Threading
* ---------
diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c
index f0b47c795e..6509d9043a 100644
--- a/video/out/opengl/ra_gl.c
+++ b/video/out/opengl/ra_gl.c
@@ -235,7 +235,7 @@ static struct ra_tex *gl_tex_create(struct ra *ra,
gl->GenFramebuffers(1, &tex_gl->fbo);
gl->BindFramebuffer(GL_FRAMEBUFFER, tex_gl->fbo);
gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, tex_gl->texture, 0);
+ GL_TEXTURE_2D, tex_gl->texture, 0);
GLenum err = gl->CheckFramebufferStatus(GL_FRAMEBUFFER);
gl->BindFramebuffer(GL_FRAMEBUFFER, 0);