Remove the old Quik texture API.

This commit is contained in:
H. Utku Maden 2024-04-28 13:44:40 +03:00
parent 2aa1066a9d
commit bc3dcff3ea
2 changed files with 0 additions and 101 deletions

@ -1,69 +0,0 @@
using System;
using Quik.Media;
namespace Quik
{
/// <summary>
/// Interface for texture instances.
/// </summary>
public abstract class QuikTexture : IEquatable<QuikTexture>, IDisposable
{
/// <summary>
/// Width of the texture.
/// </summary>
public abstract int Width { get; }
/// <summary>
/// Height of the texture.
/// </summary>
public abstract int Height { get; }
/// <summary>
/// True if the texture can have mipmaps.
/// </summary>
public abstract bool Mipmaps { get; }
/// <summary>
/// Indicates whether this texture contains a signed distance field.
/// </summary>
public bool SignedDistanceField { get; set; }
/// <summary>
/// Indicates whether this texture has premultiplied alpha.
/// </summary>
public bool PreMultipled { get; set; }
/// <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>
public abstract void Image(IntPtr data, QImageFormat format, QVec2 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>
public abstract void SubImage(IntPtr data, QImageFormat format, QRectangle location, int level, int alignment = 4);
/// <summary>
/// Generate the mip maps for the texture.
/// </summary>
public abstract void GenerateMipMaps();
public virtual bool Equals(QuikTexture other)
{
return base.Equals(other);
}
public void Dispose() => Dispose(true);
protected virtual void Dispose(bool isDisposing) { }
}
}

@ -1,32 +0,0 @@
using Quik.Media;
namespace Quik
{
/// <summary>
/// Interface for QUIK texture managers.
/// </summary>
public interface IQuikTextureManager
{
/// <summary>
/// The context that owns the texture manager.
/// </summary>
// QuikContext Context { get; set; }
/// <summary>
/// Create a texture.
/// </summary>
/// <param name="size">Size of the texture.</param>
/// <param name="mipmaps">True in order to allow mipmaps.</param>
/// <param name="format">The color format of the internal texture.</param>
/// <returns>Handle to a texture object.</returns>
/// <remarks>
/// All parameters are hints. If there is a situation where the texture does not
/// have mip levels, or format cannot be specified, ignore these parameters.
/// </remarks>
QuikTexture CreateTexture(QVec2 size, bool mipmaps, QImageFormat format);
/// <summary>
/// A function called on context clear. (useful for discarding old textures)
/// </summary>
void Clear();
}
}