Ejemplo n.º 1
0
 protected virtual void Dispose( bool disposing )
 {
     if( disposing ) {
     if( this._data != null ) {
       Console.WriteLine( "~Image, bytes[{0}]", this._data.Length );
       this._data = null;
       if( this.resource != null ) {
     this.resource.Dispose();
     this.resource = null;
       }
       Console.WriteLine( "~Image done" );
     }
       }
 }
Ejemplo n.º 2
0
 protected virtual void Dispose( bool disposing )
 {
     if( disposing ) {
     if( this.isValid ) {
       Console.WriteLine( "~Material {0}", this.name );
       this.isValid = false;
       foreach( var texture in this.texturesList ) {
     if( texture.Value.resource != null ) {
       texture.Value.resource.Dec();
     }
       }
       if( this.resource != null ) {
     this.resource.Dispose();
     this.resource = null;
     if( this.shader != null ) {
       this.shader.Dec();
     }
     this.shader = null;
       }
       Console.WriteLine( "~Material {0} done", this.name );
     }
       }
 }
Ejemplo n.º 3
0
 protected virtual void Dispose( bool disposing )
 {
     if( disposing ) {
     if( this.descriptor != 0 ) {
       Console.WriteLine( "~Texture {0}", this.name );
       GL.DeleteTexture( this.descriptor );
       this._descriptor = 0;
       if( this.resource != null ) {
     this.resource.Dispose();
     this.resource = null;
       }
       Console.WriteLine( "~Texture {0} done", this.name );
     }
       }
 }
Ejemplo n.º 4
0
 protected virtual void Dispose( bool disposing )
 {
     if( disposing ) {
     if( this.isValid ) {
       Console.WriteLine( "~Model {0}", this.name );
       this.isValid = false;
       if( this.resource != null ) {
     this.resource.Dispose();
     this.resource = null;
     if( this.mesh != null ) {
       this.mesh.Dec();
     }
     this.mesh = null;
     if( this.material != null ) {
       this.material.Dec();
     }
     this.material = null;
       }
       Console.WriteLine( "~Model {0} done", this.name );
     }
       }
 }
Ejemplo n.º 5
0
Archivo: Mesh.cs Proyecto: KoMaTo3/csgl
 protected virtual void Dispose( bool disposing )
 {
     if( disposing ) {
     if( this.vertices != null ) {
       Console.WriteLine( "~Mesh {0}", this.name );
       this._vertices = null;
       this._colors = null;
       this._texCoords = null;
       this._normals = null;
       this._indices = null;
       if( this.resource != null ) {
     this.resource.Dispose();
     this.resource = null;
       }
       Console.WriteLine( "~Mesh {0} done", this.name );
     }
       }
 }