mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01:00
Rename GL_* defines to CONFIG_GL_*
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30065 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0aac4fa9dc
commit
f97fd3eff0
8
configure
vendored
8
configure
vendored
@ -4941,18 +4941,18 @@ if test "$_gl" = yes ; then
|
||||
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"
|
||||
|
@ -1538,7 +1538,7 @@ void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
|
||||
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 @@ static void swapGlBuffers_w32(MPGLContext *ctx) {
|
||||
vo_w32_release_dc(vo_w32_window, vo_hdc);
|
||||
}
|
||||
#endif
|
||||
#ifdef GL_X11
|
||||
#ifdef CONFIG_GL_X11
|
||||
#ifdef HAVE_LIBDL
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
@ -1807,7 +1807,7 @@ int init_mpglcontext(MPGLContext *ctx, enum MPGLType type) {
|
||||
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 @@ int init_mpglcontext(MPGLContext *ctx, enum MPGLType type) {
|
||||
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 @@ int init_mpglcontext(MPGLContext *ctx, enum MPGLType type) {
|
||||
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;
|
||||
|
@ -27,12 +27,12 @@
|
||||
|
||||
#include "video_out.h"
|
||||
|
||||
#ifdef GL_WIN32
|
||||
#ifdef CONFIG_GL_WIN32
|
||||
#include <windows.h>
|
||||
#include <GL/gl.h>
|
||||
#include "w32_common.h"
|
||||
#endif
|
||||
#ifdef GL_X11
|
||||
#ifdef CONFIG_GL_X11
|
||||
#include <GL/gl.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <GL/glx.h>
|
||||
@ -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 @@ typedef struct MPGLContext {
|
||||
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;
|
||||
|
@ -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;
|
||||
|
@ -107,7 +107,7 @@ struct TexSquare
|
||||
static GLint getInternalFormat(void)
|
||||
{
|
||||
switch (glctx.type) {
|
||||
#ifdef GL_WIN32
|
||||
#ifdef CONFIG_GL_WIN32
|
||||
case GLTYPE_W32:
|
||||
{
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
@ -125,7 +125,7 @@ static GLint getInternalFormat(void)
|
||||
}
|
||||
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_15(int x0,int y0, int w,int h, unsigned char* src, unsign
|
||||
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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
|
||||
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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
|
||||
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 int gl_handlekey(int key)
|
||||
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 @@ static int preinit(const char *arg)
|
||||
{
|
||||
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 @@ static int control(uint32_t request, void *data, ...)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user