public void render(int delta) { glClearColor(0.5f, 0.5f, 0.8f, 1.0f); glClearDepth(1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); update(); // Like a cake, this has layers. We want ground at the bottom so it goes first. for (AbstractEntity e : Window.ground) { e.draw(); } for (AbstractEntity e : Window.entities) { e.update(delta); e.draw(); } if (Window.leftButtonHeld) { drawLineBox(Window.iMouseX, Window.iMouseY, Window.mouseX, Window.mouseY, true); } renderer.flushQueue(); drawFPS(fps); }
// </editor-fold> // <editor-fold defaultstate="collapsed" desc="various drawing methods"> public void drawDot(float x, float y, float r, float g, float b, float a, float size) { Quad2D quad = new Quad2D(x, y, size, size, r, g, b, a); renderer.queue(quad); }