From 140de2a9e2a7a057ff58254eb3d0eafe0754ae24 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 19 Dec 2009 10:52:32 +0000 Subject: Make the check for X11 and WIN32 backends for OpenGL separate. This fixes compilation on Windows with X11 but no GLX available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30063 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libvo/vo_gl.c') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index ccb44e1882..cc1c9bcca5 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -48,7 +48,7 @@ static const vo_info_t info = const LIBVO_EXTERN(gl) -#ifdef CONFIG_X11 +#ifdef GL_X11 static int wsGLXAttrib[] = { GLX_RGBA, GLX_RED_SIZE,1, GLX_GREEN_SIZE,1, @@ -428,7 +428,7 @@ static void uninitGl(void) { DeleteBuffers(2, gl_buffer_uv); gl_buffer_uv[0] = gl_buffer_uv[1] = 0; gl_buffersize_uv = 0; gl_bufferptr_uv[0] = gl_bufferptr_uv[1] = 0; -#ifdef CONFIG_X11 +#ifdef GL_X11 if (mesa_bufferptr) FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr); #endif @@ -545,7 +545,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin if (glctx.type == GLTYPE_W32 && !vo_w32_config(d_width, d_height, flags)) return -1; #endif -#ifdef CONFIG_X11 +#ifdef GL_X11 if (glctx.type == GLTYPE_X11) { XVisualInfo *vinfo=glXChooseVisual( mDisplay,mScreen,wsGLXAttrib ); if (vinfo == NULL) @@ -774,7 +774,7 @@ static uint32_t get_image(mp_image_t *mpi) { mpi->stride[0] = mpi->width * mpi->bpp / 8; needed_size = mpi->stride[0] * mpi->height; if (mesa_buffer) { -#ifdef CONFIG_X11 +#ifdef GL_X11 if (mesa_bufferptr && needed_size > mesa_buffersize) { FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr); mesa_bufferptr = NULL; -- cgit v1.2.3 From f97fd3eff02bd1048750f350230d9e9192ea3dfd Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 19 Dec 2009 13:49:44 +0000 Subject: Rename GL_* defines to CONFIG_GL_* git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30065 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libvo/vo_gl.c') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index cc1c9bcca5..6ddb405f36 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -48,7 +48,7 @@ static const vo_info_t info = const LIBVO_EXTERN(gl) -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 static int wsGLXAttrib[] = { GLX_RGBA, GLX_RED_SIZE,1, GLX_GREEN_SIZE,1, @@ -428,7 +428,7 @@ static void uninitGl(void) { DeleteBuffers(2, gl_buffer_uv); gl_buffer_uv[0] = gl_buffer_uv[1] = 0; gl_buffersize_uv = 0; gl_bufferptr_uv[0] = gl_bufferptr_uv[1] = 0; -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 if (mesa_bufferptr) FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr); #endif @@ -541,11 +541,11 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin goto glconfig; } #endif -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 if (glctx.type == GLTYPE_W32 && !vo_w32_config(d_width, d_height, flags)) return -1; #endif -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 if (glctx.type == GLTYPE_X11) { XVisualInfo *vinfo=glXChooseVisual( mDisplay,mScreen,wsGLXAttrib ); if (vinfo == NULL) @@ -774,7 +774,7 @@ static uint32_t get_image(mp_image_t *mpi) { mpi->stride[0] = mpi->width * mpi->bpp / 8; needed_size = mpi->stride[0] * mpi->height; if (mesa_buffer) { -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 if (mesa_bufferptr && needed_size > mesa_buffersize) { FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr); mesa_bufferptr = NULL; @@ -1002,7 +1002,7 @@ static int preinit(const char *arg) { enum MPGLType gltype = GLTYPE_X11; // set defaults -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 gltype = GLTYPE_W32; #endif many_fmts = 1; -- cgit v1.2.3