【发布时间】:2011-10-10 05:07:22
【问题描述】:
我在 Android 中使用 OpenGL ES 2.0,查看the docs for GLES20 发现了以下方法:
public static void glDrawElements(
int mode, int count, int type, Buffer indices)
public static void glDrawElements(
int mode, int count, int type, int offset)
public static void glVertexAttribPointer(
int indx, int size, int type, boolean normalized, int stride, Buffer ptr)
public static void glVertexAttribPointer(
int indx, int size, int type, boolean normalized, int stride, int offset)
采用Buffer 对象的两种方法对我来说是有意义的,但其他两种则没有。他们从哪里获得索引/属性值(分别),offset 的偏移量是什么? (我假设这两个问题的答案相同。)
【问题讨论】:
-
这两个奇怪的方法都被标记为“9级”,(我目前正在为8级编码),所以这比什么都更能满足我的好奇心......
标签: android opengl-es opengl-es-2.0