|
|
|
@ -85,6 +85,7 @@ public class LwjglRenderer implements Renderer { |
|
|
|
|
private final StringBuilder stringBuf = new StringBuilder(250); |
|
|
|
|
private final IntBuffer intBuf1 = BufferUtils.createIntBuffer(1); |
|
|
|
|
private final IntBuffer intBuf16 = BufferUtils.createIntBuffer(16); |
|
|
|
|
private final FloatBuffer floatBuf16 = BufferUtils.createFloatBuffer(16); |
|
|
|
|
private final RenderContext context = new RenderContext(); |
|
|
|
|
private final NativeObjectManager objManager = new NativeObjectManager(); |
|
|
|
|
private final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class); |
|
|
|
@ -1851,6 +1852,17 @@ public class LwjglRenderer implements Renderer { |
|
|
|
|
throw new RendererException("Multisample textures not supported by graphics hardware"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (target == GL_TEXTURE_CUBE_MAP) { |
|
|
|
|
// Check max texture size before upload
|
|
|
|
|
if (img.getWidth() > maxCubeTexSize || img.getHeight() > maxCubeTexSize) { |
|
|
|
|
throw new RendererException("Cannot upload cubemap " + img + ". The maximum supported cubemap resolution is " + maxCubeTexSize); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (img.getWidth() > maxTexSize || img.getHeight() > maxTexSize) { |
|
|
|
|
throw new RendererException("Cannot upload texture " + img + ". The maximum supported texture resolution is " + maxTexSize); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (target == GL_TEXTURE_CUBE_MAP) { |
|
|
|
|
List<ByteBuffer> data = img.getData(); |
|
|
|
|