예제 #1
0
        public void InitializeDevice()
        {
            Form.ClientSize = new Size(Width, Height);

            _meshFactory = new MeshFactory(this);
            MeshFactory  = _meshFactory;

            effect = new BasicEffect(Device);

            // Set light
            //effect.LightingEnabled = true;
            //effect.AmbientLightColor = Color.Gray.ToVector3();
            //effect.DirectionalLight0.Enabled = true;
            //effect.DirectionalLight0.DiffuseColor = Color.LemonChiffon.ToVector3();
            effect.EnableDefaultLighting();

            Device.RasterizerState = RasterizerState.CullNone;

            UpdateView();
            LibraryManager.LibraryStarted();

            Info.SetDevice(Device);
        }
예제 #2
0
        public void InitializeDevice()
        {
            Form.ClientSize = new Size(Width, Height);

            _meshFactory = new MeshFactory(this);
            MeshFactory = _meshFactory;

            effect = new BasicEffect(Device);

            // Set light
            //effect.LightingEnabled = true;
            //effect.AmbientLightColor = Color.Gray.ToVector3();
            //effect.DirectionalLight0.Enabled = true;
            //effect.DirectionalLight0.DiffuseColor = Color.LemonChiffon.ToVector3();
            effect.EnableDefaultLighting();

            Device.RasterizerState = RasterizerState.CullNone;

            UpdateView();
            LibraryManager.LibraryStarted();

            Info.SetDevice(Device);
        }