示例#1
0
        /// <summary>
        /// </summary>
        /// <param name="window">The BlWindow3D object for which this is to be the #BlGraphicsDeviceManager</param>
        public BlGraphicsDeviceManager(BlWindow3D window) : base(window)
        {
            CreationThread = Thread.CurrentThread.ManagedThreadId;
            this.Window    = window;
            window.Window.AllowUserResizing = true;
            window.IsMouseVisible           = true;

            // use 60Hz frame rate (unless a sleep to slow it down further is in the Draw method)
            window.IsFixedTimeStep = false;

            var light = new Light();

            light.LightDiffuseColor = new Vector3(.9f, .4f, .4f);
            light.LightDirection    = new Vector3(1, 0, -1);
            Lights.Add(light);

            light = new Light();
            light.LightDiffuseColor = new Vector3(.4f, .4f, .9f);
            light.LightDirection    = new Vector3(-1, 0, -1);
            Lights.Add(light);

            ResetCamera();
        }
示例#2
0
 public BlGuiControl(BlWindow3D window)
 {
     Window = window;
 }