Commit Graph

3 Commits

Author SHA1 Message Date
Emmanuele Bassi
0d01e12acb gsk: Render nodes with solid colors
GskRenderNodes with solid colors should be handled differently than
nodes with texturing data.

The Cairo renderer just emits a rectangle with the color information
stored inside the node; the GL renderer, on the other hand, needs to use
a white texture which gets rendered using a color uniform inside the
fragment shader.
2016-11-17 17:43:24 +00:00
Emmanuele Bassi
03ab560fae gsk: Rename uniforms and attributes in shaders
Use appropriate names, and annotate the names with the types — 'u' for
uniforms, 'a' for attributes. The common preambles for shaders are split
from the bodies, so we need some way to distinguish the uniforms and the
attributes just from their name.
2016-10-18 11:49:09 +01:00
Emmanuele Bassi
28b490f14f gsk: Rework how GLSL shaders are built
The GL renderer should build the GLSL shaders using GskShaderBuilder.
This allows us to separate the common parts into separate files, and
assemble them as necessary, instead of shipping one big shader per type
of GL API (GL3, GL legacy, and GLES).
2016-10-18 11:49:07 +01:00