protected override void freeInternalResources() { if (_texture != null) { _texture.Dispose(); _texture = null; } if (_normTexture != null) { _normTexture.Dispose(); _normTexture = null; } if (_cubeTexture != null) { _cubeTexture.Dispose(); _cubeTexture = null; } #if !SILVERLIGHT if (_volumeTexture != null) { _volumeTexture.Dispose(); _volumeTexture = null; } #endif }
} // Dispose(someObject) /// <summary> /// Dispose /// </summary> /// <param name="someObject">Some object</param> public static void Dispose(ref TextureCube someObject) { if (someObject != null) { someObject.Dispose(); } someObject = null; } // Dispose(someObject)
public void NullDeviceShouldThrowArgumentNullException() { Assert.Throws <ArgumentNullException>(() => { var texture = new TextureCube(null, 16, false, SurfaceFormat.Color); texture.Dispose(); }); GC.GetTotalMemory(true); // collect uninitialized Texture }
} // PreScreenSkyCubeMapping() #endregion #region Dispose /// <summary> /// Dispose /// </summary> public override void Dispose() { if (skyCubeMapTexture != null) { skyCubeMapTexture.Dispose(); } skyCubeMapTexture = null; base.Dispose(); } // Dispose()
protected override void Dispose(bool disposing) { if (textureCubeMap != null) { textureCubeMap.Dispose(); textureCubeMap = null; } base.Dispose(disposing); }
public void Dispose() { if (CubeMap != null) { CubeMap.Dispose(); CubeMap = null; } if (RenderTarget != null) { RenderTarget.Dispose(); RenderTarget = null; } }
public void Dispose() { if (DefaultTexture2DBlack != null) { DefaultTexture2DBlack.Dispose(); } if (DefaultTexture2DBlack4F != null) { DefaultTexture2DBlack4F.Dispose(); } if (DefaultTexture2DWhite != null) { DefaultTexture2DWhite.Dispose(); } if (DefaultTexture3DBlack != null) { DefaultTexture3DBlack.Dispose(); } if (DefaultTexture3DWhite != null) { DefaultTexture3DWhite.Dispose(); } if (DefaultTextureCubeBlack != null) { DefaultTextureCubeBlack.Dispose(); } if (DefaultTextureCubeWhite != null) { DefaultTextureCubeWhite.Dispose(); } if (DefaultNormalTexture != null) { DefaultNormalTexture.Dispose(); } DefaultTexture2DBlack = null; DefaultTexture2DBlack4F = null; DefaultTexture2DWhite = null; DefaultTexture3DBlack = null; DefaultTexture3DWhite = null; DefaultTextureCubeBlack = null; DefaultTextureCubeWhite = null; DefaultNormalTexture = null; }
public void ShouldSetAndGetData(int size) { var dataSize = size * size; var textureCube = new TextureCube(gd, size, false, SurfaceFormat.Color); for (var i = 0; i < 6; i++) { var savedData = new Color[dataSize]; for (var index = 0; index < dataSize; index++) { savedData[index] = new Color(index + i, index + i, index + i); } textureCube.SetData((CubeMapFace)i, savedData); var readData = new Color[dataSize]; textureCube.GetData((CubeMapFace)i, readData); Assert.AreEqual(savedData, readData); } textureCube.Dispose(); }
/// <summary> /// Dispose /// </summary> /// <param name="someObject">Some object</param> public static void Dispose(ref TextureCube someObject) { if (someObject != null) someObject.Dispose(); someObject = null; }
/// <summary> /// Dispose the cube map /// </summary> public void Dispose() { cubeMap.Dispose(); }
public override void Dispose() { tex.Dispose(); viewport.Dispose(); sphere.VertexBuffer.Dispose(); }