mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 05:10:57 +00:00
19 lines
612 B
Swift
19 lines
612 B
Swift
import Metal
|
|
|
|
public struct RendererMesh: Hashable {
|
|
internal let _vertBuf: MTLBuffer, _idxBuf: MTLBuffer
|
|
public let numIndices: Int
|
|
|
|
public static func == (lhs: Self, rhs: Self) -> Bool {
|
|
lhs._vertBuf.gpuAddress == rhs._vertBuf.gpuAddress && lhs._vertBuf.length == rhs._vertBuf.length &&
|
|
lhs._vertBuf.gpuAddress == rhs._vertBuf.gpuAddress && lhs._vertBuf.length == rhs._vertBuf.length &&
|
|
lhs.numIndices == rhs.numIndices
|
|
}
|
|
|
|
public func hash(into hasher: inout Hasher) {
|
|
hasher.combine(self._vertBuf.hash)
|
|
hasher.combine(self._idxBuf.hash)
|
|
hasher.combine(self.numIndices)
|
|
}
|
|
}
|