本文整理汇总了Java中org.lwjgl.opengl.GL11.glPointSize方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glPointSize方法的具体用法?Java GL11.glPointSize怎么用?Java GL11.glPointSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.glPointSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderAirParticle
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void renderAirParticle(float particleProgress) {
int xStart = (width - xSize) / 2;
int yStart = (height - ySize) / 2;
float x = xStart + 117F;
float y = yStart + 50.5F;
if (particleProgress < 0.5F) {
y += particleProgress * 56;
} else if (particleProgress < 0.7F) {
y += 28F;
x -= (particleProgress - 0.5F) * 90;
} else {
y += 28F;
x -= 18;
y -= (particleProgress - 0.7F) * 70;
}
BufferBuilder wr = Tessellator.getInstance().getBuffer();
GL11.glPointSize(5);
wr.begin(GL11.GL_POINTS, DefaultVertexFormats.POSITION);
wr.pos(x, y, zLevel).endVertex();
Tessellator.getInstance().draw();
}
示例2: render
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void render()
{
//Line
GL11.glLineWidth(1.0f);
GL11.glColor3f(0.0f, 0.0f, 0.0f);
GL11.glBegin(GL11.GL_LINES);
GraphicsUtil.glVertex(a.pos);
GraphicsUtil.glVertex(b.pos);
GL11.glEnd();
//Arrow
if (type == Type.END && abLen > ARROW_LENGTH)
{
Vec3 n = Vec3.sub(Main.instance().getCamera().pos, b.pos).cross(ab).normalize();
GL11.glBegin(GL11.GL_TRIANGLES);
GraphicsUtil.glVertex(Vec3.madd(b.pos, n, ARROW_WIDTH).madd(ab, -ARROW_LENGTH));
GraphicsUtil.glVertex(b.pos);
GraphicsUtil.glVertex(Vec3.madd(b.pos, n, -ARROW_WIDTH).madd(ab, -ARROW_LENGTH));
GL11.glEnd();
}
//Point
GL11.glPointSize(4.0f);
GL11.glBegin(GL11.GL_POINTS);
if (Main.instance().getFocus() == a) GL11.glColor3f(0.75f, 0.75f, 1.0f);
else GL11.glColor3f(0.0f, 0.0f, 0.0f);
GraphicsUtil.glVertex(a.pos);
if (type == Type.END)
{
if (Main.instance().getFocus() == b) GL11.glColor3f(0.75f, 0.75f, 1.0f);
else GL11.glColor3f(0.0f, 0.0f, 0.0f);
GraphicsUtil.glVertex(b.pos);
}
GL11.glEnd();
}
示例3: glPointSize
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.opengl.renderer.SGL#glPointSize(float)
*/
public void glPointSize(float size) {
GL11.glPointSize(size);
}