Answer the question
In order to leave comments, you need to log in
OpenGL 2.1, Mac OS X 10.9 and layout in GLSL?
Hello. I encountered such a problem that on Mac OS X 10.9 you can only use the ancient version of GLSL 1.2, which, as far as I understand, does not support the construction of the form "layout (location = 0) in vec3 position;". Is there some equivalent, or maybe I'm doing something wrong? Shader code:
#version 120
layout (location = 0) in vec3 position;
void main() {
gl_Position = vec4(0.25 * position, 1.0);
}
Answer the question
In order to leave comments, you need to log in
The solution to the problem is to manually set the context.
...
PixelFormat pixelFormat = new PixelFormat();
ContextAttribs contextAtrributes = new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCore(true);
Display.create(pixelFormat, contextAtrributes);
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question