if (g.getTextureBuffer(i) != null) { g.getTextureBuffer(i).rewind();
Object vboid; if ((vboid = vboMap.get(g.getTextureBuffer(i))) != null) { vbo.setVBOTextureID(i, ((Integer) vboid).intValue()); } else { g.getTextureBuffer(i).rewind();
    public void prepVBO(Geometry g) {        if (!capabilities.GL_ARB_vertex_buffer_object)            return;                VBOInfo vbo = g.getVBOInfo();                if (vbo.isVBOVertexEnabled() && vbo.getVBOVertexID() <= 0) {            if (g.getVertexBuffer() != null) {                g.getVertexBuffer().rewind();                buf.rewind();                ARBVertexBufferObject.glGenBuffersARB(buf);                vbo.setVBOVertexID(buf.get(0));                ARBVertexBufferObject.glBindBufferARB(                        ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vbo                                .getVBOVertexID());                ARBVertexBufferObject.glBufferDataARB(                        ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, g                                .getVertexBuffer(),                        ARBVertexBufferObject.GL_STATIC_DRAW_ARB);            }        }        if (vbo.isVBONormalEnabled() && vbo.getVBONormalID() <= 0) {            if (g.getNormalBuffer() != null) {                g.getNormalBuffer().rewind();                buf.rewind();	            ARBVertexBufferObject.glGenBuffersARB(buf);	            vbo.setVBONormalID(buf.get(0));                ARBVertexBufferObject.glBindBufferARB(                        ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vbo                                .getVBONormalID());                ARBVertexBufferObject.glBufferDataARB(                        ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, g                                .getNormalBuffer(),	            		ARBVertexBufferObject.GL_STATIC_DRAW_ARB);            }        }        if (vbo.isVBOColorEnabled() && vbo.getVBOColorID() <= 0) {            if (g.getColorBuffer() != null) {                g.getColorBuffer().rewind();                buf.rewind();            	ARBVertexBufferObject.glGenBuffersARB(buf);            	vbo.setVBOColorID(buf.get(0));                ARBVertexBufferObject.glBindBufferARB(                        ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vbo                                .getVBOColorID());                ARBVertexBufferObject.glBufferDataARB(                        ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, g                                .getColorBuffer(),                        ARBVertexBufferObject.GL_STATIC_DRAW_ARB);            }        }        if (vbo.isVBOTextureEnabled()) {            for (int i = 0; i < g.getNumberOfUnits(); i++) {                if (vbo.getVBOTextureID(i) <= 0                        && g.getTextureBuffer(i) != null) {                    if (g.getTextureBuffer(i) != null) {                        g.getTextureBuffer(i).rewind();                        buf.rewind();                        ARBVertexBufferObject.glGenBuffersARB(buf);                        vbo.setVBOTextureID(i, buf.get(0));                        ARBVertexBufferObject.glBindBufferARB(                                ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vbo                                        .getVBOTextureID(i));                        ARBVertexBufferObject.glBufferDataARB(                                ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, g                                        .getTextureBuffer(i),                                ARBVertexBufferObject.GL_STATIC_DRAW_ARB);                    }                }            }        }        buf.clear();    }