View Full Version : gl_VertexID in GLSL 120 on OSX?
11-16-2011, 01:42 PM
I get this error with a 120 GLSL shader in a GL2 context, on OSX Lion:
Failed to compile vertex shader.
ERROR: 0:15: Use of undeclared identifier 'gl_VertexID'
ERROR: 0:16: Use of undeclared identifier 'gl_VertexID'
Yet the docs say gl_VertexID has always been supported:
11-16-2011, 02:36 PM
Sounds like a bug. Have you reported it to Apple? They're usually pretty good about responding to issues, though it might be a while before it's resolved.
11-16-2011, 05:31 PM
That man page is wrong. gl_VertexID is not supported in 1.10 or 1.20 (go check the real documentation (http://www.opengl.org/documentation/specs/).)
You can use gl_VertexID in 1.10 or 1.20 with
#extension GL_EXT_gpu_shader4 : require
or, use 1.40 or 1.50 where gl_VertexID is part of the language.
See also the caveats in the specification about gl_VertexID only being well-defined when your vertex data is in a VBO, not wrapped in a display list, etc.
11-17-2011, 09:18 AM
That should really be corrected then.
11-17-2011, 05:56 PM
Khronos has a public bugzilla (http://www.khronos.org/bugzilla/) where you can tell them to fix their broken man page.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.