Ejemplo n.º 1
0
 private void EnsurePlatformTexture(Format format, int width, int height, bool mipmaps)
 {
     if (platformTexture == null ||
         platformTexture.Format != format ||
         platformTexture.Width != width ||
         platformTexture.Height != height ||
         platformTexture.LevelCount > 1 != mipmaps
         )
     {
         if (platformTexture != null)
         {
             platformTexture.Dispose();
         }
         platformTexture = PlatformRenderer.Context.CreateTexture2D(format, width, height, mipmaps, textureParams);
         PlatformRenderer.RebindTexture(this);
     }
 }