载入中...
搜索中...
未找到
ShaderSystem.h
浏览该文件的文档.
Backend-agnostic compute program. Bind storage buffers then dispatch via Gpgpu::dispatch....
Definition ComputeShader.h:15
static constexpr int kMaxBindings
Definition ComputeShader.h:17
GPGPU module — compute shaders + storage buffers via the active Graphics backend. Uses the graphics q...
Definition Gpgpu.h:20
Backend-agnostic GPU buffer for compute (storage) or CPU staging transfers. Squirrel-owned; derived c...
Definition GpuBuffer.h:16
Definition ShaderSystem.h:30
ShaderSystem()=default
GpuBuffer * getBuffer(int binding) const
Definition ShaderSystem.cpp:61
void upload(int binding, const float *data, int floatCount)
Definition ShaderSystem.cpp:66
GpuBuffer * ensureBuffer(int binding, int floatCount)
Definition ShaderSystem.cpp:44
void dispatch(int entityCount, float dt=0.f)
Definition ShaderSystem.cpp:100
static constexpr int kDefaultLocalSize
Definition ShaderSystem.h:33
void download(int binding, float *out, int floatCount) const
Definition ShaderSystem.cpp:72
void setFloat(int index, float value)
Definition ShaderSystem.cpp:90
ShaderSystem & operator=(const ShaderSystem &)=delete
void setShaderSource(const std::string &glsl)
Definition ShaderSystem.cpp:23
void setLocalSize(int localSize)
Definition ShaderSystem.cpp:40
ShaderSystem(const ShaderSystem &)=delete
void setShader(ComputeShader *shader, bool takeOwnership=false)
Definition ShaderSystem.cpp:31
Definition ComputeShader.cpp:3