List of usage examples for org.lwjgl.opengl GL11 glPointSize
public static void glPointSize(@NativeType("GLfloat") float size)
From source file:shadowmage.meim.client.gui.GuiTextureElement.java
License:Open Source License
@Override public void drawElement(int mouseX, int mouseY) { int x = renderPosX + guiLeft; int y = renderPosY + guiTop; int x1 = x;//from w w w . j a v a2s. co m int y1 = y; int x2 = x; int y2 = y + height; int x3 = x + width; int y3 = y + height; int x4 = x + width; int y4 = y; float pixX = 1.f / (float) image.getWidth(); float pixY = 1.f / (float) image.getHeight(); float u1, v1, u2, v2, u3, v3, u4, v4; float uw, uh; uw = scale;//image.getWidth() * pixX * scale; uh = scale; float u = pixX * (float) viewX; float v = pixY * (float) viewY; v = v > 1 ? 1 : v; u1 = u; v1 = v; u2 = u; v2 = v + uh; u3 = u + uw; v3 = v + uh; u4 = u + uw; v4 = v; bindTexture(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2f(u1, v1); GL11.glVertex3f(x1, y1, 0); GL11.glTexCoord2f(u2, v2); GL11.glVertex3f(x2, y2, 0); GL11.glTexCoord2f(u3, v3); GL11.glVertex3f(x3, y3, 0); GL11.glTexCoord2f(u4, v4); GL11.glVertex3f(x4, y4, 0); GL11.glEnd(); resetBoundTexture(); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glColor4f(1.f, 0.f, 0.f, 1.f); GL11.glPointSize(5); GL11.glBegin(GL11.GL_POINTS); GL11.glVertex3f(x, y, 0.f); GL11.glEnd(); GL11.glColor4f(1.f, 1.f, 1.f, 1.f); GL11.glEnable(GL11.GL_TEXTURE_2D); }
From source file:taiga.gpvm.render.ColorEntityRenderer.java
License:Open Source License
@Override public void render(Collection<Entity> ents, int pass, ReadableMatrix4 proj, ReadableMatrix4 modelview) { if (pass != HardcodedValues.OPAQUE_WORLD_LAYER) return;/*from w w w .j a v a 2 s . c o m*/ ARBShaderObjects.glUseProgramObjectARB(0); GL11.glPointSize(size); FloatBuffer buffer = BufferUtils.createFloatBuffer(16); proj.store(buffer, false); buffer.flip(); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadMatrix(buffer); buffer.rewind(); modelview.store(buffer, false); buffer.flip(); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadMatrix(buffer); GL11.glBegin(GL11.GL_POINTS); for (Entity ent : ents) { ReadableVector3f loc = ent.getBounds().getCenter(); GL11.glVertex3f(loc.getX(), loc.getY(), loc.getZ()); GL11.glColor3f(red, green, blue); } GL11.glEnd(); }
From source file:taiga.mcmods.buildguide.BlockMarker.java
@SubscribeEvent(priority = EventPriority.HIGHEST) public void renderMarkers(RenderHandEvent event) { if (!visible) return;/*from w w w. ja v a2s . c o m*/ if (deletelist) { //GL11.glDeleteLists(displaylist, 0); //displaylist = -1; deletelist = false; } transformToPlayer(); GL11.glPointSize(10); if (regendisplist) createDisplayList(); else if (displaylist != -1) GL11.glCallList(displaylist); GL11.glPopMatrix(); }
From source file:thebounzer.org.lwgldemo.Chapter5.java
License:Open Source License
@Override public void configure() { shaders.add(new GenericShader("src/main/resources/shadersCap5/shader.vert", GL20.GL_VERTEX_SHADER)); shaders.add(new GenericShader("src/main/resources/shadersCap5/shader.frag", GL20.GL_FRAGMENT_SHADER)); vaoId = GL30.glGenVertexArrays();// w w w .j ava 2 s .co m GL30.glBindVertexArray(vaoId); GL11.glPointSize(5.0f); try { createAndBindVertexObject(vertex); } catch (IOException ex) { Logger.getLogger(Chapter5.class.getName()).log(Level.SEVERE, null, ex); } shaderSetup(); FloatBuffer matrixProjBuff = BufferUtils.createFloatBuffer(16); projMat.store(matrixProjBuff); matrixProjBuff.flip(); }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static void glPointSize(float a) { GL11.glPointSize(a); }