I am having an issue where textures from the resources become just white.
The issue only seems to occur on phones (Droid-X for sure), but it works just fine on the emulator
You must enable vertex array and texture coords array and bind your buffer indexes before making any calls to your glDraw...()
function.
After glBindTexture()
in onDrawFrame()
, put this:
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
GL11 gl11 = (GL11) gl;
gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, verticesBufferIndex);
gl11.glVertexPointer(3, GL11.GL_FLOAT, 0, 0);
gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, textureCoordBufferIndex);
gl11.glTexCoordPointer(2, GL11.GL_FLOAT, 0, 0);
gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, indicesBufferIndex);
// Draw...