public void draw( GL2ES3 gl, int xyVbo, int flagsVbo, int mileageVbo, int rgbaVbo, int first, int count) { gl.glBindBuffer(GL_ARRAY_BUFFER, xyVbo); gl.glVertexAttribPointer(this.handles.inXy, 2, GL_FLOAT, false, 0, 0); gl.glBindBuffer(GL_ARRAY_BUFFER, flagsVbo); gl.glVertexAttribIPointer(this.handles.inFlags, 1, GL_BYTE, 0, 0); gl.glBindBuffer(GL_ARRAY_BUFFER, mileageVbo); gl.glVertexAttribPointer(this.handles.inMileage, 1, GL_FLOAT, false, 0, 0); gl.glBindBuffer(GL_ARRAY_BUFFER, rgbaVbo); gl.glVertexAttribPointer(this.handles.inRgba, 1, GL_FLOAT, false, 0, 0); gl.glDrawArrays(GL_LINE_STRIP_ADJACENCY, first, count); }
public void draw( GL2ES3 gl, GLStreamingBuffer xyVbo, GLStreamingBuffer flagsVbo, GLStreamingBuffer mileageVbo, GLStreamingBuffer rgbaVbo, int first, int count) { gl.glBindBuffer(GL_ARRAY_BUFFER, xyVbo.buffer(gl)); gl.glVertexAttribPointer(this.handles.inXy, 2, GL_FLOAT, false, 0, xyVbo.sealedOffset()); gl.glBindBuffer(GL_ARRAY_BUFFER, flagsVbo.buffer(gl)); gl.glVertexAttribIPointer(this.handles.inFlags, 1, GL_BYTE, 0, flagsVbo.sealedOffset()); gl.glBindBuffer(GL_ARRAY_BUFFER, mileageVbo.buffer(gl)); gl.glVertexAttribPointer( this.handles.inMileage, 1, GL_FLOAT, false, 0, mileageVbo.sealedOffset()); gl.glBindBuffer(GL_ARRAY_BUFFER, rgbaVbo.buffer(gl)); gl.glVertexAttribPointer(this.handles.inRgba, 4, GL_FLOAT, false, 0, rgbaVbo.sealedOffset()); gl.glDrawArrays(GL_LINE_STRIP_ADJACENCY, first, count); }