Code example for FloatBuffer

Methods: position, put

0
        cbb.order(ByteOrder.nativeOrder());
        _colorBuffer = cbb.asFloatBuffer();
         
              
        // fill buffers 
	    _vertexBuffer.put(coords);
	    _indexBuffer.put(_indicesArray);
	    _colorBuffer.put(colors);
	     
	  
	    // set positions 
	    _vertexBuffer.position(0);
	    _indexBuffer.position(0);
	    _colorBuffer.position(0);
	} 
	 
	 
	@Override 
	public void onDrawFrame(GL10 gl) {
		/* 
         * By default, OpenGL enables features that improve quality