protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this._device != null)
         {
             this._device.Dispose();
         }
         this._camera = Direct3DCamera.Empty;
         this._materials.Clear();
         this._textures.Clear();
         this._fov      = float.NaN;
         this._clipNear = float.NaN;
         this._clipFar  = float.NaN;
         this._aspect   = float.NaN;
         this._adpNum   = int.MinValue;
     }
 }
 //***************************************************************************
 // Class Constructors
 //
 private Graphics3D()
 {
     this._materials                            = new MaterialCollection();
     this._textures                             = new TextureCollection();
     this._meshes                               = new MeshObjectCollection();
     this._vertBuffers                          = new VertexBufferCollection();
     this._presentParams                        = new PresentParameters();
     this._presentParams.Windowed               = true;
     this._presentParams.SwapEffect             = SwapEffect.Discard;
     this._presentParams.AutoDepthStencilFormat = DepthFormat.D16;
     this._presentParams.EnableAutoDepthStencil = true;
     this._fov      = ((float)System.Math.PI / 4.0f);
     this._clipNear = 1.0f;
     this._clipFar  = 50.0f;
     this._aspect   = 1.333f;
     this._minVS    = new Version(0, 0);
     this._minPS    = new Version(0, 0);
     this._camera   = new Direct3DCamera();
 }
Example #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this._device != null)
             this._device.Dispose();
         this._camera = Direct3DCamera.Empty;
         this._materials.Clear();
         this._textures.Clear();
         this._fov = float.NaN;
         this._clipNear = float.NaN;
         this._clipFar = float.NaN;
         this._aspect = float.NaN;
         this._adpNum = int.MinValue;
     }
 }
Example #4
0
 //***************************************************************************
 // Class Constructors
 // 
 private Graphics3D()
 {
     this._materials = new MaterialCollection();
     this._textures = new TextureCollection();
     this._meshes = new MeshObjectCollection();
     this._vertBuffers = new VertexBufferCollection();
     this._presentParams = new PresentParameters();
     this._presentParams.Windowed = true;
     this._presentParams.SwapEffect = SwapEffect.Discard;
     this._presentParams.AutoDepthStencilFormat = DepthFormat.D16;
     this._presentParams.EnableAutoDepthStencil = true;
     this._fov = ((float)System.Math.PI / 4.0f);
     this._clipNear = 1.0f;
     this._clipFar = 50.0f;
     this._aspect = 1.333f;
     this._minVS = new Version(0, 0);
     this._minPS = new Version(0, 0);
     this._camera = new Direct3DCamera();
 }