/** * Make sure that the given type is <code>GL_FLOAT</code>, and throw an * <code>IllegalArgumentException</code> if this is not the case. * * @param type The type constant * @throws IllegalArgumentException If the given type is not * <code>GL_FLOAT</code> */ static void validateFloatType(int type) { if (!isFloatType(type)) { throw new IllegalArgumentException( "The type is not GL_FLOAT, but " + GltfConstants.stringFor(type)); } }
/** * Make sure that the given type is <code>GL_INT</code> or * <code>GL_UNSIGNED_INT</code>, and throw an * <code>IllegalArgumentException</code> if this is not the case. * * @param type The type constant * @throws IllegalArgumentException If the given type is not * <code>GL_INT</code> or <code>GL_UNSIGNED_INT</code> */ static void validateIntType(int type) { if (!isIntType(type)) { throw new IllegalArgumentException( "The type is not GL_INT or GL_UNSIGNED_INT, but " + GltfConstants.stringFor(type)); } }
/** * Make sure that the given type is <code>GL_BYTE</code> or * <code>GL_UNSIGNED_BYTE</code>, and throw an * <code>IllegalArgumentException</code> if this is not the case. * * @param type The type constant * @throws IllegalArgumentException If the given type is not * <code>GL_BYTE</code> or <code>GL_UNSIGNED_BYTE</code> */ static void validateByteType(int type) { if (!isByteType(type)) { throw new IllegalArgumentException( "The type is not GL_BYTE or GL_UNSIGNED_BYTE, but " + GltfConstants.stringFor(type)); } }
/** * Make sure that the given type is <code>GL_SHORT</code> or * <code>GL_UNSIGNED_SHORT</code>, and throw an * <code>IllegalArgumentException</code> if this is not the case. * * @param type The type constant * @throws IllegalArgumentException If the given type is not * <code>GL_SHORT</code> or <code>GL_UNSIGNED_BYTE</code> */ static void validateShortType(int type) { if (!isShortType(type)) { throw new IllegalArgumentException( "The type is not GL_SHORT or GL_UNSIGNED_SHORT, but " + GltfConstants.stringFor(type)); } }
"The indices component type must be GL_UNSIGNED_BYTE," + "GL_UNSIGNED_SHORT or GL_UNSIGNED_INT, but is " + GltfConstants.stringFor(indicesComponentType));
"The indices component type must be GL_UNSIGNED_BYTE," + "GL_UNSIGNED_SHORT or GL_UNSIGNED_INT, but is " + GltfConstants.stringFor(indicesComponentType));
GltfConstants.stringFor(type));
GltfConstants.stringFor(type));
GltfConstants.stringFor(type));
GltfConstants.stringFor(type));
GltfConstants.stringFor(type));
GltfConstants.stringFor(type));
GltfConstants.stringFor(accessorModel.getComponentType()) + " - expected GL_FLOAT");
GltfConstants.stringFor(accessor.getComponentType()); int componentSizeInBytes = Accessors.getNumBytesForAccessorComponentType(componentType);