/* * GStreamer * Copyright (C) 2012 Matthew Waters * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef __GST_GL_FUNCS_H__ #define __GST_GL_FUNCS_H__ #include /* This mimic GCC behaviour with system headers files even if GL headers may * not be in the system header path. */ #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wredundant-decls" #endif /* OpenGL 2.0 for Embedded Systems */ #if GST_GL_HAVE_GLES2 # if GST_GL_HAVE_PLATFORM_EAGL # include # include # else # if GST_GL_HAVE_GLES3 # include # if GST_GL_HAVE_GLES3EXT3_H # include # endif # include # else # include # include # endif # endif # if !GST_GL_HAVE_OPENGL # include # endif #endif /* OpenGL for desktop systems */ #if GST_GL_HAVE_OPENGL # ifdef __APPLE__ # include # include # if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 # define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED # include # endif # else # if defined(_MSC_VER) # include # endif # include # if defined(__WIN32__) || defined(_WIN32) # include # endif # endif #endif #ifdef __GNUC__ #pragma GCC diagnostic pop #endif #if defined(WINAPI) #define GSTGLAPI WINAPI #else #define GSTGLAPI #endif #include #include G_BEGIN_DECLS #define GST_GL_EXT_BEGIN(name, gl_availability, min_gl, maj_gl, gles_maj, \ gles_min, ext_suf, ext_name) #define GST_GL_EXT_FUNCTION(ret, name, args) \ ret (GSTGLAPI *name) args; #define GST_GL_EXT_END() typedef struct _GstGLFuncs { #include gpointer padding[GST_PADDING_LARGE*6]; } GstGLFuncs; #undef GST_GL_EXT_BEGIN #undef GST_GL_EXT_FUNCTION #undef GST_GL_EXT_END G_END_DECLS #endif /* __GST_GL_API_H__ */