From 18011824acbc4b7d6c104b4f7df50d5b9813be5e Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 2 Feb 2010 20:20:48 +0000 Subject: Avoid using options before autodetectGlExtensions to allow it to change them properly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30488 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libvo/vo_gl.c') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 9221f86c73..5a7868b656 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -473,6 +473,9 @@ static void autodetectGlExtensions(void) { 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 @@ static int preinit(const char *arg) "\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"); -- cgit v1.2.3