refactor(pipeline): MP1a - lift TextureKey out of the GL atlas class

This commit is contained in:
Erik 2026-07-05 20:01:56 +02:00
parent 651d041e5a
commit d778930853
3 changed files with 39 additions and 29 deletions

View file

@ -1,3 +1,4 @@
using AcDream.Content;
using Chorizite.Core.Render;
using Chorizite.Core.Render.Enums;
using DatReaderWriter.Enums;
@ -94,27 +95,5 @@ namespace AcDream.App.Rendering.Wb {
_refCounts.Clear();
_freeSlots.Clear();
}
public struct TextureKey : IEquatable<TextureKey> {
public uint SurfaceId;
public uint PaletteId;
public StipplingType Stippling;
public bool IsSolid;
public bool Equals(TextureKey other) {
return SurfaceId == other.SurfaceId &&
PaletteId == other.PaletteId &&
Stippling == other.Stippling &&
IsSolid == other.IsSolid;
}
public override bool Equals(object? obj) {
return obj is TextureKey other && Equals(other);
}
public override int GetHashCode() {
return HashCode.Combine(SurfaceId, PaletteId, Stippling, IsSolid);
}
}
}
}