As part of the OpenGL Specification, each version of OpenGL is required to support specific versions of GLSL it may optionally support more. The OpenGL Shading Language has gone through a number of revisions, some of them quite substantial. If you want to globally apply these, then you should put them in a string that is first in the array of strings passed to the shader object with glShaderSource, or to glCreateShaderProgram. These should be in the first lines of the first string associated with a shader object. GLSL's compilation model instead requires them to be part of the language. In a command-line-based compiler, these would be command-line compiler options. ![]() ![]() The OpenGL Shading Language requires certain information to be presented early in a shader object's compilation.
0 Comments
Leave a Reply. |