本文整理汇总了Java中org.lwjgl.opengl.GL11.GL_QUADS属性的典型用法代码示例。如果您正苦于以下问题:Java GL11.GL_QUADS属性的具体用法?Java GL11.GL_QUADS怎么用?Java GL11.GL_QUADS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.GL_QUADS属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawCuboid
private static void drawCuboid(final BufferBuilder buffer, final BlockPos begin, final BlockPos end, final int sides, final int argb, final double delta) {
if (buffer.getDrawMode() == -1 || sides == 0) {
return;
}
final double x0 = begin.getX() - delta;
final double y0 = begin.getY() - delta;
final double z0 = begin.getZ() - delta;
final double x1 = end.getX() + 1 + delta;
final double y1 = end.getY() + 1 + delta;
final double z1 = end.getZ() + 1 + delta;
switch (buffer.getDrawMode()) {
case GL11.GL_QUADS:
drawQuads(buffer, x0, y0, z0, x1, y1, z1, sides, argb);
break;
case GL11.GL_LINES:
drawLines(buffer, x0, y0, z0, x1, y1, z1, sides, argb);
break;
default:
throw new IllegalStateException("Unsupported mode!");
}
}
示例2: isSplittable
/**
* Check if the geometry being created can be split at the current index
*
* @param count The current index
* @param type The type of geometry being built
* @return True if the geometry can be split at the current index
*/
private boolean isSplittable(int count, int type) {
switch (type) {
case GL11.GL_QUADS:
return count % 4 == 0;
case GL11.GL_TRIANGLES:
return count % 3 == 0;
case GL11.GL_LINE:
return count % 2 == 0;
}
return false;
}