1 /* 2 * GStreamer 3 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 /* 21 * Cogl 22 * 23 * An object oriented GL/GLES Abstraction/Utility Layer 24 * 25 * Copyright (C) 2009 Intel Corporation. 26 * 27 * This library is free software; you can redistribute it and/or 28 * modify it under the terms of the GNU Lesser General Public 29 * License as published by the Free Software Foundation; either 30 * version 2 of the License, or (at your option) any later version. 31 * 32 * This library is distributed in the hope that it will be useful, 33 * but WITHOUT ANY WARRANTY; without even the implied warranty of 34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 35 * Lesser General Public License for more details. 36 * 37 * You should have received a copy of the GNU Lesser General Public 38 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 39 * 40 * 41 */ 42 43 #ifndef __GST_GL_FEATURE_PRIVATE_H__ 44 #define __GST_GL_FEATURE_PRIVATE_H__ 45 46 #include <gst/gst.h> 47 48 #include <gst/gl/gstgl_fwd.h> 49 50 G_BEGIN_DECLS 51 52 typedef struct _GstGLFeatureFunction GstGLFeatureFunction; 53 54 struct _GstGLFeatureFunction 55 { 56 /* The name of the function without the "EXT" or "ARB" suffix */ 57 const char *name; 58 /* The offset in the context of where to store the function pointer */ 59 unsigned int pointer_offset; 60 }; 61 62 typedef struct _GstGLFeatureData GstGLFeatureData; 63 64 struct _GstGLFeatureData 65 { 66 /* name of the feature */ 67 const char *feature_name; 68 /* Flags specifying which versions of GL the feature is available 69 in core in */ 70 GstGLAPI gl_availability; 71 /* A minimum GL version which the functions should be defined in 72 without needing an extension. Set to 255, 255 if it's only 73 provided in an extension */ 74 int min_gl_major, min_gl_minor; 75 /* A minimum GLES version which the functions should be defined in 76 without needing an extension. Set to 255, 255 if it's only 77 provided in an extension */ 78 int min_gles_major, min_gles_minor; 79 /* \0 separated list of namespaces to try. Eg "EXT\0ARB\0" */ 80 const char *namespaces; 81 /* \0 separated list of required extension names without the GL_EXT 82 or GL_ARB prefix. Any of the extensions must be available for the 83 feature to be considered available. If the suffix for an 84 extension is different from the namespace, you can specify it 85 with a ':' after the namespace */ 86 const char *extension_names; 87 /* A list of functions required for this feature. Terminated with a 88 NULL name */ 89 const GstGLFeatureFunction *functions; 90 }; 91 92 G_GNUC_INTERNAL gboolean 93 _gst_gl_feature_check (GstGLContext *context, 94 const char *driver_prefix, 95 const GstGLFeatureData *data, 96 int gl_major, 97 int gl_minor, 98 const char *extensions_string); 99 100 G_GNUC_INTERNAL void 101 _gst_gl_feature_check_ext_functions (GstGLContext *context, 102 int gl_major, 103 int gl_minor, 104 const char *gl_extensions); 105 106 G_END_DECLS 107 108 #endif /* __GST_GL_FEATURE_PRIVATE_H__ */ 109