Tag: fbo

Android OpenGL ES 2.0:GL_FLOAT纹理可以作为COLOR附件分配给FBO吗?

我想通过glReadPixels使用GL_FLOAT纹理获取值。 我的Android设备支持OES_texture_float 。 但是,附加GL_FLOAT纹理会出错。 在Android的OpenGL ES 2.0中,将GL_FLOAT纹理附加到FBO是不可能的? 还是要靠硬件? 我的部分代码是: 在里面: glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D,texture); glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,texWidth,texHeight,0,GL_RGB,GL_FLOAT,NULL); FBO附件: glBindFramebuffer(GL_FRAMEBUFFER,framebuffer); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,texture,0); checkGlError(“FBO Settings”); // glGetError() return 0x502. status = glCheckFramebufferStatus(GL_FRAMEBUFFER); // glCheckFramebufferStatus() return 0. 如果有人有一些见解我会贬低它。