|
|
@ -1436,11 +1436,13 @@ public class JoglRenderer implements Renderer { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (fb.getWidth() > maxRBSize || fb.getHeight() > maxRBSize) { |
|
|
|
if (fb.getWidth() > maxRBSize || fb.getHeight() > maxRBSize) { |
|
|
|
throw new UnsupportedOperationException("Resolution " + fb.getWidth() + ":" |
|
|
|
throw new RendererException("Resolution " + fb.getWidth() |
|
|
|
+ fb.getHeight() + " is not supported."); |
|
|
|
+ ":" + fb.getHeight() + " is not supported."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (fb.getSamples() > 0 && gl.isExtensionAvailable("GL_EXT_framebuffer_multisample") |
|
|
|
TextureUtil.GLImageFormat glFmt = TextureUtil.getImageFormatWithError(rb.getFormat()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fb.getSamples() > 1 && gl.isExtensionAvailable("GL_EXT_framebuffer_multisample") |
|
|
|
&& gl.isFunctionAvailable("glRenderbufferStorageMultisample")) { |
|
|
|
&& gl.isFunctionAvailable("glRenderbufferStorageMultisample")) { |
|
|
|
int samples = fb.getSamples(); |
|
|
|
int samples = fb.getSamples(); |
|
|
|
if (maxFBOSamples < samples) { |
|
|
|
if (maxFBOSamples < samples) { |
|
|
@ -1448,11 +1450,11 @@ public class JoglRenderer implements Renderer { |
|
|
|
} |
|
|
|
} |
|
|
|
gl.getGL2() |
|
|
|
gl.getGL2() |
|
|
|
.glRenderbufferStorageMultisample(GL.GL_RENDERBUFFER, samples, |
|
|
|
.glRenderbufferStorageMultisample(GL.GL_RENDERBUFFER, samples, |
|
|
|
TextureUtil.convertTextureFormat(rb.getFormat()), fb.getWidth(), |
|
|
|
glFmt.internalFormat, fb.getWidth(), |
|
|
|
fb.getHeight()); |
|
|
|
fb.getHeight()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, |
|
|
|
gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, |
|
|
|
TextureUtil.convertTextureFormat(rb.getFormat()), fb.getWidth(), fb.getHeight()); |
|
|
|
glFmt.internalFormat, fb.getWidth(), fb.getHeight()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|