载入中...
搜索中...
未找到
EcsGpu.h 文件参考
#include "gpgpu/ShaderSystem.h"
#include "ECS.hpp"
#include <algorithm>
#include <cstring>
#include <type_traits>
#include <vector>

浏览源代码.

类

class  eve::gpgpu::EcsGpuWorkspace< Comp >
 Reusable typed CPU staging for a GPU ECS component stream. Ownership stays with the caller; one workspace must not be used concurrently. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::gpgpu
 Fluids module — interactive surface fluid simulation.
 

函数

template<typename Comp >
constexpr int eve::gpgpu::componentFloatCount ()
 Component float count.
 
template<typename Base , typename Comp >
int eve::gpgpu::countViewEntities ()
 Count live entities matching View<Base, Comp>.
 
template<typename Base , typename Comp >
int eve::gpgpu::packViewComponent (ShaderSystem &sys, int binding, EcsGpuWorkspace< Comp > &workspace)
 Pack View<Base, Comp> into ShaderSystem binding as AoS floats. Returns entity count (0 if empty).
 
template<typename Base , typename Comp >
int eve::gpgpu::packViewComponent (ShaderSystem &sys, int binding)
 Compatibility overload that uses a temporary staging workspace.
 
template<typename Base , typename Comp >
void eve::gpgpu::unpackViewComponent (ShaderSystem &sys, int binding, int count, EcsGpuWorkspace< Comp > &workspace)
 Write ShaderSystem binding floats back into View<Base, Comp> (same order as pack). count should be the value returned by packViewComponent.
 
template<typename Base , typename Comp >
void eve::gpgpu::unpackViewComponent (ShaderSystem &sys, int binding, int count)
 Compatibility overload that uses a temporary staging workspace.
 
template<typename Base , typename Comp >
int eve::gpgpu::packViewComponentRange (ShaderSystem &sys, int binding, int firstEntity, int entityCount, EcsGpuWorkspace< Comp > &workspace)
 Pack a stable contiguous View range into an existing resident buffer. The full buffer must have been allocated by a prior full pack/ensureBuffer.
 
template<typename Base , typename Comp >
int eve::gpgpu::unpackViewComponentRange (ShaderSystem &sys, int binding, int firstEntity, int entityCount, EcsGpuWorkspace< Comp > &workspace)
 Unpack a stable contiguous resident-buffer range into a matching View range.
 
template<typename Base , typename Comp >
int eve::gpgpu::runViewComponentSystem (ShaderSystem &sys, int binding, float dt)
 Pack + dispatch + unpack a single-component GPU system. Additional bindings must be uploaded by the caller before this helper, or use ShaderSystem manually for multi-buffer systems.