About the multisampling issue I’m facing, just in case anyone can help me with that.
in GLRenderer.setReadDrawBuffers methid, last section
.......
} else {
RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex());
// select this draw buffer
if (context.boundDrawBuf != rb.getSlot()) {
if(gl2!=null) {
gl2.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
} else {
gles30.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
}
context.boundDrawBuf = rb.getSlot();
}
}
.......
As there’s no glDrawBuffer in GLES but glDrawBuffers exists (glDrawBuffers - OpenGL ES 3 Reference Pages) and does the same work so I’m wrapping it this way:
public void glDrawBuffer(int mode) {
tmpBuff.clear();
tmpBuff.put(0, mode);
tmpBuff.rewind();
glDrawBuffers(tmpBuff);
}
public void glDrawBuffers(IntBuffer bufs) {
GLES30.glDrawBuffers(bufs.limit(), bufs);
}
Depending on the framebuffer his call is returning a GL_INVALID_ENUM which according to the documentation linked: " GL_INVALID_ENUM
is generated if one of the values in bufs
is not an accepted value."
I’ve check that the color attachment is in the valid range ( < MAX_COLOR_ATTACHMENTS ) for all cases but I’ve not found any reason for that.
In adition to that, the call to glBlitFramebuffer (glBlitFramebuffer - OpenGL ES 3 Reference Pages) at GLRenderer.copyFrameBuffer is returning GL_INVALID_OPERATION error and capturing with renderdoc, it finds the error “glblitframebuffer color attachment must have identical formats when resolving” which I also don’t know how to address.
Thanks