private static void checkImagesForCubeMap(Image... images) { if (images.length == 1) { return; } Format fmt = images[0].getFormat(); int width = images[0].getWidth(); int height = images[0].getHeight(); ByteBuffer data = images[0].getData(0); int size = data != null ? data.capacity() : 0; checkImage(images[0]); for (int i = 1; i < images.length; i++) { Image image = images[i]; checkImage(images[i]); if (image.getFormat() != fmt) { throw new IllegalArgumentException("Images must have same format"); } if (image.getWidth() != width || image.getHeight() != height) { throw new IllegalArgumentException("Images must have same resolution"); } ByteBuffer data2 = image.getData(0); if (data2 != null){ if (data2.capacity() != size) { throw new IllegalArgumentException("Images must have same size"); } } } }
private static void checkImagesForCubeMap(Image... images) { if (images.length == 1) { return; } Format fmt = images[0].getFormat(); int width = images[0].getWidth(); int height = images[0].getHeight(); ByteBuffer data = images[0].getData(0); int size = data != null ? data.capacity() : 0; checkImage(images[0]); for (int i = 1; i < images.length; i++) { Image image = images[i]; checkImage(images[i]); if (image.getFormat() != fmt) { throw new IllegalArgumentException("Images must have same format"); } if (image.getWidth() != width || image.getHeight() != height) { throw new IllegalArgumentException("Images must have same resolution"); } ByteBuffer data2 = image.getData(0); if (data2 != null){ if (data2.capacity() != size) { throw new IllegalArgumentException("Images must have same size"); } } } }
private static void checkImagesForCubeMap(Image... images) { if (images.length == 1) { return; } Format fmt = images[0].getFormat(); int width = images[0].getWidth(); int height = images[0].getHeight(); ByteBuffer data = images[0].getData(0); int size = data != null ? data.capacity() : 0; checkImage(images[0]); for (int i = 1; i < images.length; i++) { Image image = images[i]; checkImage(images[i]); if (image.getFormat() != fmt) { throw new IllegalArgumentException("Images must have same format"); } if (image.getWidth() != width || image.getHeight() != height) { throw new IllegalArgumentException("Images must have same resolution"); } ByteBuffer data2 = image.getData(0); if (data2 != null){ if (data2.capacity() != size) { throw new IllegalArgumentException("Images must have same size"); } } } }