本文整理汇总了Java中org.lwjgl.opengl.GL11.glClearStencil方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glClearStencil方法的具体用法?Java GL11.glClearStencil怎么用?Java GL11.glClearStencil使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.glClearStencil方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderOne
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void renderOne(final Entity ent) {
if (!checkValidity((EntityLivingBase)ent)) {
return;
}
GL11.glPushAttrib(1048575);
GL11.glDisable(3008);
GL11.glDisable(3553);
GL11.glDisable(2896);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glLineWidth(0.2f);
GL11.glEnable(2848);
GL11.glHint(3154, 4354);
GL11.glEnable(2960);
GL11.glClear(1024);
GL11.glClearStencil(15);
GL11.glStencilFunc(512, 1, 15);
GL11.glStencilOp(7681, 7681, 7681);
colorLines(ent);
GL11.glLineWidth(1.5f);
GL11.glStencilOp(7681, 7681, 7681);
GL11.glPolygonMode(1032, 6913);
}
示例2: render
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void render()
{
GL11.glClearColor(SKY_COLOR, SKY_COLOR, SKY_COLOR, 0.0f);
GL11.glClearStencil(0);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_STENCIL_BUFFER_BIT);
GL11.glColor3f(GROUND_COLOR, GROUND_COLOR, GROUND_COLOR);
GL11.glBegin(GL11.GL_QUADS);
GL11.glVertex3f(-1.0f, -1.0f, 1.0f);
GL11.glVertex3f(-1.0f, 0.0f, 1.0f);
GL11.glVertex3f(1.0f, 0.0f, 1.0f);
GL11.glVertex3f(1.0f, -1.0f, 1.0f);
GL11.glVertex3f(-1.0f, -1.0f, -1.0f);
GL11.glVertex3f(-1.0f, 0.0f, -1.f);
GL11.glVertex3f(1.0f, 0.0f, -1.0f);
GL11.glVertex3f(1.0f, -1.0f, -1.0f);
GL11.glVertex3f(1.0f, -1.0f, -1.0f);
GL11.glVertex3f(1.0f, 0.0f, -1.0f);
GL11.glVertex3f(1.0f, 0.0f, 1.0f);
GL11.glVertex3f(1.0f, -1.0f, 1.0f);
GL11.glVertex3f(-1.0f, -1.0f, -1.0f);
GL11.glVertex3f(-1.0f, 0.0f, -1.0f);
GL11.glVertex3f(-1.0f, 0.0f, 1.0f);
GL11.glVertex3f(-1.0f, -1.0f, 1.0f);
GL11.glVertex3f(-1.0f, -1.0f, -1.0f);
GL11.glVertex3f(-1.0f, -1.0f, 1.0f);
GL11.glVertex3f(1.0f, -1.0f, 1.0f);
GL11.glVertex3f(1.0f, -1.0f, -1.0f);
GL11.glEnd();
}