Skip to content Skip to sidebar Skip to footer

Shader Attribute Mat4 Not Binding Correctly (opengl Es 2.0 Android)

I have the following shader: protected final static String vertexShaderCode = 'attribute vec4 vPosition;' + 'attribute vec2 texCoord;' + 'attribute mat4 uMVPMatrix; \

Solution 1:

Turns out that the issue wasn't with my card, but the phone. When tried on a Samsung Galaxy S2, the attributes were properly assigned and it worked as expected.

The phone in question is the HTC Incredible S, which had an Adreno 205 graphics card. I imagine that there must be an issue with the Opengl implementation on the phone/graphics card. A solution could be to define the matrix as four vec4s in the shader and calculate the position element by element.

Post a Comment for "Shader Attribute Mat4 Not Binding Correctly (opengl Es 2.0 Android)"