Of course it is possible. If the vertices are ordered correctly in the
array/buffer, you can draw the entire strip of triangles in a single
call to either glDrawElements or glDrawArray. Assuming, of course,
that it is one contiguous strip.

BTW: this reminds me to ask: why aren't you using the buffers based on
the nio package? They were included largely for OpenGL. Or did you use
them in the declaration of triStripArray.strips?

On Jul 30, 7:37 am, rajath <[email protected]> wrote:
> Hi all,
> I am trying to render a mesh that has a triangle strip array. I'm
> using the GL11 api as follows:
>
> int offset = 0;
> int size = Short.SIZE / Byte.SIZE;
> for (int i = 0; i < triStripArray.strips.length; i++)
> {
>         gl.glDrawElements(gl.GL_TRIANGLE_STRIP,
>                 triStripArray.strips[i],
>                 gl.GL_UNSIGNED_SHORT,
>                 offset);
>
>         offset += triStripArray.strips[i] * size;
>
> }
>
> Is there a way of calling glDrawElements() by passing the whole strip
> array at once. I'm aware of passing GL_TRIANGLES, with an array of
> indices - that is, with a single call. But with GL_TRIANGLE_STRIP is
> it possible?
>
> Thanks,
> Rajath

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

Reply via email to