Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package model; import org.lwjgl.opengl.GL11; /** * * @author mati */ public class Axis implements Renderable { final float length = 10; @Override public void render() { GL11.glBegin(GL11.GL_LINES); GL11.glColor3f(1, 0, 0); GL11.glVertex3f(0, 0, 0); GL11.glVertex3f(length, 0, 0); GL11.glColor3f(0, 1, 0); GL11.glVertex3f(0, 0, 0); GL11.glVertex3f(0, length, 0); GL11.glColor3f(0, 0, 1); GL11.glVertex3f(0, 0, 0); GL11.glVertex3f(0, 0, length); GL11.glEnd(); } }