mojira.dev
MC-311856

Error when writing textures to the buffer with the OpenGL rendering backend

When calling GlCommandEncoder.writeTextureToBuffer() for a depth texture, then for a color texture right after, the read buffer will be GL_NONE, due to the GlStateManager._glReadBuffer(GL11.GL_NONE); call.

This is causing an opengl error: GL_INVALID_OPERATION error generated. No color buffer.

This issue was introduced in 26.3-snapshot-10, caused by the fix to MC-310719. I initially reported it in the VV discord 1 week ago.
A confirmed fix is to call GlStateManager._glReadBuffer(isDepth ? GL11.GL_NONE : GL30.GL_COLOR_ATTACHMENT0); instead, or just removing that call completely since it’s not mandatory.

Environment

OpenGL

Comments 0

No comments.

Rigner

(Unassigned)

Plausible

Platform G

Normal

Rendering

26.3 Release Candidate 3, 26.3, 26.4 Snapshot 1, 26.4 Snapshot 2, 26.4 Snapshot 3, 26.4 Snapshot 4, 26.4 Snapshot 5

26.4 Snapshot 7

Retrieved