IRenderPass:: bindResource - dpw105f18/papago-api GitHub Wiki
This method allows resources to be bound to slots in the IShaderProgram, which are part of the render state, by name alone.
Binding a regular buffer
void bindResource(const std::string& name, IBufferResource& buffer)
Parameters
| Parameter |
Description |
| name |
Name of binding in shader |
| buffer |
IBufferResource to bind to parameter |
Binding a dynamic buffer
bindResource(const std::string& name, IDynamicBufferResource& buffer)
Parameters
Binding a combined image and sampler
void bindResource(const std::string& name, IImageResource& image, ISampler& sampler)
Parameters
| Parameter |
Description |
| name |
Name of binding in shader |
| image |
IImageResource texture to bind |
| sampler |
ISampler used to sample from texture |