int verts = g.getVertQuantity(); if (verts < 0) verts = g.getVertices().length;
int verts = g.getVertices().length;
    public void prepVBO(Geometry g) {        if (!GLContext.OpenGL15) return;        int verts = g.getVertQuantity();        if (verts < 0) verts = g.getVertices().length;        if (g.isVBOVertexEnabled() && g.getVBOVertexID() <= 0) {            GL15.glGenBuffers(buf);            g.setVBOVertexID(buf.get(0));            GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, g.getVBOVertexID());            GL15.glBufferData(GL15.GL_ARRAY_BUFFER, verts * 3 * 4, g                    .getVerticeAsFloatBuffer(), GL15.GL_STATIC_DRAW);            buf.clear();        }        if (g.isVBONormalEnabled() && g.getVBONormalID() <= 0) {            GL15.glGenBuffers(buf);            g.setVBONormalID(buf.get(0));            GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, g.getVBONormalID());            GL15.glBufferData(GL15.GL_ARRAY_BUFFER, verts * 3 * 4, g                    .getNormalAsFloatBuffer(), GL15.GL_STATIC_DRAW);            buf.clear();        }        if (g.isVBOColorEnabled() && g.getVBOColorID() <= 0) {            GL15.glGenBuffers(buf);            g.setVBOColorID(buf.get(0));            GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, g.getVBOColorID());            GL15.glBufferData(GL15.GL_ARRAY_BUFFER, verts * 4 * 4, g                    .getColorAsFloatBuffer(), GL15.GL_STATIC_DRAW);            buf.clear();        }        if (g.isVBOTextureEnabled()) {            for (int i = 0; i < g.getNumberOfUnits(); i++) {                if (g.getVBOTextureID(i) <= 0                        && g.getTextureAsFloatBuffer(i) != null) {                    GL15.glGenBuffers(buf);                    g.setVBOTextureID(i, buf.get(0));                    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, g                            .getVBOTextureID(i));                    GL15.glBufferData(GL15.GL_ARRAY_BUFFER, verts * 2 * 4, g                            .getTextureAsFloatBuffer(i), GL15.GL_STATIC_DRAW);                    buf.clear();                }            }        }        buf.clear();        GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);    }