Texture2D.cs 715 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. namespace BansheeEngine
  4. {
  5. public sealed class Texture2D : Resource
  6. {
  7. // For internal use by the runtime
  8. private Texture2D()
  9. {
  10. }
  11. public Texture2D(TextureFormat format, int width, int height, bool hasMipmaps = false, bool gammaCorrection = false)
  12. {
  13. Internal_CreateInstance(this, format, width, height, hasMipmaps, gammaCorrection);
  14. }
  15. [MethodImpl(MethodImplOptions.InternalCall)]
  16. private static extern void Internal_CreateInstance(Texture2D instance, TextureFormat format, int width, int height, bool hasMipmaps, bool gammaCorrection);
  17. }
  18. }