[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Problems with vertexAttrib4fv


I'm seeing a problem with vertexAttrib4fv which manifests on Linux x86_64/ATI Radeon 5770 but not on my WinXP32/GForce 8800 GTX

The pseudo code is something like:

if (! colorVertexAttributeData) {

         int colorIndex = getAttribLocation(shader, "a_color")
         if (colorIndex != -1) {
                 vertexAttrib4fv(colorIndex, defaultColor)

where my shader has:

attribute vec3 a_color;

in the attribute definitions.

The purpose behind the code is for the cases where the data doesn't have a color attribute channel (using Max speak) so that it is displayed with a default color, so I use a constant vertex attribute.

This works fine in the win setup, but on the linux box Chrome 6.0.472.25 dev ignores the color and Firefox (3.7 -> 4.0 beta 2) just produces a black image. By "ignore the color" I've set a default value of vec4(0.2,0.2,0.2,1.0) in the shader so I can see if anything is happening. In chrome, the objects are this color rather than the color provided in the vertexAttrib statement.

It seems to me that the likely candidates are either the graphics driver or some issue with WebGL and X86_64 linux.

When there is a color attribute channel in the vertex attray then the vertexAttribPointer correctly finds and displays the color on all platforms.



----------------------------------------------------------- You are currently subscribed to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email: