Esempio n. 1
0
        // ===========================================================
        // Methods
        // ===========================================================

        public void SelectOnHardware(GL11 pGL11)
        {
            int hardwareBufferID = this.mHardwareBufferID;

            if (hardwareBufferID == -1)
            {
                return;
            }

            GLHelper.BindBuffer(pGL11, hardwareBufferID); // TODO Does this always need to be binded, or are just for buffers of the same 'type'(texture/vertex)?

            if (this.mHardwareBufferNeedsUpdate)
            {
                //			Debug.d("BufferObject.updating: ID = "  + this.mHardwareBufferID);
                this.mHardwareBufferNeedsUpdate = false;
                //synchronized(this) {
                lock (_methodLock)
                {
                    GLHelper.BufferData(pGL11, this.mFloatBuffer.mByteBuffer, this.mDrawType);
                }
            }
        }