本文整理汇总了Java中org.lwjgl.opengl.GL11.GL_UNSIGNED_INT属性的典型用法代码示例。如果您正苦于以下问题:Java GL11.GL_UNSIGNED_INT属性的具体用法?Java GL11.GL_UNSIGNED_INT怎么用?Java GL11.GL_UNSIGNED_INT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.GL_UNSIGNED_INT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateData
public VBO updateData(IntBuffer buffer, long offset)
{
if (this.type != GL11.GL_UNSIGNED_INT)
{
throw new IllegalArgumentException("Cannot store mismatching type in buffer!");
}
if (offset + buffer.limit() > this.length)
{
int usage = GL15.glGetBufferParameteri(this.target, GL15.GL_BUFFER_USAGE);
this.putData(buffer, this.normalized, usage);
}
GL15.glBindBuffer(this.target, this.handle);
GL15.glBufferSubData(this.target, offset, buffer);
return this;
}
示例2: calcBytesPerVertex
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;
}
示例3: putData
public VBO putData(IntBuffer buffer, boolean normalized, int usage)
{
GL15.glBindBuffer(this.target, this.handle);
GL15.glBufferData(this.target, buffer, usage);
this.type = GL11.GL_UNSIGNED_INT;
this.normalized = normalized;
this.length = buffer.limit();
return this;
}
示例4: calcBytesPerVertex
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;
}