ITexture2DManager.cs 848 B

123456789101112131415161718192021222324252627282930313233343536
  1. #if PLATFORM_AGNOSTIC
  2. using System.Drawing;
  3. namespace FontStashSharp.Interfaces
  4. {
  5. /// <summary>
  6. /// Texture Creation Service
  7. /// </summary>
  8. public interface ITexture2DManager
  9. {
  10. /// <summary>
  11. /// Creates a texture of the specified size
  12. /// </summary>
  13. /// <param name="width"></param>
  14. /// <param name="height"></param>
  15. /// <returns></returns>
  16. Veldrid.Texture CreateTexture(int width, int height);
  17. /// <summary>
  18. /// Returns size of the specified texture
  19. /// </summary>
  20. /// <param name="texture"></param>
  21. /// <returns></returns>
  22. Size GetTextureSize(Veldrid.Texture texture);
  23. /// <summary>
  24. /// Sets RGBA data at the specified bounds
  25. /// </summary>
  26. /// <param name="bounds"></param>
  27. /// <param name="data"></param>
  28. void SetTextureData(Veldrid.Texture texture, Rectangle bounds, byte[] data);
  29. }
  30. }
  31. #endif