Java Code Examples for org.lwjgl.opengl.GL11#GL_FLOAT

The following examples show how to use org.lwjgl.opengl.GL11#GL_FLOAT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Attribute.java    From LowPolyWater with The Unlicense 5 votes vote down vote up
private int calcBytesPerVertex() {
	if (dataType == GL11.GL_FLOAT || dataType == GL11.GL_UNSIGNED_INT || dataType == GL11.GL_INT) {
		return 4 * componentCount;
	} else if (dataType == GL11.GL_SHORT || dataType == GL11.GL_UNSIGNED_SHORT) {
		return 2 * componentCount;
	} else if (dataType == GL11.GL_BYTE || dataType == GL11.GL_UNSIGNED_BYTE) {
		return 1 * componentCount;
	} else if (dataType == GL12.GL_UNSIGNED_INT_2_10_10_10_REV) {
		return 4;
	}
	System.err.println("Unsupported data type for VAO attribute: " + dataType);
	return 0;
}