mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-04 05:31:34 +00:00
split core renderer stuff into metal subfolder
This commit is contained in:
14
Sources/Voxelotl/Renderer/Metal/Shader.swift
Normal file
14
Sources/Voxelotl/Renderer/Metal/Shader.swift
Normal file
@ -0,0 +1,14 @@
|
||||
import Metal
|
||||
|
||||
internal struct Shader: Hashable {
|
||||
let vertexProgram: (any MTLFunction)?, fragmentProgram: (any MTLFunction)?
|
||||
|
||||
static func == (lhs: Shader, rhs: Shader) -> Bool {
|
||||
lhs.vertexProgram?.hash == rhs.vertexProgram?.hash && lhs.fragmentProgram?.hash == rhs.fragmentProgram?.hash
|
||||
}
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(self.vertexProgram?.hash ?? 0)
|
||||
hasher.combine(self.fragmentProgram?.hash ?? 0)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user