Code example for FloatBuffer

Methods: position, put

0
	 */ 
	mArea.set(rect);
	float height = mArea.height();
	float width  = mArea.width();
 
	mVertexBuf.position(0);
	// point 0 
	//mVertexBuf.put(0, (float)0); 
	//mVertexBuf.put(1, (float)0); 
	//mVertexBuf.put(2, (float)0); 
	// point 1 
	mVertexBuf.put(3, (float)width);
	//mVertexBuf.put(4, (float)0); 
	//mVertexBuf.put(5, (float)0); 
	// point 2 
	mVertexBuf.put(6, (float)width);
	mVertexBuf.put(7, (float)height);
	//mVertexBuf.put(8, (float)0); 
	// point 3 
	//mVertexBuf.put(9, (float)0); 
	mVertexBuf.put(10, (float)height);
	//mVertexBuf.put(11,(float)0); 
 
	mVertexBuf.position(0);
    } 
 
    public TextureObj getTexture() { 
	return mTextureObj;
    }