Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ComputeBufferCPU.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
13{
14public:
16
18 ComputeBufferCPU(EType inType, uint64 inSize, uint inStride, const void *inData);
19 virtual ~ComputeBufferCPU() override;
20
22
23 void * GetData() const { return mData; }
24
25private:
26 virtual void * MapInternal(EMode inMode) override { return mData; }
27 virtual void UnmapInternal() override { /* Nothing to do */ }
28
29 void * mData;
30};
31
#define JPH_EXPORT
Definition Core.h:275
std::uint64_t uint64
Definition Core.h:504
unsigned int uint
Definition Core.h:500
#define JPH_NAMESPACE_END
Definition Core.h:425
#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
Buffer that can be used with the CPU compute system.
Definition ComputeBufferCPU.h:13
void * GetData() const
Definition ComputeBufferCPU.h:23
Buffer that can be read from / written to by a compute shader.
Definition ComputeBuffer.h:18
virtual ComputeBufferResult CreateReadBackBuffer() const =0
virtual void * MapInternal(EMode inMode)=0
EType
Type of buffer.
Definition ComputeBuffer.h:24
virtual void UnmapInternal()=0
Helper class that either contains a valid result or an error.
Definition Result.h:12