Code example for Buffer

Methods: glVertexAttribPointer, position

0
        /** 
         * Bind buffer to shader attribute. 
         */ 
        @Override 
        public boolean bindAttribute(int target) {
            mBuffer.position(mOffset);
            glVertexAttribPointer(target, mSize, mType, false, mStride, mBuffer);
            return true; 
        } 
 
        /** 
         * Deletes the underlying data buffer of this ShaderAttributeBinder. 
         */ 
        @Override 
        public void delete() { 
            mBuffer = null;
        } 
    } 
 
    /** 
     * ShaderAttributeBinder implementation for GL VBO binding.