From e34957940b5012dba23616469fb5aec56fcde5ee Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 21 Jan 2015 20:32:42 +0100 Subject: vo_opengl: cleanups after vo_opengl_old removal Don't load all the legacy functions (including ancient extensions). Slightly simplify function loader and context creation, now that legacy GL doesn't need to be handled. Remove the code for drawing OSD in legacy mode. Remove all the header hacks, which were meant for ancient OpenGL headers which didn't even support things like OpenGL 1.3. Instead, adjust the GLX check to make sure we get both OpenGL 3x and 2.1 symbols. For win32 and OSX, we assume that the user has the latest headers anyway. For wayland, we hope that things somehow go right. --- video/out/gl_common.h | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'video/out/gl_common.h') diff --git a/video/out/gl_common.h b/video/out/gl_common.h index 92ba81a249..81437b0852 100644 --- a/video/out/gl_common.h +++ b/video/out/gl_common.h @@ -55,7 +55,6 @@ struct GL; typedef struct GL GL; -void glAdjustAlignment(GL *gl, int stride); int glFmt2bpp(GLenum format, GLenum type); void glUploadTex(GL *gl, GLenum target, GLenum format, GLenum type, const void *dataptr, int stride, @@ -68,8 +67,6 @@ void glCheckError(GL *gl, struct mp_log *log, const char *info); mp_image_t *glGetWindowScreenshot(GL *gl); enum { - MPGL_CAP_GL_LEGACY = (1 << 1), // GL 1.1 (excluding 3.x) - MPGL_CAP_GL21 = (1 << 3), // GL 2.1+ (excluding legacy) MPGL_CAP_ROW_LENGTH = (1 << 4), // GL_[UN]PACK_ROW_LENGTH MPGL_CAP_FB = (1 << 5), MPGL_CAP_VAO = (1 << 6), @@ -142,8 +139,7 @@ bool mpgl_is_thread_safe(MPGLContext *ctx); // gl_flavor: 110 for legacy GL, 210 for GL 2.1 or 3.x core // flags: passed to the backend's create window function // Returns success. -MPGLContext *mpgl_init(struct vo *vo, const char *backend_name, - int gl_flavor, int vo_flags); +MPGLContext *mpgl_init(struct vo *vo, const char *backend_name, int vo_flags); void mpgl_uninit(MPGLContext *ctx); // flags: passed to the backend function @@ -184,26 +180,10 @@ struct GL { int mpgl_caps; // Bitfield of MPGL_CAP_* constants bool debug_context; // use of e.g. GLX_CONTEXT_DEBUG_BIT_ARB - void (GLAPIENTRY *Begin)(GLenum); - void (GLAPIENTRY *End)(void); void (GLAPIENTRY *Viewport)(GLint, GLint, GLsizei, GLsizei); - void (GLAPIENTRY *MatrixMode)(GLenum); - void (GLAPIENTRY *LoadIdentity)(void); - void (GLAPIENTRY *Translated)(double, double, double); - void (GLAPIENTRY *Scaled)(double, double, double); - void (GLAPIENTRY *Ortho)(double, double, double, double, double,double); - void (GLAPIENTRY *PushMatrix)(void); - void (GLAPIENTRY *PopMatrix)(void); void (GLAPIENTRY *Clear)(GLbitfield); - GLuint (GLAPIENTRY *GenLists)(GLsizei); - void (GLAPIENTRY *DeleteLists)(GLuint, GLsizei); - void (GLAPIENTRY *NewList)(GLuint, GLenum); - void (GLAPIENTRY *EndList)(void); - void (GLAPIENTRY *CallList)(GLuint); - void (GLAPIENTRY *CallLists)(GLsizei, GLenum, const GLvoid *); void (GLAPIENTRY *GenTextures)(GLsizei, GLuint *); void (GLAPIENTRY *DeleteTextures)(GLsizei, const GLuint *); - void (GLAPIENTRY *TexEnvi)(GLenum, GLenum, GLint); void (GLAPIENTRY *Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte); void (GLAPIENTRY *Color4f)(GLfloat, GLfloat, GLfloat, GLfloat); void (GLAPIENTRY *ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf); @@ -211,8 +191,6 @@ struct GL { void (GLAPIENTRY *Disable)(GLenum); const GLubyte *(GLAPIENTRY * GetString)(GLenum); void (GLAPIENTRY *DrawBuffer)(GLenum); - void (GLAPIENTRY *DepthMask)(GLboolean); - void (GLAPIENTRY *BlendFunc)(GLenum, GLenum); void (GLAPIENTRY *BlendFuncSeparate)(GLenum, GLenum, GLenum, GLenum); void (GLAPIENTRY *Flush)(void); void (GLAPIENTRY *Finish)(void); @@ -226,27 +204,15 @@ struct GL { const GLvoid *); void (GLAPIENTRY *GetTexImage)(GLenum, GLint, GLenum, GLenum, GLvoid *); void (GLAPIENTRY *TexParameteri)(GLenum, GLenum, GLint); - void (GLAPIENTRY *TexParameterf)(GLenum, GLenum, GLfloat); - void (GLAPIENTRY *TexParameterfv)(GLenum, GLenum, const GLfloat *); - void (GLAPIENTRY *TexCoord2f)(GLfloat, GLfloat); - void (GLAPIENTRY *TexCoord2fv)(const GLfloat *); - void (GLAPIENTRY *Vertex2f)(GLfloat, GLfloat); void (GLAPIENTRY *GetIntegerv)(GLenum, GLint *); void (GLAPIENTRY *GetBooleanv)(GLenum, GLboolean *); - void (GLAPIENTRY *ColorMask)(GLboolean, GLboolean, GLboolean, GLboolean); void (GLAPIENTRY *ReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *); void (GLAPIENTRY *ReadBuffer)(GLenum); - void (GLAPIENTRY *VertexPointer)(GLint, GLenum, GLsizei, const GLvoid *); - void (GLAPIENTRY *ColorPointer)(GLint, GLenum, GLsizei, const GLvoid *); - void (GLAPIENTRY *TexCoordPointer)(GLint, GLenum, GLsizei, const GLvoid *); void (GLAPIENTRY *DrawArrays)(GLenum, GLint, GLsizei); - void (GLAPIENTRY *EnableClientState)(GLenum); - void (GLAPIENTRY *DisableClientState)(GLenum); GLenum (GLAPIENTRY *GetError)(void); void (GLAPIENTRY *GetTexLevelParameteriv)(GLenum, GLint, GLenum, GLint *); - void (GLAPIENTRY *GenBuffers)(GLsizei, GLuint *); void (GLAPIENTRY *DeleteBuffers)(GLsizei, const GLuint *); void (GLAPIENTRY *BindBuffer)(GLenum, GLuint); @@ -255,14 +221,6 @@ struct GL { void (GLAPIENTRY *BufferData)(GLenum, intptr_t, const GLvoid *, GLenum); void (GLAPIENTRY *ActiveTexture)(GLenum); void (GLAPIENTRY *BindTexture)(GLenum, GLuint); - void (GLAPIENTRY *MultiTexCoord2f)(GLenum, GLfloat, GLfloat); - void (GLAPIENTRY *GenPrograms)(GLsizei, GLuint *); - void (GLAPIENTRY *DeletePrograms)(GLsizei, const GLuint *); - void (GLAPIENTRY *BindProgram)(GLenum, GLuint); - void (GLAPIENTRY *ProgramString)(GLenum, GLenum, GLsizei, const GLvoid *); - void (GLAPIENTRY *GetProgramivARB)(GLenum, GLenum, GLint *); - void (GLAPIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat, - GLfloat, GLfloat); int (GLAPIENTRY *SwapInterval)(int); void (GLAPIENTRY *TexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, -- cgit v1.2.3