minor cleanup in GLRenderer
This commit is contained in:
parent
c872cb2fdb
commit
86c2c7f341
@ -1648,7 +1648,6 @@ public final class GLRenderer implements Renderer {
|
||||
if (fb.getNumColorBuffers() == 0) {
|
||||
// make sure to select NONE as draw buf
|
||||
// no color buffer attached.
|
||||
if (gl2 != null) {
|
||||
if (context.boundDrawBuf != NONE) {
|
||||
gl2.glDrawBuffer(GL.GL_NONE);
|
||||
context.boundDrawBuf = NONE;
|
||||
@ -1657,7 +1656,6 @@ public final class GLRenderer implements Renderer {
|
||||
gl2.glReadBuffer(GL.GL_NONE);
|
||||
context.boundReadBuf = NONE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (fb.getNumColorBuffers() > limits.get(Limits.FrameBufferAttachments)) {
|
||||
throw new RendererException("Framebuffer has more color "
|
||||
@ -1687,7 +1685,6 @@ public final class GLRenderer implements Renderer {
|
||||
} else {
|
||||
RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex());
|
||||
// select this draw buffer
|
||||
if (gl2 != null) {
|
||||
if (context.boundDrawBuf != rb.getSlot()) {
|
||||
gl2.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
|
||||
context.boundDrawBuf = rb.getSlot();
|
||||
@ -1695,7 +1692,6 @@ public final class GLRenderer implements Renderer {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user