![Pekka Paalanen](/assets/img/avatar_default.png)
The uniform location variables should be signed, according to the OpenGL ES 2 specification. Moreover, GL_NONE, i.e. 0, is not an invalid nor special location; it is actually used as a valid uniform location. Change struct weston_shader uniform members to signed. Stop using 0 for identifying a non-existing uniform, use -1 instead. Furthermore, as the spec says a) glGetUniformLocation() will return -1 for non-active/existing uniforms, and b) glUniform*() function will simply ignore all calls with location -1, we can simplify the code. We don't have to avoid locating uniforms that don't exist, and we don't need to test for them in weston_surface_draw() either. Remove the micro-optimisation that avoids setting 'alpha' uniform if it has not changed, in the name of simplification. Unify shader creation by dropping init_solid_shader(), and calling weston_shader_init() instead. The downside is that we compile the vertex shader twice at startup now. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
…
…
Wayland Demos This repository contains a few demos application for the Wayland project. There's a sample compositor that can run on KMS, under X11 or under another Wayland compositor and there's a handful of simple clients that demonstrate various aspects of Wayland:
Description
Languages
C
98.1%
Meson
1.3%
GLSL
0.3%
Shell
0.2%