![]() |
Flutter Engine
The Flutter Engine
|
An object used to specify work to the GPU along with references to resources the GPU will used when doing said work. More...
#include <command.h>
Public Member Functions | |
bool | BindVertices (VertexBuffer buffer) |
Specify the vertex and index buffer to use for this command. More... | |
bool | BindResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override |
bool | BindResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const std::shared_ptr< const ShaderMetadata > &metadata, BufferView view) |
bool | BindResource (ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata &metadata, std::shared_ptr< const Texture > texture, const std::unique_ptr< const Sampler > &sampler) override |
bool | IsValid () const |
![]() | |
virtual | ~ResourceBinder ()=default |
virtual bool | BindResource (ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view)=0 |
virtual bool | BindResource (ShaderStage stage, DescriptorType type, const SampledImageSlot &slot, const ShaderMetadata &metadata, std::shared_ptr< const Texture > texture, const std::unique_ptr< const Sampler > &sampler)=0 |
Public Attributes | |
std::shared_ptr< Pipeline< PipelineDescriptor > > | pipeline |
Bindings | vertex_bindings |
Bindings | fragment_bindings |
uint32_t | stencil_reference = 0u |
uint64_t | base_vertex = 0u |
std::optional< Viewport > | viewport |
std::optional< IRect > | scissor |
size_t | instance_count = 1u |
VertexBuffer | vertex_buffer |
The bound per-vertex data and optional index buffer. More... | |
An object used to specify work to the GPU along with references to resources the GPU will used when doing said work.
To construct a valid command, follow these steps:
BindVertices
Command can be created frequently and on demand. The resources referenced in commands views into buffers managed by other allocators and resource managers.
|
overridevirtual |
Implements impeller::ResourceBinder.
|
overridevirtual |
Implements impeller::ResourceBinder.
bool impeller::Command::BindResource | ( | ShaderStage | stage, |
DescriptorType | type, | ||
const ShaderUniformSlot & | slot, | ||
const std::shared_ptr< const ShaderMetadata > & | metadata, | ||
BufferView | view | ||
) |
bool impeller::Command::BindVertices | ( | VertexBuffer | buffer | ) |
Specify the vertex and index buffer to use for this command.
[in] | buffer | The vertex and index buffer definition. If possible, this value should be moved and not copied. |
|
inline |
Definition at line 184 of file command.h.
uint64_t impeller::Command::base_vertex = 0u |
Bindings impeller::Command::fragment_bindings |
size_t impeller::Command::instance_count = 1u |
std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::Command::pipeline |
std::optional<IRect> impeller::Command::scissor |
uint32_t impeller::Command::stencil_reference = 0u |
The reference value to use in stenciling operations. Stencil configuration is part of pipeline setup and can be read from the pipelines descriptor.
Pipeline
PipelineDescriptor
Bindings impeller::Command::vertex_bindings |
VertexBuffer impeller::Command::vertex_buffer |
std::optional<Viewport> impeller::Command::viewport |