Commit graph

33 commits

Author SHA1 Message Date
Thibault Saunier 2fd28195ca Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
Tim-Philipp Müller c5b5ef16d3 gl: GST_EXPORT -> GST_GL_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 12:10:29 +00:00
Matthew Waters bc604f3597 gl: remove more deprecated type aliases
Additions on top of

https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=32a17f313494cbadaf8ec4e337d742e8d7e1b67b
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=c8b99139b1ef3f8891548b0f2607a135917c338e
2018-02-08 21:14:56 +11:00
Matthew Waters 90198daed1 gl: some annotation fixes 2018-02-05 14:58:06 +11:00
Matthew Waters a534d8d74c gl/shader: allow setting non-square matrices as uniforms on gles platforms
It is possible with GLES3
2017-12-09 19:32:30 +00:00
Sebastian Dröge a4a8ef5507 gl: Fixup for last commit 2017-12-09 19:32:27 +00:00
Sebastian Dröge de16dc2555 gl: Fix backwards compat GST_GL_TYPE_* functions/macros
These have to be macros instead of inline function as they must behave
more or less like an integer literal, i.e. include the function call.
2017-12-09 19:32:26 +00:00
Matthew Waters 18ac98c58b gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
2017-12-09 19:32:23 +00:00
Nirbheek Chauhan 6106816f50 gstgl: Add GST_EXPORT to all symbols used on Windows
This is a requirement for those symbols to be exported in gstgl-1.0.dll
when building with the MSVC compiler
2017-12-09 19:32:23 +00:00
Matthew Waters 1e8c7e0f31 gl: add necessary padding bytes to all public structs 2017-12-09 19:32:22 +00:00
Matthew Waters ccbf43987f glshader: add glBindFragDataLocation
There are some cases where it's needed for binding in/out variables in shaders.
e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
the shader source so we have to bind them ourselves.
2017-12-09 19:32:18 +00:00
Matthew Waters 06de6998e5 gl: be consistent in gobject boilerpate
GST_GL_IS_* vs GST_IS_GL_*

git grep -l 'GST_GL_IS_' | xargs sed -i 's/GST_GL_IS_/GST_IS_GL_/g'
2017-12-09 19:32:09 +00:00
Matthew Waters f688a8f0b2 glshader: port to using GstGLSLStage objects for string management
A GstGLShader is now simply a collection of stages that are
compiled and linked together into a program.  The uniform/attribute
interface has remained the same.
2017-12-09 19:32:09 +00:00
Matthew Waters dcd5fce8fb glshader add support for gl3 2017-12-09 19:31:50 +00:00
Matthew Waters 366eaea6d2 glshader: advertise the default vertex and fragment shaders on desktop GL 2017-12-09 19:31:49 +00:00
Lubosz Sarnecki 67b9f71619 glshader: expose opengl handle in getter
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2017-12-09 19:31:45 +00:00
Matthew Waters 857200ff40 gl: make all GObjects inherit from GstObject
Aids memory leak debugging with GST_TRACE=mem-live
2017-12-09 19:31:39 +00:00
Julien Isorce cebcc837de gl: add convenient functions to setup default vertex and fragment shaders
Most of our 2D filters use the same simple vertex shader.
Also define the default fragment shader as the identity.

Avoid duplicating the same vertex and fragment shader text.
2017-12-09 19:31:38 +00:00
Matthew Waters 711ad485b2 [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2017-12-09 19:31:31 +00:00
Sebastian Dröge f7998a2e98 [733/906] gl: Major header and include cleanup 2017-12-09 19:31:29 +00:00
Julien Isorce d17a4381b1 [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
2017-12-09 19:31:29 +00:00
Matthew Waters 6bee9b9c93 [647/906] remove dependecy on glew 2017-12-09 19:31:27 +00:00
Matthew Waters e983f02e87 [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
2017-12-09 19:31:26 +00:00
Matthew Waters 12b045af81 [631/906] remove redefinition warnings in compiling tests 2017-12-09 19:31:26 +00:00
Matthew Waters 344253e860 [624/906] OPENGL_ES2 => HAVE_GLES2 and add HAVE_OPENGL
use GstGLAPI to determine which code paths to execute.
perform some cleanups
2017-12-09 19:31:26 +00:00
Matthew Waters 4c35d682c9 [603/906] update FSF address 2017-12-09 19:31:25 +00:00
Julien Isorce ccaa9e883f [477/906] OpenGL ES 2.0: fix build since glfiltershader changes 2017-12-09 19:31:23 +00:00
Luc Deschenaux 500210b354 [471/906] glshader: add dynamic fragment shader filter
Also add fragment shader parser
Fix bug #600195
2017-12-09 19:31:23 +00:00
Julien Isorce f008fa71ab [467/906] tests: various build fixes
- cmake could not find glib
 - put gtk variables at the beginning to avoid GL conflicts
 - update examples to clutter-1.8
 - use const instead of deprecated G_CONST_RETURN
 - set max pending events to 0 to make cube example works again
2017-12-09 19:31:23 +00:00
Julien Isorce b85ffef956 [387/906] glmixer: add a glmixer base element
glmixer can be seen as a glfilter except it handles N requested
sink pads.
Each sink pad and the src pad are video/x-raw-gl.
glmixer is responsible for managing different framerates from inputs.
It uses OpenGL context sharing. It means that each input is in its
own OpenGL context shared together and shared with the OpenGL context
of the ouput gl chain.
Also add a glmosaic which is an example of implementation of glmixer.
For now glmosaic is a cube but it will be fixed in the next commits.
For now the glmixer has some weird behaviours in some configurations
but it will be improved in the next commits.
The autotools builds is temporarly broken since those changes
have been made on win32.
2017-12-09 19:31:22 +00:00
Julien Isorce 61a8f34442 [321/906] add OpenGL ES 2.x support.
In OpenGL 2.x for Embedded System, a lot of basic scene/draw functions
have been removed. It means that everything is made using vertex and
fragment shaders.
I have also added a gstglwindow backend for winCE that uses EGL
(Native Platform Graphics Intercace) (which is a full part of
OpenGL ES specification). It remove the use of wgl/glx functions.
2017-12-09 19:31:21 +00:00
Julien Isorce 0d6c956cfb [212/906] add a glbumper (bump mapping filter through GLSL) that exposes how to use both vertex and fragment shaders 2017-12-09 19:31:19 +00:00
Filippo Argiolas c47fa4dc62 [127/906] Imported GstGLShader from cvs branch. Added a demo laplacian convolution filter to demonstrate how this can be integrated with minimum effort. 2017-12-09 19:31:17 +00:00