PixelShaderMTL.h 605 B

123456789101112131415161718192021222324
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2025 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. #include <Renderer/PixelShader.h>
  6. #include <MetalKit/MetalKit.h>
  7. /// Pixel shader handle for Metal
  8. class PixelShaderMTL : public PixelShader
  9. {
  10. public:
  11. /// Constructor
  12. PixelShaderMTL(id<MTLFunction> inFunction) : mFunction(inFunction) { }
  13. virtual ~PixelShaderMTL() override { [mFunction release]; }
  14. /// Access to the function
  15. id<MTLFunction> GetFunction() const { return mFunction; }
  16. private:
  17. id<MTLFunction> mFunction;
  18. };