我遇到了以下 GLSL 代码。我尝试在我的 OpenGL 桌面应用程序中编译它,但编译器显示“不支持的构造”:
float[]
camx = float[] ( .2351, 1.2351, 1.2351, 1., .2, .41, .545,.545, .5,.084,.145, 3.04,.12, .44,.44,.416, -1.404, .21,.2351, .2351),
camy = float[] (-.094, .35, .28, .38, .04, .11, -.44,-.44,.35,.0614,.418, 1.,-.96, .67,.8,.0, -1., -.06,-.094),
camz = float[] ( .608, .608, .35, .3608, -.03, .48,.032,.032, .47,0.201,.05,.28,.3, 1.445,1.,1.4, 2.019, .508,.608),
lookx = float[] (-.73, -.627, -1., -.3, -1., -.72, -.82,-.82,-.67,-.5,-.07,-.67,-.27, -.35,-.35,-.775, .08, -.727),
looky = float[] (-.364, -.2, -.2, -.2, 0., -.39, -.5, -.5,-.56,-.37,-.96,-.74,-.94, -.35,-.35,-.1, .83,-.364),
lookz = float[] (-.582, -.582, -.5, -.35, -.0, -.58, -.2776,-.2776,-.48,-.79,-.25,.06,-.18, -.87,-.87,.23, .55, -.582),
minsx = float[] (-.3252,-.3252,-.3252,-.3252,-.3252,-.3252,-.3252,-1.1, -1.05,-1.05,-1.21,-1.22,-1.04,-0.737,-.62,-10., -.653, -.653, -.3252),
minsy = float[] (-.7862,-.7862,-.7862,-.7862,-.7862,-.7862,-.7862,-.787, -1.05,-1.05,-.954,-1.17,-.79,-0.73,-.71,-.75, -2., -2., -.7862),
minsz = float[] (-.0948,-.0948,-.0948,-.0948,-.0948,-.0948,-.0948,-.095,-0.0001,-0.0001,-.0001,-.032,-.126,-1.23,-.85,-.787, -.822, -1.073, -.0948),
minsw = float[] ( .69, .69, .69, .69, .69, .678, .678, .678,.7,.73,1.684,1.49,.833, .627,.77,.826, 1.8976, 1.8899, .69),
maxsx = float[] ( .35,.3457,.3457,.3457,.3457, .3457,.3457,.3457, 1.05,1.05,.39,.85,.3457,.73,.72,5., .888, .735, .35),
maxsy = float[] (1.,1.0218,1.0218,1.0218,1.0218,1.0218,1.0218,1.0218,1.05,1.05,.65,.65,1.0218,0.73,.74,1.67, .1665, 1.),
maxsz = float[] (1.22,1.2215,1.2215,1.2215,1.2215,1.2215,1.2215,1.2215, 1.27,1.4,1.27,1.27,1.2215,.73,.74,.775, 1.2676, 1.22),
maxsw = float[] ( .84, .84, .84, .84, .84, .9834,.9834,.9834,.95,.93,2.74,1.23,.9834, .8335,.14,1.172, .7798, .84);
我需要什么让它运行 - 什么 OpenGL 版本,什么 GLSL 版本?有可能吗?试过#version 130
了#version 450
。
这个数组声明语法甚至叫什么?因为我不知道,所以我不能谷歌它。