50 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| 
 | |
| namespace Quik
 | |
| {
 | |
|     /// <summary>
 | |
|     /// Interface for texture instances.
 | |
|     /// </summary>
 | |
|     public interface IQuikTexture : IEquatable<IQuikTexture>, IDisposable
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// Width of the texture.
 | |
|         /// </summary>
 | |
|         int Width { get; }
 | |
|         
 | |
|         /// <summary>
 | |
|         /// Height of the texture.
 | |
|         /// </summary>
 | |
|         int Height { get; }
 | |
|         
 | |
|         /// <summary>
 | |
|         /// True if the texture can have mipmaps.
 | |
|         /// </summary>
 | |
|         bool Mipmaps { get; }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// Upload texture data.
 | |
|         /// </summary>
 | |
|         /// <param name="data">Pointer to data.</param>
 | |
|         /// <param name="format">Color format of the data.</param>
 | |
|         /// <param name="size">Size of the texture data.</param>
 | |
|         /// <param name="level">Mip level.</param>
 | |
|         /// <param name="alignment">Pixel alignment. Expected to be 1, 2, 4, or 8.</param>
 | |
|         void Image(IntPtr data, QuikImageFormat format, QuikVec2 size, int level, int alignment = 4);
 | |
|         
 | |
|         /// <summary>
 | |
|         /// Upload texture data.
 | |
|         /// </summary>
 | |
|         /// <param name="data">Pointer to data.</param>
 | |
|         /// <param name="format">Color format for the data.</param>
 | |
|         /// <param name="location">Location of the data in the texture.</param>
 | |
|         /// <param name="level">Mip level.</param>
 | |
|         /// <param name="alignment">Pixel alignment. Expected to be 1, 2, 4, or 8.</param>
 | |
|         void SubImage(IntPtr data, QuikImageFormat format, QuikRectangle location, int level, int alignment = 4);
 | |
|         
 | |
|         /// <summary>
 | |
|         /// Generate the mip maps for the texture.
 | |
|         /// </summary>
 | |
|         void GenerateMipMaps();
 | |
|     }
 | |
| } |