我尝试在 Open GL ES 2.0(在 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) )
);
但是编译器说:
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'
我做错了什么?