예제 #1
0
    internal Direct2DTexture2D(IRenderTarget InRenderTarget, Bitmap InBitmap)
    {
        Direct2DResourceManager.OnResourceCreate(this);
        Direct2DRenderTarget RT = InRenderTarget as Direct2DRenderTarget;

        Texture2D = CreateFromBitmap(RT.RenderTarget, InBitmap);
    }
예제 #2
0
 public void Dispose()
 {
     Direct2DResourceManager.OnResourceDestroy(this);
     if (Texture2D != null)
     {
         Texture2D.Dispose();
         Texture2D = null;
     }
     if (fConverter != null)
     {
         fConverter.Dispose();
         fConverter = null;
     }
     if (BFDecorde != null)
     {
         BFDecorde.Dispose();
         BFDecorde = null;
     }
     if (BitDecorder != null)
     {
         BitDecorder.Dispose();
         BitDecorder = null;
     }
     if (MemStream != null)
     {
         MemStream.Dispose();
         MemStream = null;
     }
 }
예제 #3
0
    internal Direct2DTexture2D(IRenderTarget InRenderTarget, string InFilePath)
    {
        Direct2DResourceManager.OnResourceCreate(this);
        Direct2DRenderTarget RT = InRenderTarget as Direct2DRenderTarget;
        var bitmap = (System.Drawing.Bitmap)System.Drawing.Image.FromFile(InFilePath);

        Texture2D = CreateFromBitmap(RT.RenderTarget, bitmap);
    }
예제 #4
0
 public void Dispose()
 {
     Direct2DResourceManager.OnResourceDestroy(this);
     if (Texture2D != null)
     {
         Texture2D.Dispose();
         Texture2D = null;
     }
 }