Hello,
I render into an FBO. The setup code is as follows if it helps:
#407 glBindFramebuffer(GL_FRAMEBUFFER,1) Error: GL_NO_ERROR
#408 glGenTextures(1,1) Error: GL_NO_ERROR
#409 glActiveTexture(GL_TEXTURE7) Error: GL_NO_ERROR
#410 glBindTexture(GL_TEXTURE_2D,1) Error: GL_NO_ERROR
#411 glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA8,1280,640,0,GL_RGBA,GL_UNSIGNED_BYTE,NULL) Error: GL_NO_ERROR
#412 glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,1,0,4) Error: GL_NO_ERROR
#413 glGenTextures(1,2) Error: GL_NO_ERROR
#414 glBindTexture(GL_TEXTURE_2D,2) Error: GL_NO_ERROR
#415 glTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH24_STENCIL8,1280,640,0,GL_DEPTH_STENCIL,GL_UNSIGNED_INT_24_8,NULL) Error: GL_NO_ERROR
#416 glGenRenderbuffers(1,1) Error: GL_NO_ERROR
#417 glBindRenderbuffer(GL_RENDERBUFFER,1) Error: GL_NO_ERROR
#418 glRenderbufferStorageMultisample(GL_RENDERBUFFER,4,GL_DEPTH24_STENCIL8,1280,640) Error: GL_NO_ERROR
#419 glGetRenderbufferParameteriv(GL_RENDERBUFFER,GL_RENDERBUFFER_SAMPLES,4) Error: GL_NO_ERROR
#420 glFramebufferRenderbuffer(GL_FRAMEBUFFER,GL_DEPTH_STENCIL_ATTACHMENT,GL_RENDERBUFFER,1) Error: GL_NO_ERROR
#421 glGetError() ==> GL_NO_ERROR Error: GL_NO_ERROR
#422 glCheckFramebufferStatus(GL_FRAMEBUFFER) ==> GL_FRAMEBUFFER_COMPLETE Error: GL_NO_ERROR
#423 glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT) Error: GL_NO_ERROR
#424 eglGetCurrentSurface(EGL_READ) ==> EGLSurface(0x7fac47c090) Error: EGL_SUCCESS
#425 eglGetCurrentSurface(EGL_DRAW) ==> EGLSurface(0x7fac47c090) Error: EGL_SUCCESS
#426 eglGetError() ==> EGL_SUCCESS Error: EGL_SUCCESS
#427 eglGetCurrentSurface(EGL_READ) ==> EGLSurface(0x7fac47c090) Error: EGL_SUCCESS
#428 eglGetCurrentSurface(EGL_DRAW) ==> EGLSurface(0x7fac47c090) Error: EGL_SUCCESS
#429 eglGetCurrentContext() ==> EGLContext(0x7fac26ad80) Error: EGL_SUCCESS
I want the new pixel alpha value to completely replace the value in the framebuffer if the new pixel is not discarded. That would be
glBlendFunc(GL_ONE, GL_ZERO);
Right? Would it still work then?