2012-12-03 04:04:49 +00:00
|
|
|
/*
|
|
|
|
* GStreamer
|
|
|
|
* Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2012-12-06 06:40:47 +00:00
|
|
|
#ifndef __GST_GL_API_H__
|
|
|
|
#define __GST_GL_API_H__
|
2012-12-03 04:04:49 +00:00
|
|
|
|
|
|
|
/* OpenGL 2.0 for Embedded Systems */
|
2012-12-06 06:40:47 +00:00
|
|
|
#if HAVE_GLES2
|
2012-12-03 04:04:49 +00:00
|
|
|
# include <GLES2/gl2.h>
|
2012-12-06 06:40:47 +00:00
|
|
|
# include <GLES2/gl2ext.h>
|
2012-12-03 04:04:49 +00:00
|
|
|
# if !HAVE_OPENGL
|
|
|
|
# include "gstgles2.h"
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2012-12-06 06:40:47 +00:00
|
|
|
/* OpenGL for desktop systems */
|
2012-12-03 04:04:49 +00:00
|
|
|
#if HAVE_OPENGL
|
|
|
|
# if __APPLE__
|
|
|
|
# include <GL/glew.h>
|
|
|
|
# include <OpenGL/OpenGL.h>
|
|
|
|
# include <OpenGL/gl.h>
|
|
|
|
# else
|
|
|
|
# include <GL/glew.h>
|
|
|
|
# include <GL/gl.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_GLX
|
|
|
|
# include <GL/glx.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_EGL
|
|
|
|
# undef UNICODE
|
|
|
|
# include <EGL/egl.h>
|
|
|
|
# define UNICODE
|
|
|
|
#endif
|
|
|
|
|
2012-12-06 06:40:47 +00:00
|
|
|
#if HAVE_WGL
|
|
|
|
# undef UNICODE
|
|
|
|
# include <windows.h>
|
|
|
|
# define UNICODE
|
|
|
|
#endif
|
|
|
|
|
2012-12-03 04:04:49 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GST_GL_API_NONE = 0,
|
|
|
|
GST_GL_API_OPENGL = (1 << 0),
|
|
|
|
GST_GL_API_OPENGL3 = (1 << 1),
|
|
|
|
GST_GL_API_GLES = (1 << 15),
|
|
|
|
GST_GL_API_GLES2 = (1 << 16),
|
|
|
|
GST_GL_API_GLES3 = (1 << 17),
|
|
|
|
|
|
|
|
GST_GL_API_ANY = G_MAXUINT32
|
|
|
|
} GstGLAPI;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_GL_PLATFORM_UNKNOWN = 0,
|
2012-12-06 06:40:47 +00:00
|
|
|
GST_GL_PLATFORM_EGL = (1 << 0),
|
|
|
|
GST_GL_PLATFORM_GLX = (1 << 1),
|
|
|
|
GST_GL_PLATFORM_WGL = (1 << 2),
|
|
|
|
GST_GL_PLATFORM_CGL = (1 << 3),
|
2012-12-03 04:04:49 +00:00
|
|
|
|
2012-12-06 06:40:47 +00:00
|
|
|
GST_GL_PLATFORM_ANY = G_MAXUINT32
|
2012-12-03 04:04:49 +00:00
|
|
|
} GstGLPlatform;
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2012-12-06 06:40:47 +00:00
|
|
|
#endif /* __GST_GL_API_H__ */
|