package me.hammerle.snuviengine.api; import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL30; public class GLHelper { private static int currentVao = -1; private static int currentVbo = -1; protected static void glBindVertexArray(int vao) { if(vao != currentVao) { currentVao = vao; GL30.glBindVertexArray(vao); } } protected static void glBindBuffer(int vbo) { if(vbo != currentVbo) { currentVbo = vbo; GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vbo); } } }