comparison libvo/vo_gl.c @ 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
comparison
equal deleted inserted replaced
30445:72e1e6824499 30446:f77e32f1ecc0
471 * set global gl-related variables to their default values 471 * set global gl-related variables to their default values
472 */ 472 */
473 static int initGl(uint32_t d_width, uint32_t d_height) { 473 static int initGl(uint32_t d_width, uint32_t d_height) {
474 int scale_type = mipmap_gen ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR; 474 int scale_type = mipmap_gen ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR;
475 autodetectGlExtensions(); 475 autodetectGlExtensions();
476 gl_target = use_rectangle == 1 ? GL_TEXTURE_RECTANGLE : GL_TEXTURE_2D;
477 yuvconvtype = use_yuv | lscale << YUV_LUM_SCALER_SHIFT | cscale << YUV_CHROM_SCALER_SHIFT;
478
476 texSize(image_width, image_height, &texture_width, &texture_height); 479 texSize(image_width, image_height, &texture_width, &texture_height);
477 480
478 Disable(GL_BLEND); 481 Disable(GL_BLEND);
479 Disable(GL_DEPTH_TEST); 482 Disable(GL_DEPTH_TEST);
480 DepthMask(GL_FALSE); 483 DepthMask(GL_FALSE);
1146 " osdcolor=<0xAARRGGBB>\n" 1149 " osdcolor=<0xAARRGGBB>\n"
1147 " use the given color for the OSD\n" 1150 " use the given color for the OSD\n"
1148 "\n" ); 1151 "\n" );
1149 return -1; 1152 return -1;
1150 } 1153 }
1151 if (use_rectangle == 1)
1152 gl_target = GL_TEXTURE_RECTANGLE;
1153 else
1154 gl_target = GL_TEXTURE_2D;
1155 yuvconvtype = use_yuv | lscale << YUV_LUM_SCALER_SHIFT | cscale << YUV_CHROM_SCALER_SHIFT;
1156 if (many_fmts) 1154 if (many_fmts)
1157 mp_msg(MSGT_VO, MSGL_INFO, "[gl] using extended formats. " 1155 mp_msg(MSGT_VO, MSGL_INFO, "[gl] using extended formats. "
1158 "Use -vo gl:nomanyfmts if playback fails.\n"); 1156 "Use -vo gl:nomanyfmts if playback fails.\n");
1159 mp_msg(MSGT_VO, MSGL_V, "[gl] Using %d as slice height " 1157 mp_msg(MSGT_VO, MSGL_V, "[gl] Using %d as slice height "
1160 "(0 means image height).\n", slice_height); 1158 "(0 means image height).\n", slice_height);