Skip to content

Instantly share code, notes, and snippets.

@flexd
Created April 10, 2012 14:01
Show Gist options
  • Save flexd/2351581 to your computer and use it in GitHub Desktop.
Save flexd/2351581 to your computer and use it in GitHub Desktop.
// Pass in the position information
GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, mCubeBufferIdx);
GLES20.glEnableVertexAttribArray(mPositionHandle);
mGlEs20.glVertexAttribPointer(mPositionHandle, POSITION_DATA_SIZE,
GLES20.GL_FLOAT, false, stride, 0);
// Pass in the normal information
GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, mCubeBufferIdx);
GLES20.glEnableVertexAttribArray(mNormalHandle);
mGlEs20.glVertexAttribPointer(mNormalHandle, NORMAL_DATA_SIZE,
GLES20.GL_FLOAT, false, stride, POSITION_DATA_SIZE * BYTES_PER_FLOAT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment