Commit Graph

14 Commits

Author SHA1 Message Date
xndcn
34ffdc6e3f gl: Fix implicit leaking of shader object
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.

So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
2020-12-29 23:50:45 +08:00
Björn Daase
6315cd977c *: Fix spelling mistakes found by codespell 2020-08-21 15:29:34 +02:00
Yuri Chornoivan
01bd4cc4e1 Fix minor typos 2020-05-28 11:00:03 +03:00
Timm Bäder
d1cd6aacba tests: Add common_cflags to build
And fix all the errors and warnings resulting from that

See #2491
2020-03-06 18:21:58 +01:00
Matthias Clasen
e171f4930b Avoid redefining GNU_SOURCE
Gives a compiler warning with the wrong flags.
2017-03-23 15:15:12 +00:00
Emmanuele Bassi
b993c7db63 tests: Add GLES support to GtkGears
Use the appropriate GLSL shaders when running under an OpenGL ES
context.
2016-04-25 14:35:02 +01:00
Emmanuele Bassi
b274a2656d tests/gears: Ensure we don't use unavailable GL resources
We need to check on realize if we have access to a GL context, before
calling GL functions. We use gtk_gl_area_get_error() for that.

We also need to tear down the resources during unrealization, instead
of leaking them.
2015-07-16 14:55:25 +01:00
Chun-wei Fan
b3725a455d test/gtkgears.c: Fix on C89 Compilers
Make sure that variables are declared at the top of the block.

Break up one of the sincos() calls into individual calls to sin() and cos()
so that we do not have to complicate the initialization of the following
GLfloat array.
2015-03-06 23:47:35 +08:00
Matthias Clasen
17bc7aaefd Check for existence of sincos
It apparently doesn't exist everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=745578
2015-03-04 06:30:13 -05:00
Emmanuele Bassi
0019eb7bf9 gears: Update to slightly more modern OpenGL
Instead of using glxgears, which still uses OpenGL 2.1 and the fixed
pipeline, we use a slightly modified es2gears, OpenGL 3.2, and the
programmable pipeline.
2015-03-03 00:06:35 +00:00
Chun-wei Fan
fbe4f94519 test/gtkgears.c: Fix Builds on Systems Without M_PI
Use G_PI in place of M_PI to fix the build on compilers that do not have
M_PI defined.

https://bugzilla.gnome.org/show_bug.cgi?id=740795
2014-12-03 17:10:37 +08:00
Benjamin Otte
e0040acefc tests: Make gtkgears compile without complaints 2014-10-14 14:33:08 +02:00
Alexander Larsson
fdeb4f8c16 gl: Make gdk_gl_context_make_current() return void
Its not really reasonable to handle failures to make_current, it
basically only happens if you pass invalid arguments to it, and
thats not something we trap on similar things on the X drawing side.

If GL is not supported that should be handled by the context creation
failing, and anything going wrong after that is essentially a critical
(or an async X error).
2014-10-13 10:43:32 -04:00
Alexander Larsson
8f3e9d1b05 Add tests/gdkgears
A more complex test modeled on the traditional glxgears.
2014-10-13 10:43:31 -04:00