changeset 30446:f77e32f1ecc0

Avoid using options before autodetectGlExtensions to allow it to change them properly.
author reimar
date Tue, 02 Feb 2010 20:20:48 +0000
parents 72e1e6824499
children c84c27c3eafb
files libvo/vo_gl.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_gl.c	Tue Feb 02 20:16:57 2010 +0000
+++ b/libvo/vo_gl.c	Tue Feb 02 20:20:48 2010 +0000
@@ -473,6 +473,9 @@
 static int initGl(uint32_t d_width, uint32_t d_height) {
   int scale_type = mipmap_gen ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR;
   autodetectGlExtensions();
+  gl_target = use_rectangle == 1 ? GL_TEXTURE_RECTANGLE : GL_TEXTURE_2D;
+  yuvconvtype = use_yuv | lscale << YUV_LUM_SCALER_SHIFT | cscale << YUV_CHROM_SCALER_SHIFT;
+
   texSize(image_width, image_height, &texture_width, &texture_height);
 
   Disable(GL_BLEND);
@@ -1148,11 +1151,6 @@
               "\n" );
       return -1;
     }
-    if (use_rectangle == 1)
-      gl_target = GL_TEXTURE_RECTANGLE;
-    else
-      gl_target = GL_TEXTURE_2D;
-    yuvconvtype = use_yuv | lscale << YUV_LUM_SCALER_SHIFT | cscale << YUV_CHROM_SCALER_SHIFT;
     if (many_fmts)
       mp_msg(MSGT_VO, MSGL_INFO, "[gl] using extended formats. "
                "Use -vo gl:nomanyfmts if playback fails.\n");