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 vengine; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; /** * * @author yew_mentzaki */ public abstract class VGraphicLayer { private boolean inited; public void set() { if (!inited) { init(); inited = true; } GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0, Display.getWidth(), Display.getHeight(), 0, 1, -1); GL11.glMatrixMode(GL11.GL_MODELVIEW); } public void init() { } public abstract void render(VGraphics g); }