简体   繁体   English

Android OpenGL-ES VBO支持与否?

[英]Android OpenGL-ES VBO support or not?

Android OpenGL-ES VBO support or not? Android OpenGL-ES VBO支持与否? How can i check this? 我怎么检查这个?

Thanks 谢谢

Some phones support it, some do not. 有些手机支持它,有些则不支持。 Generally, VBOs are mandatory in OpenGL 1.1, so if the device reports 通常,VBO在OpenGL 1.1中是必需的,因此如果设备报告

gl.glGetString(GL10.GL_VERSION);

as 1.1 or higher (you can also write the app manifest file so that 1.1 is required for the installation) then they are supported. 如果为1.1或更高(您也可以编写应用程序清单文件,以便安装需要1.1),则支持它们。

If the device support OpenGL ES 1.0 only, you should check the return value of 如果设备仅支持OpenGL ES 1.0,则应检查返回值

gl.glGetString(GL10.GL_EXTENSIONS);

whether it contains ARB_vertex_buffer_object or not. 是否包含ARB_vertex_buffer_object Probably it will. 可能它会。

For (slightly) related information about various GL capabilities of Android devices, you can find some at this question: OpenGL extensions available on different Android devices . 有关Android设备的各种GL功能的(略)相关信息,您可以在这个问题上找到一些: 不同Android设备上可用的OpenGL扩展

OpenGL ES 2.0 supports VBOs well, but there is issue in Android 2.2 which misses an api in GLES20 class: OpenGL ES 2.0很好地支持VBO,但Android 2.2中存在一个问题,它错过了GLES20类中的api:

public static native void glDrawElements(
    int mode,
    int count,
    int type,
    int offset
);

The issue has been fixed from Android 2.3. Android 2.3修复了此问题。

void draw(GL10 gl){
    GL11 gl11 = (GL11)gl;
    ...
    gl11.glBindBuffer(...);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM