changeset 36212:a19b74774033

SwapInterval support for GLES/EGL.
author reimar
date Sun, 09 Jun 2013 09:46:20 +0000
parents 40a06b268bb6
children d05b680f78d6
files libvo/gl_common.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.c	Sun Jun 09 09:40:27 2013 +0000
+++ b/libvo/gl_common.c	Sun Jun 09 09:46:20 2013 +0000
@@ -2422,6 +2422,10 @@
 static void GLAPIENTRY dummy_texenvi(GLenum t, GLenum p, GLint v) {
 }
 
+static int GLAPIENTRY SwapInterval_egl(int i) {
+  return eglSwapInterval(eglDisplay, i);
+}
+
 static int setGlWindow_egl(MPGLContext *ctx)
 {
   static const EGLint cfg_attribs[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE };
@@ -2538,6 +2542,7 @@
   getFunctions(eglgpa, eglQueryString(eglDisplay, EGL_EXTENSIONS));
   mpglBegin = NULL;
   mpglDrawBuffer = NULL;
+  mpglSwapInterval = SwapInterval_egl;
 
   gpu_def_sl_program = new_gpu_program();
   gpu_yuv_sl_program = new_gpu_program();