diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-02 20:20:48 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-02 20:20:48 +0000 |
commit | 18011824acbc4b7d6c104b4f7df50d5b9813be5e (patch) | |
tree | 912b11dbaeb1072a7a2c574348f91c4879bf218a /libvo | |
parent | 2feef89fceaea12b75efee387f7aceb5dd4e5148 (diff) |
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
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_gl.c | 8 |
1 files changed, 3 insertions, 5 deletions
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"); |