Commit graph

28 commits

Author SHA1 Message Date
Matthew Waters
518e8a3fd2 glframebuffer: rewrite for a more consistent API
Facilities are given to create fbo's and attach GL memory (renderbuffers
or textures).  It also keeps track of the renderable size for use with
effective use with glViewport().
2016-07-26 14:07:24 +10:00
Matthew Waters
989200820d glmemory: add the texture type to allocate to parameters
Rather than assuming something.  e.g. zerocopy on iOS with GLES3 requires
the use of Luminance/Luminance Alpha formats and does not work with
Red/RG textures.
2016-06-29 18:04:28 +10:00
Matthew Waters
8c9b231db1 tests/glcontext: update test for gen,del_texture removal 2016-06-16 00:47:42 +10:00
Matthew Waters
aa6062945c gldisplay: make readding the same context a no-op
With e38af23044 returning the correct contexts,
gst_gl_display_add_context() was susceptible to causing infinte loops when
adding the same GstGLContext more than once.  Fix and add a test for
gst_gl_display_add_context().

Fixes glvideomixer gst-validate tests.
2016-03-08 02:06:13 +11:00
Matthew Waters
2aadd7eaf9 glcontext: implement checking whether a context has been shared
Some operations are unnecessary when running with only a single GL
context.
e.g. glFlush when setting a fence object as the flush happens on wait.

API: gst_gl_context_is_shared
2016-01-07 14:11:13 +11:00
Matthew Waters
924f2ca986 gl/tests: port glcontext test to opengl
Now uses vao's and vbo's when possible like the rest of the gstgl library.
2015-10-15 22:42:26 +11:00
Matthew Waters
b25807c382 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.
2015-10-15 21:27:57 +11:00
Matthew Waters
4fd7b2408e tests/glcontext: fix INVALID_ENUM GL error in test 2015-08-08 15:32:17 +02:00
Matthew Waters
d5996de5d7 glcontext: fix get_current_gl_api on x11/nvidia drivers
They require to get_proc_address some functions through the
platform specific {glX,egl}GetProcAddress rather than the default
GL library symbol lookup.
2015-07-18 18:18:22 +10:00
Matthew Waters
be9ad5eeb2 glcontext: track sharedness with a cookie
The previous approach of traversing the other_context weak ref tree was
1. Less performant
2. Incorrect for context destruction removing a link in the tree

Example of 2:
c1 = context_create (NULL)
c2 = context_create (c1)
c3 = context_create (c2)
context_can_share (c1, c3) == TRUE
context_destroy (c2)
unref (c2)
context_can_share (c1, c3) returns FALSE when it should be TRUE!

This does not remove the restriction that context sharedness can only
be tracked between GstGLContext's.
2015-07-18 15:34:55 +10:00
Matthew Waters
904cdf3f58 tests/gl: fix typo 2015-05-14 18:35:35 +10:00
Matthew Waters
0870e8785e gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
2015-05-14 16:42:09 +10:00
Matthew Waters
e5debcaff4 gl/tests: fix deadlock on glcontext wrapped context test 2015-03-13 12:30:20 +00:00
hoonhee.lee
3beb48162f tests: glcontext: remove unnecessary semicolon
https://bugzilla.gnome.org/show_bug.cgi?id=745875
2015-03-09 08:41:25 +01:00
Matthew Waters
75b808d072 gl/tests: update glwindow api change 2015-01-23 17:27:42 +11:00
Matthew Waters
4c73e20553 glcontext: allow wrapped contexts to be utilised like non-wrapped contexts
Fill in the missing pieces like get_proc_address, the gl function vtable
2015-01-13 15:18:41 +11:00
Matthew Waters
81ceca1aea glcontext: add api for retreiving the current context and api
that is current in the calling thread.
2014-10-28 17:33:20 +11:00
Sebastian Dröge
d4a8d67982 glcontext: Fix memory leaks in unit test 2014-06-29 21:53:21 +02:00
Matthew Waters
870503dc6b gl: silence all the compiler warnings 2014-03-16 15:17:44 +01:00
Matthew Waters
18ebef308c [900/906] tests/gstglcontext: reduce the number of frames displayed
Was causing timeouts on intel hardware due to vsync handling.
2014-03-15 18:37:07 +01:00
Matthew Waters
3ad466945e [891/906] context: add support for wrapping external contexts 2014-03-15 18:37:07 +01:00
Matthew Waters
df0cfcbfa5 [878/906] tests: update for glmem api change 2014-03-15 18:37:06 +01:00
Matthew Waters
636d307715 [853/906] display: remove _{set,get}_context
A GstGLDisplay doesn't need a GstGLContext and its use
was cause a reference cycle
2014-03-15 18:37:04 +01:00
Matthew Waters
b90d824626 [838/906] gl: Use GL_TEXTURE_2D instead of GL_TEXTURE_RECTANGLE
We create our textures (in Desktop GL) with GL_TEXTURE_RECTANGLE,
vaapi attempts to bind our texture to GL_TEXTURE_2D which throws a
GL_INVALID_OPERATION error and as thus, no video.

Also, by moving exclusively to GL_TEXTURE_2D and the npot extension
we also remove a difference between the Desktop GL and GLES2 code.

https://bugzilla.gnome.org/show_bug.cgi?id=712287
2014-03-15 18:37:03 +01:00
Julien Isorce
ca9c2cce1a [821/906] tests: fix test_share on GLESv2 2014-03-15 18:37:02 +01:00
Matthew Waters
9b22b0e0ba [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2014-03-15 18:37:02 +01:00
Julien Isorce
ad3f202b34 [809/906] tests: port test_share to GLES2
Also add a deinit function to release fbo, tex and shader.
2014-03-15 18:37:02 +01:00
Matthew Waters
f93b804071 [802/906] add GstGLContext test that tests context sharing 2014-03-15 18:37:01 +01:00