I try to compile the following code in Open GL ES 2.0 (in RenderMonkey):
const mat2 ma[2] = mat2[2](
mat2( vec2(0.0, -1.0), vec2(1.0, 0.0) ),
mat2( vec2(0.0, -1.0), vec2(1.0, 0.0) )
);
But compiler says:
OpenGL ES Preview Window: Compiling vertex shader API(OpenGL ES) /Effect Group 1/Effect1/Pass 0/Vertex Program/ ... failure
COMPILE ERROR: API(OpenGL ES) /Effect Group 1/Effect1/Pass 0/Vertex Program/ (13): ERROR: 0:13: 'constructor' : if a matrix argument is given to a matrix constructor, it is an error to have any other arguments.
COMPILE ERROR: API(OpenGL ES) /Effect Group 1/Effect1/Pass 0/Vertex Program/ (10): ERROR: 0:10: '=' : cannot assign to 'const array of 2X2 matrix of float'
What I am doing wrong?