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