http://bugs.freedesktop.org/show_bug.cgi?id=11774
------- Comment #1 from [EMAIL PROTECTED] 2007-07-31 06:22 PST -------
Here's a code snippet in case it helps:
--- STARTS ---
const GLint iLocPosition = 0;
GLint iLocColour, iLocTexCoord;
// Bind only 'position' to zero.
glBindAttribLocation(uiProgram, iLocPosition, "av3position");
glAttachShader(uiProgram, uiVertShader);
glAttachShader(uiProgram, uiFragShader);
glLinkProgram(uiProgram);
// Now other attributes should have been allocated slots >0.
iLocColour = glGetAttribLocation(uiProgram, "av3colour");
iLocTexCoord = glGetAttribLocation(uiProgram, "av2texCoord");
DEBUG("iLocColour:\t%i\n", iLocColour);
DEBUG("iLocTexCoord:\t%i\n", iLocTexCoord);
--- FINISH ---
Under ATI drivers I get 1 and 2 output as the two locations, under Mesa I get 1
and 1.
The shaders are below, though I think any simple example would suffice. Vertex
shader:
--- STARTS ---
attribute vec3 av3position;
attribute vec3 av3colour;
attribute vec2 av2texCoord;
varying vec3 vv3colour;
varying vec2 vv2texCoord;
void main(void) {
vv3colour = av3colour;
vv2texCoord = av2texCoord;
gl_Position = vec4(vec3(av3position), 1.0);
}
--- FINISH ---
and for the fragment shader:
--- STARTS ---
varying vec3 vv3colour;
varying vec2 vv2texCoord;
void main(void) {
gl_FragColor = vec4(vec3(vv3colour), 1.0);
}
--- FINISH ---
Cheers, Pete
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev