Open GL 学习

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/crazy1235/article/details/82561277

基本概念

reference

VBO

VBO -- Vertex Buffer Object,顶点缓冲对象。VBO是显存上的一块存储区域,用来存储顶点的各类属性信息。
每个VBO在OpenGL中有它的唯一标识ID,这个ID对应着具体的VBO的显存地址,通过这个ID可以对特定的VBO内的数据进行存取操作。

VAO

VAO -- Vertex Array Object, 顶点数组对象。

EBO

EBO -- Element Buffer Object, 索引缓冲对象。

FBO

FBO -- Frame Buffer Object, 帧缓冲对象。
// 创建fbo
int fbos= new int[1];
GLES20.glGenFrameBuffers(1, fos, 0);
int fboId = fbos[0];

// 绑定fbo
GLES20.bindFrameBuffer(GLES20.GL_FRAMEBUFFER, fboId);

// 创建FBO纹理
int fboTextureId = createFboTexture();

// 
private void createFboTexture() {
    int textureIds = new int[1];
    GLES20.glGenTextures(0, textureIds, 0); // 创建纹理
    if (textures[0] == 0) {
        return 0;
    }
    GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureIds[0]); //绑定纹理

    return textureIds[0];

}

RBO

RBO -- Render Buffer Object, 渲染缓冲对象。

int textureIds = new int[1];
GLES20.glGenTextures(1, textureIds, 0);
int textureId = textureIds[0];

猜你喜欢

转载自blog.csdn.net/crazy1235/article/details/82561277