Beispiel #1
0
        public void RenderOutsideSpriteBatch()
        {
            if (_model == null && _loadException == null)
            {
                LoadModel();
            }
            if (_model == null)
            {
                return;
            }

            Engine.Device.SamplerStates[0].AddressU = TextureAddressMode.Wrap;
            Engine.Device.SamplerStates[0].AddressV = TextureAddressMode.Wrap;

            _effect.Begin(SaveStateMode.None);

            _model.Update();
            Engine.Device.RenderState.DepthBufferEnable = true;
            Engine.Device.RenderState.CullMode          = CullMode.None;
            //Engine.Device.RenderState.FillMode = FillMode.WireFrame;
            _effect.TextureEnabled = true;
            _model.Render(Matrix.CreateScale(1.2f) * Matrix.CreateRotationY(2.55f));
            Engine.Device.RenderState.FillMode = FillMode.Solid;

            _effect.End();
        }