Java examples for javax.media.opengl:GL
opengl draw Small Point At
/******************************************************************************* * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, available at http://caleydo.org/license ******************************************************************************/ import javax.media.opengl.GL; import javax.media.opengl.GL2; public class Main{ public static void drawSmallPointAt(final GL2 gl, float x, float y, float z) { gl.glColor4f(1, 0, 0, 1);/*w ww.j a v a2 s . co m*/ gl.glLineWidth(0.5f); gl.glBegin(GL.GL_LINES); gl.glVertex3f(x - 0.5f, y, z); gl.glVertex3f(x + 0.5f, y, z); gl.glVertex3f(x, y - 0.5f, z); gl.glVertex3f(x, y + 0.5f, z); gl.glEnd(); } }