Ajout de Jolt Physics + 1ere version des factory entitecomposants - camera, transform, rigidbody, collider, renderer
This commit is contained in:
32
lib/All/JoltPhysics/TestFramework/Renderer/MTL/TextureMTL.h
Normal file
32
lib/All/JoltPhysics/TestFramework/Renderer/MTL/TextureMTL.h
Normal file
@@ -0,0 +1,32 @@
|
||||
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
||||
// SPDX-FileCopyrightText: 2025 Jorrit Rouwe
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Renderer/Texture.h>
|
||||
|
||||
#include <MetalKit/MetalKit.h>
|
||||
|
||||
class RendererMTL;
|
||||
|
||||
/// Metal texture
|
||||
class TextureMTL : public Texture
|
||||
{
|
||||
public:
|
||||
/// Constructor, called by Renderer::CreateTextureMTL
|
||||
TextureMTL(RendererMTL *inRenderer, const Surface *inSurface); // Create a normal Texture
|
||||
TextureMTL(RendererMTL *inRenderer, int inWidth, int inHeight); // Create a render target (depth only)
|
||||
virtual ~TextureMTL() override;
|
||||
|
||||
/// Bind texture to the pixel shader
|
||||
virtual void Bind() const override;
|
||||
|
||||
/// Access to the metal texture
|
||||
id<MTLTexture> GetTexture() const { return mTexture; }
|
||||
|
||||
private:
|
||||
RendererMTL * mRenderer;
|
||||
id<MTLTexture> mTexture;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user