-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi,
I managed to compile samplecat from the git master on ubuntu 20.10. However when launching it, this error happens:
auditioner: JACK playback
Compilation failure in shader.
Error message: 0(34) : warning C7555: 'attribute' is deprecated, use 'in/out' instead
0(35) : warning C7555: 'attribute' is deprecated, use 'in/out' instead
0(36) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(40) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(44) : error C7616: global function ftransform is removed after version 140
Source code:
#version 150
#define GSK_GL3 1
#define _OUT_ varying
#define _IN_ varying
#define _ROUNDED_RECT_UNIFORM_ vec4[3]
struct RoundedRect
{
vec4 bounds;
// Look, arrays can't be in structs if you want to return the struct
// from a function in gles or whatever. Just kill me.
vec4 corner_points1; // xy = top left, zw = top right
vec4 corner_points2; // xy = bottom right, zw = bottom left
};
// Transform from a AGlRoundedRect to a RoundedRect as we need it.
RoundedRect
create_rect (vec4[3] data)
{
vec4 bounds = vec4(data[0].xy, data[0].xy + data[0].zw);
vec4 corner_points1 = vec4(bounds.xy + data[1].xy,
bounds.zy + vec2(data[1].zw * vec2(-1, 1))
);
vec4 corner_points2 = vec4(bounds.zw + (data[2].xy * vec2(-1, -1)),
bounds.xw + vec2(data[2].zw * vec2(1, -1))
);
return RoundedRect(bounds, corner_points1, corner_points2);
}
uniform mat4 u_projection;
uniform mat4 u_modelview;
uniform float u_alpha;
attribute vec2 aPosition;
attribute vec2 aUv;
varying vec2 vUv;
uniform vec4 u_color;
varying vec4 final_color;
void main() {
//gl_Position = u_projection * u_modelview * vec4(aPosition, 0.0, 1.0);
gl_Position = u_modelview * ftransform();
vUv = vec2(aUv.x, aUv.y);
final_color = u_color;
// pre-multiply
final_color.rgb *= final_color.a;
final_color *= u_alpha;
}
// FRAG
Metadata
Metadata
Assignees
Labels
No labels