Android OpenGL ES 2.0: Can the GL_FLOAT texture be assigned by the FBO as a COLOR attachment?

I want to get the value using GL_FLOAT texture using glReadPixels.

Support for my Android device OES_texture_float . but as a result, an error occurred attaching the GL_FLOAT texture .

In OpenGL ES 2.0 on Android, is it impossible to attach a GL_FLOAT texture to FBO? Or hardware dependent?

Part of my code:

Init:

glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D,texture);
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,texWidth,texHeight,0,GL_RGB,GL_FLOAT,NULL);

FBO Attach:

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.

If anyone has an understanding, I would appreciate it.

+3
source share

All Articles