On Thu, Oct 27, 2011 at 8:38 PM, John Davis <davi...@gmail.com> wrote:
> That is what I kind of what I tried to do (I used GL_VERTEX_ARRAY,
> INDEX_ARRAY was not there.):

That's correct, sorry, I got distracted.  GL_INDEX_ARRAY is a different thing.

> Using this as a guide:
> http://www.songho.ca/opengl/gl_vertexarray.html
>
>        public void draw(GL10 gl) {
>                // 
> http://pyopengl.sourceforge.net/documentation/ref/gl/vertexpointer.html
>                gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
>                gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer);
>                gl.glDrawElements(GL10.GL_TRIANGLES, 24, GL10.GL_FIXED,
> mIndicesBuffer); // mode, count, type, indices
>                gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
>        }
>
> It did not display anything though.

This looks OK overall, just try using 36 for the count argument and
GL_UNSIGNED_BYTE/GL_UNSIGNED_SHORT for the type argument of
glDrawElements().

Also, your draw function doesn't seem to use colouring nor texturing -
make sure you at least have a glColor() call somewhere prior to
draw(), or a colour array, or texturing set up.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to