Dashboard/Quik/IQuikTexture.cs

50 lines
1.7 KiB
C#
Raw Normal View History

2022-08-20 11:57:57 +02:00
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>
2023-05-13 15:17:23 +02:00
/// <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);
2022-08-20 11:57:57 +02:00
/// <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>
2023-05-13 15:17:23 +02:00
/// <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);
2022-08-20 11:57:57 +02:00
/// <summary>
/// Generate the mip maps for the texture.
/// </summary>
void GenerateMipMaps();
}
}