Commit Graph

4 Commits

Author SHA1 Message Date
Elias Naur 61529c2cb6 gpu: fix clip intersection with the D3D backend
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-03-11 16:23:35 +01:00
Elias Naur c34c350a52 gpu: pack 2D transforms in vec4 values
Instead of separate 2d scale and transform, pack them into a single
4d value.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:22:59 +01:00
Elias Naur 646a767665 gpu,gpu/gl: implement shader uniform buffers
Emulate them for the OpenGL ES backend because 2.0 doesn't support uniform
buffers. The future d3d backend only supports uniform (constant) buffers.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 20:34:22 +01:00
Elias Naur ac7029fa24 gpu/internal/shaders: generate shader variants
We're about to add Direct3D support, where shaders are written in
HLSL. Rather than write shaders twice (or more), convert them to
a GLSL variant understood by the glslcc cross-compiler and generate
the OpenGL ES 2.0 and HLSL variants. The HLSL is used by a future
change.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 20:34:22 +01:00