|
|
@ -906,7 +906,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
// case Geometry:
|
|
|
|
// case Geometry:
|
|
|
|
// return ARBGeometryShader4.GL_GEOMETRY_SHADER_ARB;
|
|
|
|
// return ARBGeometryShader4.GL_GEOMETRY_SHADER_ARB;
|
|
|
|
default: |
|
|
|
default: |
|
|
|
throw new RuntimeException("Unrecognized shader type."); |
|
|
|
throw new UnsupportedOperationException("Unrecognized shader type."); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1219,7 +1219,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
throw ex; |
|
|
|
throw ex; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
throw new UnsupportedOperationException("EXT_framebuffer_blit required."); |
|
|
|
throw new RendererException("EXT_framebuffer_blit required."); |
|
|
|
// TODO: support non-blit copies?
|
|
|
|
// TODO: support non-blit copies?
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1269,10 +1269,12 @@ public class LwjglRenderer 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."); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TextureUtil.checkFormatSupported(rb.getFormat()); |
|
|
|
|
|
|
|
|
|
|
|
if (fb.getSamples() > 1 && GLContext.getCapabilities().GL_EXT_framebuffer_multisample) { |
|
|
|
if (fb.getSamples() > 1 && GLContext.getCapabilities().GL_EXT_framebuffer_multisample) { |
|
|
|
int samples = fb.getSamples(); |
|
|
|
int samples = fb.getSamples(); |
|
|
|
if (maxFBOSamples < samples) { |
|
|
|
if (maxFBOSamples < samples) { |
|
|
@ -1457,7 +1459,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (fb.isMultiTarget()) { |
|
|
|
if (fb.isMultiTarget()) { |
|
|
|
if (fb.getNumColorBuffers() > maxMRTFBOAttachs) { |
|
|
|
if (fb.getNumColorBuffers() > maxMRTFBOAttachs) { |
|
|
|
throw new UnsupportedOperationException("Framebuffer has more" |
|
|
|
throw new RendererException("Framebuffer has more" |
|
|
|
+ " targets than are supported" |
|
|
|
+ " targets than are supported" |
|
|
|
+ " on the system!"); |
|
|
|
+ " on the system!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -1843,7 +1845,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
case Stream: |
|
|
|
case Stream: |
|
|
|
return GL_STREAM_DRAW; |
|
|
|
return GL_STREAM_DRAW; |
|
|
|
default: |
|
|
|
default: |
|
|
|
throw new RuntimeException("Unknown usage type."); |
|
|
|
throw new UnsupportedOperationException("Unknown usage type."); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1869,7 +1871,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
case Double: |
|
|
|
case Double: |
|
|
|
return GL_DOUBLE; |
|
|
|
return GL_DOUBLE; |
|
|
|
default: |
|
|
|
default: |
|
|
|
throw new RuntimeException("Unknown buffer format."); |
|
|
|
throw new UnsupportedOperationException("Unknown buffer format."); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1929,7 +1931,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
glBufferData(target, (DoubleBuffer) vb.getData(), usage); |
|
|
|
glBufferData(target, (DoubleBuffer) vb.getData(), usage); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
throw new RuntimeException("Unknown buffer format."); |
|
|
|
throw new UnsupportedOperationException("Unknown buffer format."); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
switch (vb.getFormat()) { |
|
|
|
switch (vb.getFormat()) { |
|
|
@ -1952,7 +1954,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
glBufferSubData(target, 0, (DoubleBuffer) vb.getData()); |
|
|
|
glBufferSubData(target, 0, (DoubleBuffer) vb.getData()); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
throw new RuntimeException("Unknown buffer format."); |
|
|
|
throw new UnsupportedOperationException("Unknown buffer format."); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// }else{
|
|
|
|
// }else{
|
|
|
|