View Full Version : gl_PrimitiveID

11-03-2014, 11:37 PM

how can be decided that a system (VGA + Driver) is supporting gl_PrimitiveID in fragment shader.
The official man says GLSL version 1.50 is needed(https://www.opengl.org/sdk/docs/man/html/gl_PrimitiveID.xhtml), but it is not correct.
I can use with GLSL 1.40, on intel HD 3000 (OpenGL 3.1).
And the specification says that OpengGL 3.1 support gl_PrimitiveID(https://www.opengl.org/registry/doc/glspec31.20090528.pdf).

Can somebody help me out, how to decide this question, by knowing OpenGL/GLSL version and extensions of a system?

Agent D
11-04-2014, 02:13 AM
If the spec says it's GLSL140, then it is GLSL140 in every standards conformant implementation.

The man-pages tend to have minor errors. If you find one, you could post a bug-report in the bug tracker.

If you really want to test what the current systems can actually do, you can generate test shader source code
on the fly and try to compile it at program start.