|
Hymn to Beauty
C++ 3D Engine
|
WebGPU implementation of CommandBuffer. More...
#include <WebGPUCommandBuffer.hpp>
Public Member Functions | |
| WebGPUCommandBuffer (WebGPURenderer *renderer) | |
| Create new WebGPU command buffer. More... | |
| ~WebGPUCommandBuffer () final | |
| Destructor. More... | |
| void | BeginRenderPass (RenderPass *renderPass, const std::string &name) final |
| Begin render pass. More... | |
| void | BeginRenderPass (Texture *colorAttachment, RenderPass::LoadOperation colorLoadOperation, Texture *depthAttachment, RenderPass::LoadOperation depthLoadOperation, const std::string &name) final |
| Begin render pass. More... | |
| void | BeginAttachmentlessRenderPass (const glm::uvec2 &size, uint32_t msaaSamples, const std::string &name) final |
| Begin attachmentless render pass. More... | |
| void | EndRenderPass () final |
| End render pass. More... | |
| void | BindGraphicsPipeline (GraphicsPipeline *graphicsPipeline) final |
| Bind graphics pipeline. More... | |
| void | SetViewport (const glm::uvec2 &origin, const glm::uvec2 &size) final |
| Set the viewport to render to. More... | |
| void | SetScissor (const glm::uvec2 &origin, const glm::uvec2 &size) final |
| Set the scissor box. More... | |
| void | SetLineWidth (float width) final |
| Set width of lines. More... | |
| void | BindGeometry (GeometryBinding *geometryBinding) final |
| Bind geometry to be used in upcoming draw calls. More... | |
| void | BindUniformBuffer (ShaderProgram::BindingType bindingType, Buffer *uniformBuffer) final |
| Bind uniform buffer for use in a shader. More... | |
| void | BindStorageBuffers (std::initializer_list< Buffer * > buffers) final |
| Bind storage buffers. More... | |
| void | BindMaterial (std::initializer_list< std::pair< Texture *, const Sampler * > > textures) final |
| Bind a material. More... | |
| void | PushConstants (const void *data) final |
| Update push constants. More... | |
| void | Draw (unsigned int vertexCount, unsigned int firstVertex) final |
| Draw geometry. More... | |
| void | DrawIndexed (unsigned int indexCount, unsigned int firstIndex, unsigned int baseVertex) final |
| Draw indexed geometry. More... | |
| void | DrawIndexedInstanced (unsigned int indexCount, unsigned int instanceCount, unsigned int firstIndex, unsigned int baseVertex) final |
| Draw indexed instanced geometry. More... | |
| void | BlitToSwapChain (Texture *texture) final |
| Blit a texture to the current swap chain image. More... | |
| void | BindComputePipeline (ComputePipeline *computePipeline) final |
| Bind compute pipeline. More... | |
| void | Dispatch (const glm::uvec3 &numGroups, const std::string &name) final |
| Dispatch compute shader. More... | |
| void | ClearBuffer (Buffer *buffer) final |
| Clear a buffer (fill with 0). More... | |
| WGPUCommandEncoder | GetCommandEncoder () |
| Get command encoder. More... | |
| WGPUCommandBuffer | End () |
| Finish recording the command buffer. More... | |
| void | NextFrame () |
| Cycle the command buffer for the next frame. More... | |
| WGPURenderPassEncoder | GetRenderPassEncoder () |
| Get the current render pass encoder. More... | |
Public Member Functions inherited from Video::CommandBuffer | |
| CommandBuffer () | |
| Create a new command buffer. More... | |
| virtual | ~CommandBuffer () |
| Destructor. More... | |
| void | SetViewportAndScissor (const glm::uvec2 &origin, const glm::uvec2 &size) |
| Set both viewport and scissor. More... | |
WebGPU implementation of CommandBuffer.
|
explicit |
Create new WebGPU command buffer.
| renderer | The WebGPU renderer. |
|
final |
Destructor.
|
finalvirtual |
Begin attachmentless render pass.
| size | The framebuffer size. |
| msaaSamples | Number of MSAA samples. |
| name | The name of the render pass (displayed in profiling). |
Implements Video::CommandBuffer.
|
finalvirtual |
Begin render pass.
| renderPass | The render pass to begin. |
| name | The name of the render pass (displayed in profiling). |
Implements Video::CommandBuffer.
|
finalvirtual |
Begin render pass.
| colorAttachment | The color attachment to draw to. |
| colorLoadOperation | What to do with the previous contents of the color attachment. |
| depthAttachment | The depth attachment to draw to. |
| depthLoadOperation | What to do with the previous contents of the depth attachment. |
| name | The name of the render pass (displayed in profiling). |
Implements Video::CommandBuffer.
|
finalvirtual |
Bind compute pipeline.
| computePipeline | The compute pipeline to bind. |
Implements Video::CommandBuffer.
|
finalvirtual |
Bind geometry to be used in upcoming draw calls.
| geometryBinding | The geometry to bind. |
Implements Video::CommandBuffer.
|
finalvirtual |
Bind graphics pipeline.
| graphicsPipeline | The graphics pipeline to bind. |
Implements Video::CommandBuffer.
|
finalvirtual |
Bind a material.
| textures | The textures to bind to the graphics pipeline. |
Implements Video::CommandBuffer.
|
finalvirtual |
|
finalvirtual |
Bind uniform buffer for use in a shader.
| bindingType | Where to bind the buffer. |
| uniformBuffer | The buffer to bind. |
Implements Video::CommandBuffer.
|
finalvirtual |
Blit a texture to the current swap chain image.
| texture | The texture to copy to the swap chain. |
Implements Video::CommandBuffer.
|
finalvirtual |
Clear a buffer (fill with 0).
| buffer | The buffer to clear. |
Implements Video::CommandBuffer.
|
finalvirtual |
Dispatch compute shader.
| numGroups | The number of groups in each dimension. |
| name | The name of the dispatch (displayed in profiling). |
Implements Video::CommandBuffer.
|
finalvirtual |
Draw geometry.
| vertexCount | The number of vertices to render. |
| firstVertex | The vertex to start rendering at. |
Implements Video::CommandBuffer.
|
finalvirtual |
Draw indexed geometry.
| indexCount | The number of indices to render. |
| firstIndex | The index to start rendering at. |
| baseVertex | Constant that should be added to each value in the index buffer. |
Implements Video::CommandBuffer.
|
finalvirtual |
Draw indexed instanced geometry.
| indexCount | The number of indices to render. |
| instanceCount | The number of instances to render. |
| firstIndex | The index to start rendering at. |
| baseVertex | Constant that should be added to each value in the index buffer. |
Implements Video::CommandBuffer.
| WGPUCommandBuffer Video::WebGPUCommandBuffer::End | ( | ) |
Finish recording the command buffer.
|
finalvirtual |
End render pass.
Implements Video::CommandBuffer.
| WGPUCommandEncoder Video::WebGPUCommandBuffer::GetCommandEncoder | ( | ) |
Get command encoder.
| WGPURenderPassEncoder Video::WebGPUCommandBuffer::GetRenderPassEncoder | ( | ) |
Get the current render pass encoder.
| void Video::WebGPUCommandBuffer::NextFrame | ( | ) |
Cycle the command buffer for the next frame.
|
finalvirtual |
Update push constants.
| data | The data to push to the shader. |
Implements Video::CommandBuffer.
|
finalvirtual |
|
finalvirtual |
Set the scissor box.
| origin | The bottom-left corner of the scissor box. |
| size | The size of the scissor box. |
Implements Video::CommandBuffer.
|
finalvirtual |
Set the viewport to render to.
| origin | The bottom-left corner of the viewport. |
| size | The size of the viewport. |
Implements Video::CommandBuffer.