# HG changeset patch # User reimar # Date 1261230584 0 # Node ID b7a703cf91782752172e11de65abffa192900edf # Parent d6a9eeff0125663ecaa03534f4d9be324c9ee0cb Rename GL_* defines to CONFIG_GL_* diff -r d6a9eeff0125 -r b7a703cf9178 configure --- a/configure Sat Dec 19 13:46:34 2009 +0000 +++ b/configure Sat Dec 19 13:49:44 2009 +0000 @@ -4941,18 +4941,18 @@ def_gl='#define CONFIG_GL 1' _res_comment="backends:" if test "$_gl_win32" = yes ; then - def_gl_win32='#define GL_WIN32 1' + def_gl_win32='#define CONFIG_GL_WIN32 1' _res_comment="$_res_comment win32" fi if test "$_gl_x11" = yes ; then - def_gl_x11='#define GL_X11 1' + def_gl_x11='#define CONFIG_GL_X11 1' _res_comment="$_res_comment x11" fi _vomodules="opengl $_vomodules" else def_gl='#undef CONFIG_GL' - def_gl_win32='#undef GL_WIN32' - def_gl_x11='#undef GL_X11' + def_gl_win32='#undef CONFIG_GL_WIN32' + def_gl_x11='#undef CONFIG_GL_X11' _novomodules="opengl $_novomodules" fi echores "$_gl" diff -r d6a9eeff0125 -r b7a703cf9178 libvo/gl_common.c --- a/libvo/gl_common.c Sat Dec 19 13:46:34 2009 +0000 +++ b/libvo/gl_common.c Sat Dec 19 13:49:44 2009 +0000 @@ -1538,7 +1538,7 @@ End(); } -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 #include "w32_common.h" /** * \brief little helper since wglGetProcAddress definition does not fit our @@ -1634,7 +1634,7 @@ vo_w32_release_dc(vo_w32_window, vo_hdc); } #endif -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 #ifdef HAVE_LIBDL #include #endif @@ -1807,7 +1807,7 @@ memset(ctx, 0, sizeof(*ctx)); ctx->type = type; switch (ctx->type) { -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 case GLTYPE_W32: ctx->setGlWindow = setGlWindow_w32; ctx->releaseGlContext = releaseGlContext_w32; @@ -1819,7 +1819,7 @@ ctx->ontop = vo_w32_ontop; return vo_w32_init(); #endif -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 case GLTYPE_X11: ctx->setGlWindow = setGlWindow_x11; ctx->releaseGlContext = releaseGlContext_x11; @@ -1839,12 +1839,12 @@ void uninit_mpglcontext(MPGLContext *ctx) { ctx->releaseGlContext(ctx); switch (ctx->type) { -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 case GLTYPE_W32: vo_w32_uninit(); break; #endif -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 case GLTYPE_X11: vo_x11_uninit(); break; diff -r d6a9eeff0125 -r b7a703cf9178 libvo/gl_common.h --- a/libvo/gl_common.h Sat Dec 19 13:46:34 2009 +0000 +++ b/libvo/gl_common.h Sat Dec 19 13:49:44 2009 +0000 @@ -27,12 +27,12 @@ #include "video_out.h" -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 #include #include #include "w32_common.h" #endif -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 #include #include #include @@ -43,7 +43,7 @@ #ifndef GLAPIENTRY #ifdef APIENTRY #define GLAPIENTRY APIENTRY -#elif defined(GL_WIN32) +#elif defined(CONFIG_GL_WIN32) #define GLAPIENTRY __stdcall #else #define GLAPIENTRY @@ -362,15 +362,15 @@ enum MPGLType type; union { int w32; -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 XVisualInfo *x11; #endif } vinfo; union { -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 HGLRC w32; #endif -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 GLXContext x11; #endif } context; diff -r d6a9eeff0125 -r b7a703cf9178 libvo/vo_gl.c --- a/libvo/vo_gl.c Sat Dec 19 13:46:34 2009 +0000 +++ b/libvo/vo_gl.c Sat Dec 19 13:49:44 2009 +0000 @@ -48,7 +48,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ { enum MPGLType gltype = GLTYPE_X11; // set defaults -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 gltype = GLTYPE_W32; #endif many_fmts = 1; diff -r d6a9eeff0125 -r b7a703cf9178 libvo/vo_gl2.c --- a/libvo/vo_gl2.c Sat Dec 19 13:46:34 2009 +0000 +++ b/libvo/vo_gl2.c Sat Dec 19 13:49:44 2009 +0000 @@ -107,7 +107,7 @@ static GLint getInternalFormat(void) { switch (glctx.type) { -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 case GLTYPE_W32: { PIXELFORMATDESCRIPTOR pfd; @@ -125,7 +125,7 @@ } break; #endif -#ifdef GL_X11 +#ifdef CONFIG_GL_X11 case GLTYPE_X11: if (glXGetConfig(mDisplay, glctx.vinfo.x11, GLX_RED_SIZE, &r_sz) != 0) r_sz = 0; if (glXGetConfig(mDisplay, glctx.vinfo.x11, GLX_GREEN_SIZE, &g_sz) != 0) g_sz = 0; @@ -465,7 +465,7 @@ static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ } -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 static int config_w32(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) { if (!vo_w32_config(d_width, d_height, flags)) @@ -626,11 +626,11 @@ if (config_glx_gui(d_width, d_height) == -1) return -1; } -#ifndef GL_WIN32 +#ifndef CONFIG_GL_WIN32 else #endif #endif -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 if (config_w32(width, height, d_width, d_height, flags, title, format) == -1) #else if (config_glx(width, height, d_width, d_height, flags, title, format) == -1) @@ -680,7 +680,7 @@ return 0; } -#ifndef GL_WIN32 +#ifndef CONFIG_GL_WIN32 static int gl_handlekey(int key) { if(key=='a'||key=='A') { @@ -697,7 +697,7 @@ static void check_events(void) { int e; -#ifndef GL_WIN32 +#ifndef CONFIG_GL_WIN32 XEvent Event; char buf[100]; KeySym keySym; @@ -851,7 +851,7 @@ { enum MPGLType gltype = GLTYPE_X11; // set defaults -#ifdef GL_WIN32 +#ifdef CONFIG_GL_WIN32 gltype = GLTYPE_W32; #endif use_yuv = 0; @@ -905,7 +905,7 @@ case VOCTRL_SET_PANSCAN: resize(vo_dwidth, vo_dheight); return VO_TRUE; -#ifndef GL_WIN32 +#ifndef CONFIG_GL_WIN32 case VOCTRL_SET_EQUALIZER: { va_list ap;