almost, but you need to bump the pointer instead of using cubeVertices
for all 3;
Well in my case I was using all GL_FLOAT, I think mixing float, byte &
short complicates the offset. Maybe the offset is in bytes and you
need 7*sizeof(). Truth is I have not done it yet. I have just been
reading up
Are you saying that complete vertex definition in your example should
look like:
gl.glVertexPointer(3, GL10.GL_FLOAT, 7, cubeVertices);
gl.glColorPointer(4, GL10.GL_UNSIGNED_BYTE, 7, cubeVertices);
gl.glNormalPointer(GL_SHORT, 7, cubeVertices);
? But how to specify offset for cubeVertices in glCo
I am fairly new to this too, so my reply is sort of a guess, but I
think it my be helpful anyhow. I am rendering 3d models exported from
blender this way though.
for me I was doing:
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, cubeVertices);
instead of:
gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, vertexB
3 matches
Mail list logo