|
|
@ -1648,15 +1648,13 @@ public final class GLRenderer implements Renderer { |
|
|
|
if (fb.getNumColorBuffers() == 0) { |
|
|
|
if (fb.getNumColorBuffers() == 0) { |
|
|
|
// make sure to select NONE as draw buf
|
|
|
|
// make sure to select NONE as draw buf
|
|
|
|
// no color buffer attached.
|
|
|
|
// no color buffer attached.
|
|
|
|
if (gl2 != null) { |
|
|
|
if (context.boundDrawBuf != NONE) { |
|
|
|
if (context.boundDrawBuf != NONE) { |
|
|
|
gl2.glDrawBuffer(GL.GL_NONE); |
|
|
|
gl2.glDrawBuffer(GL.GL_NONE); |
|
|
|
context.boundDrawBuf = NONE; |
|
|
|
context.boundDrawBuf = NONE; |
|
|
|
} |
|
|
|
} |
|
|
|
if (context.boundReadBuf != NONE) { |
|
|
|
if (context.boundReadBuf != NONE) { |
|
|
|
gl2.glReadBuffer(GL.GL_NONE); |
|
|
|
gl2.glReadBuffer(GL.GL_NONE); |
|
|
|
context.boundReadBuf = NONE; |
|
|
|
context.boundReadBuf = NONE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (fb.getNumColorBuffers() > limits.get(Limits.FrameBufferAttachments)) { |
|
|
|
if (fb.getNumColorBuffers() > limits.get(Limits.FrameBufferAttachments)) { |
|
|
@ -1687,11 +1685,9 @@ public final class GLRenderer implements Renderer { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex()); |
|
|
|
RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex()); |
|
|
|
// select this draw buffer
|
|
|
|
// select this draw buffer
|
|
|
|
if (gl2 != null) { |
|
|
|
if (context.boundDrawBuf != rb.getSlot()) { |
|
|
|
if (context.boundDrawBuf != rb.getSlot()) { |
|
|
|
gl2.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot()); |
|
|
|
gl2.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot()); |
|
|
|
context.boundDrawBuf = rb.getSlot(); |
|
|
|
context.boundDrawBuf = rb.getSlot(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|