Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ComputeShaderCPU.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2026 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
8
10
11class ShaderWrapper;
12
15{
16public:
18
20
22 ComputeShaderCPU(CreateShader inCreateShader, uint32 inGroupSizeX, uint32 inGroupSizeY, uint32 inGroupSizeZ) :
23 ComputeShader(inGroupSizeX, inGroupSizeY, inGroupSizeZ),
24 mCreateShader(inCreateShader)
25 {
26 }
27
30 {
31 return mCreateShader();
32 }
33
34private:
35 CreateShader mCreateShader;
36};
37
#define JPH_EXPORT
Definition Core.h:275
#define JPH_NAMESPACE_END
Definition Core.h:425
std::uint32_t uint32
Definition Core.h:503
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:50
Compute shader handle for CPU compute.
Definition ComputeShaderCPU.h:15
ComputeShaderCPU(CreateShader inCreateShader, uint32 inGroupSizeX, uint32 inGroupSizeY, uint32 inGroupSizeZ)
Constructor.
Definition ComputeShaderCPU.h:22
ShaderWrapper *(*)() CreateShader
Definition ComputeShaderCPU.h:19
ShaderWrapper * CreateWrapper() const
Create an instance of the shader wrapper.
Definition ComputeShaderCPU.h:29
Compute shader handle.
Definition ComputeShader.h:15
Wraps a compute shader to allow calling it from C++.
Definition ShaderWrapper.h:13