本文整理汇总了Java中org.lwjgl.opengl.GL11.glColor3d方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glColor3d方法的具体用法?Java GL11.glColor3d怎么用?Java GL11.glColor3d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.glColor3d方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawLogoutSpotTracer
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawLogoutSpotTracer(LogoutSpot l)
{
try
{
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_BLEND);
GL11.glLineWidth(1.5F);
GL11.glColor3d(l.red, l.green, l.blue);
GL11.glBegin(GL11.GL_LINE_LOOP);
GL11.glVertex3d(0, 0, 0);
GL11.glVertex3d(l.dX + 0.5, l.dY + 0.5, l.dZ + 0.5);
GL11.glEnd();
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
GL11.glPopMatrix();
}catch(Exception e) {}
}
示例2: drawWayPointTracer
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawWayPointTracer(Waypoint w)
{
try
{
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_BLEND);
GL11.glLineWidth(1.5F);
GL11.glColor3d(w.red, w.green, w.blue);
GL11.glBegin(GL11.GL_LINE_LOOP);
Vec3d eyes = new Vec3d(0, 0, 1).rotatePitch(-(float) Math.toRadians(Wrapper.getPlayer().rotationPitch)).rotateYaw(-(float) Math.toRadians(Wrapper.getPlayer().rotationYaw));
GL11.glVertex3d(eyes.xCoord, Wrapper.getPlayer().getEyeHeight() + eyes.yCoord, eyes.zCoord);
GL11.glVertex3d(w.dX + 0.5, w.dY + 0.5, w.dZ + 0.5);
GL11.glEnd();
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
GL11.glPopMatrix();
}catch(Exception e) {}
}