Commit graph

35 commits

Author SHA1 Message Date
Nicolas Dufresne
4c19b415bd gl: Allow using non-system mesa with both GL and GLES
GCC automatically disable redundance warnings for system headers. As
soon as we start using a non-system installed mesa, we would start
having issues. The test for both wasn't setting any flags, so it would
work but then fail at runtime.

This is being fixed by disabling in the code (where needed only) that
GCC warning. The test is also fixed to avoid the false positive we had.
2015-12-15 19:28:22 -05:00
Matthew Waters
591494ff54 gl/api: use public rather than private define
HAVE_IOS is only defined for the build of this module so
attempting to use gstgl in iOS would result in incorrect GL
includes.
Use GST_GL_HAVE_PLATFORM_EAGL instead for choosing the iOS GL
header.
2015-09-10 00:33:19 +10:00
Julien Isorce
5e4b94c1bb gl: support cgl, egl and glx within a same build
On osx, with the same build,
gst-launch-1.0 videotestsrc ! glimagesink works with:

GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=gles2
GST_GL_PLATFORM=egl GST_GL_WINDOW=x11 GST_GL_API=opengl

GST_GL_PLATFORM=glx GST_GL_WINDOW=x11 GST_GL_API=opengl

GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl
GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa GST_GL_API=opengl3

https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 09:03:58 +01:00
Matthew Waters
26df88cd24 gl: consolidate egl header includes to egl-only headers
They may conflict with other headers.
2015-07-07 13:12:49 +10:00
Julien Isorce
5b003b68ca Revert "gl: add GstGLContextGPUProcess backend"
This reverts commit b377112ee3.
2015-06-19 13:08:49 +01:00
Julien Isorce
b377112ee3 gl: add GstGLContextGPUProcess backend
It builds its GL vtable from a proc address provided
by the application.
2015-05-27 17:22:40 +01:00
Lasse Laursen
174ea7af7b glapi: fix compilation with latest MSVC
https://bugzilla.gnome.org/show_bug.cgi?id=743041
2015-01-17 10:56:20 +11:00
Matthew Waters
6bd1150ca8 gl: remove the use of glu 2014-11-28 09:14:26 +11:00
Sebastian Dröge
9492db96d1 gl: Use numeric OSX version instead of the macro
The macro is not defined on older OSX versions and evaluates to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=740201
2014-11-16 11:00:57 +01:00
Julien Isorce
4307449449 gl/cocoa: include gl3.h to have GL_CONTEXT_PROFILE_MASK 2014-11-03 23:08:09 +00:00
Matthew Waters
14a3484b14 gl: add prototypes for KHR_debug/ARB_debug_output 2014-08-20 23:26:26 +10:00
Matthew Waters
d52ef19d7f gl: move gles2 compat header to glprototypes 2014-06-22 09:48:22 +10:00
Matthew Waters
da35876537 glfeature: remove GST_GL_API_GLES3
instead check the gl version using gst_gl_context_check_gl_version()
2014-05-30 10:29:37 +10:00
Julien Isorce
8fd840166b gl: use #ifdef instead of #if for __APPLE__
warning: "__APPLE__" is not defined [-Wundef]

with gcc version 4.7.2 20120731 (prerelease)
    (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08)
2014-04-23 21:09:58 +01:00
Sebastian Dröge
ae81268565 gl: Add support for iOS EAGL platform
https://bugzilla.gnome.org/show_bug.cgi?id=703341
2014-04-12 22:25:13 +02:00
Julien Isorce
0ae3c984aa gl: add EGLImage support
* picked from old libgstegl:
  - GstEGLImageMemory
  - GstEGLImageAllocator
  - last_buffer management from removed GstEGLImageBufferPool

