Esempio n. 1
0
        //primitives
        public virtual void begin(IRenderTarget target, GLSortMode mode)
        {
            if (_begin)
            {
                throw new InvalidOperationException("You must call end before you can call begin again.");
            }

            if (_stateStack.Count > 0)
            {
                throw new InvalidOperationException("State stack was not empty.");
            }

            if (_clipStack.Count > 0)
            {
                throw new InvalidOperationException("Clipping stack was not empty.");
            }

            if (_effectStack.Count > 0)
            {
                throw new InvalidOperationException("Effect stack was not empty.");
            }

            _target          = target;
            _begin           = true;
            _sortMode        = mode;
            _renderableIndex = 0;
            _clipping        = AxisAlignedBox2.Null;
            _effect          = null;
            //_currentMatrix = Matrix3.Identity;
            _state = GLState.empty;

            _target.enable();
            //check other settings
        }
Esempio n. 2
0
        public override void begin(IRenderTarget target, GLSortMode mode)
        {
            instance = this;
            //Matrix4.Compose(new Vector3(-(int)position.X, -(int)position.Y, 0), Vector3.UnitScale, Quaternion.Zero);

            base.begin(target, mode);

            _maxDepth = 0f;
            _minDepth = 0f;
        }