예제 #1
0
 public void render(List<GuiTexture> guis) {
   shader.start();
   GL30.glBindVertexArray(quad.getVaoID());
   GL20.glEnableVertexAttribArray(0);
   GL11.glEnable(GL11.GL_BLEND);
   GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
   GL11.glDisable(GL11.GL_DEPTH_TEST);
   for (GuiTexture gui : guis) {
     GL13.glActiveTexture(GL13.GL_TEXTURE0);
     GL11.glBindTexture(GL11.GL_TEXTURE_2D, gui.getTexture());
     Matrix4f matrix = Maths.createTransformationMatrix(gui.getPosition(), gui.getScale());
     shader.loadTransformation(matrix);
     GL11.glDrawArrays(GL11.GL_TRIANGLE_STRIP, 0, quad.getVertexCount());
   }
   GL11.glEnable(GL11.GL_DEPTH_TEST);
   GL11.glDisable(GL11.GL_BLEND);
   GL20.glDisableVertexAttribArray(0);
   GL30.glBindVertexArray(0);
   shader.stop();
 }
예제 #2
0
 public void cleanUp() {
   shader.cleanUp();
 }