forked from AuroraMiddleware/gtk
gl renderer: Add some in/out compat glue to the shaders
so we can use _IN_ and _OUT_ and get the right things for desktop/es/legacy GL.
This commit is contained in:
parent
f07397f4dd
commit
fdce30d3f8
@ -23,14 +23,18 @@ struct RoundedRect
|
||||
uniform vec4[3] u_clip_rect;
|
||||
|
||||
#if GSK_GLES
|
||||
varying vec2 vUv;
|
||||
#define _OUT_ varying
|
||||
#define _IN_ varying
|
||||
#elif GSK_LEGACY
|
||||
varying vec2 vUv;
|
||||
varying vec4 outputColor;
|
||||
#define _OUT_ varying
|
||||
#define _IN_ varying
|
||||
_OUT_ vec4 outputColor;
|
||||
#else
|
||||
in vec2 vUv;
|
||||
out vec4 outputColor;
|
||||
#define _OUT_ out
|
||||
#define _IN_ in
|
||||
_OUT_ vec4 outputColor;
|
||||
#endif
|
||||
_IN_ vec2 vUv;
|
||||
|
||||
// Transform from a GskRoundedRect to a RoundedRect as we need it.
|
||||
RoundedRect
|
||||
|
@ -1,17 +1,22 @@
|
||||
uniform mat4 u_projection;
|
||||
uniform mat4 u_modelview;
|
||||
|
||||
|
||||
#if GSK_GLES
|
||||
#define _OUT_ varying
|
||||
#define _IN_ varying
|
||||
attribute vec2 aPosition;
|
||||
attribute vec2 aUv;
|
||||
varying vec2 vUv;
|
||||
_OUT_ vec2 vUv;
|
||||
#elif GSK_LEGACY
|
||||
#define _OUT_ varying
|
||||
#define _IN_ varying
|
||||
attribute vec2 aPosition;
|
||||
attribute vec2 aUv;
|
||||
varying vec2 vUv;
|
||||
_OUT_ vec2 vUv;
|
||||
#else
|
||||
in vec2 aPosition;
|
||||
in vec2 aUv;
|
||||
out vec2 vUv;
|
||||
#define _OUT_ out
|
||||
#define _IN_ in
|
||||
_IN_ vec2 aPosition;
|
||||
_IN_ vec2 aUv;
|
||||
_OUT_ vec2 vUv;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user