* add-ons:
  - GstEGLImageMemory now old a reference on GstGLContext
    so that it can delete the EGLImage and its gltexture source
    while having the associated gl context being current.
  - add EGLImage support for GstVideoGLTextureUploadMeta which
    mainly call EGLImageTargetTexture2D
  - GstGLBufferPool now supports GstEGLImageAllocator
  - glimagesink / glfilters / etc.. now propose GstEGLImageAllocator
    to upstream

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 19:09:13 +00:00
Matthew Waters
3180899a98 gl: reorganize the extension headers by function rather than api 2014-03-23 00:39:43 +11:00
Julien Isorce
fa4ce072ee gl: silence warnings building for RPI related to 'vcos_*'
Similar than 1190a79b19
2014-03-19 14:43:13 +00:00
Julien Isorce
e870244e39 gl: keep only one occurence of '#include <EGL/egl.h>'
To simply maintainance if we need to put specific includes around it.
2014-03-19 14:43:13 +00:00
Matthew Waters
6527008c2a [903/906] api: add GstGLPlatform to/from string 2014-03-15 18:37:07 +01:00
Matthew Waters
767a3524ae [883/906] api: provide from_string()
Also s/gst_gl_api_string/gst_gl_api_to_string/g
2014-03-15 18:37:06 +01:00
Sebastian Dröge
228474806c [775/906] configure: Check for GLeglImageOES and others again
https://bugzilla.gnome.org/show_bug.cgi?id=704498
2014-03-15 18:37:00 +01:00
Sebastian Dröge
16a5316755 [738/906] gl: Include glu.h after gl.h 2014-03-15 18:36:58 +01:00
Sebastian Dröge
a5a46aa833 [733/906] gl: Major header and include cleanup 2014-03-15 18:36:57 +01:00
Julien Isorce
dd7e054e2c [732/906] build: fix repeated typedefs
Write forward declarations in another way to avoid
repeated typedefs "error: redefinition of typedef".
Raised when using i686-apple-darwin11-llvm-gcc-4.2
It seems that C apple compiler does not support
C11 feature.

https://bugzilla.gnome.org/show_bug.cgi?id=703885
2014-03-15 18:36:57 +01:00
Руслан Ижбулатов
89a6d7ef5d [722/906] gl: Fix build on Win32
1) Need to include GL/glext.h on W32 to provide necessary macros
2) W32 macros that pre-processor has by default are different for different
   toolchains. Borland uses __WIN32__, everyone else has _WIN32, so check both.

Side-note: glext.h is not supplied by mingw-w64 at the moment, but can be
downloaded from http://www.opengl.org/registry/

https://bugzilla.gnome.org/show_bug.cgi?id=703364
2014-03-15 18:36:57 +01:00
Matthew Waters
39e5b7c97f [681/906] win32: fix gl api calls on 32-bit
win has the bright idea of having 5 different calling conventions.
we should probably use the right one so we don't crash from stack
corruption.
2014-03-15 18:36:54 +01:00
Matthew Waters
7f3aaf504b [671/906] win32: #include GL/glext.h on windows
also add some GL default variables if some GL types are not defined
2014-03-15 18:36:54 +01:00
Matthew Waters
7b03a572d9 [647/906] remove dependecy on glew 2014-03-15 18:36:52 +01:00
Matthew Waters
fa3c3b8434 [642/906] add gstglconfig.h for apps to find out what our capabilites are
ie libgstgl can be compiled with any combination of opengl/gles2
2014-03-15 18:36:52 +01:00
Matthew Waters
b11d8b8664 [630/906] display: add gl api checking
i.e. check for cases where the window wants a different API than
what the library was compiled with
2014-03-15 18:36:51 +01:00
Matthew Waters
76dfdd656f [629/906] window: add GError for error handling of context creation 2014-03-15 18:36:51 +01:00
Matthew Waters
df8c489ada [625/906] add vtable for opengl functions
The vtable provides the ability for one to compile (but not link)
against both OpenGL and GL|ES and starts the move away from GLEW
2014-03-15 18:36:51 +01:00
Matthew Waters
bbd3b4dbd9 [623/906] move GL includes into a single file 2014-03-15 18:36:51 +01:00
Matthew Waters
fd998dc0a5 [621/906] GstGLRendererAPI => GstGLAPI and get GstGLAPI from a window 2014-03-15 18:36:51 +01:00