Hymn to Beauty
C++ 3D Engine
Video::WebGPUShaderProgram Class Reference

WebGPU implementation of ShaderProgram. More...

#include <WebGPUShaderProgram.hpp>

Inheritance diagram for Video::WebGPUShaderProgram:
Video::ShaderProgram

Public Member Functions

 WebGPUShaderProgram (WGPUDevice device, std::initializer_list< const Shader * > shaders)
 Create new WebGPU shader program. More...
 
 ~WebGPUShaderProgram () final
 Destructor. More...
 
const std::vector< const WebGPUShader * > & GetShaders () const
 Get the shaders in the shader program. More...
 
const WGPUBindGroupLayout * GetBindGroupLayouts () const
 Get the bind group layouts. More...
 
bool IsBindGroupLayoutEmpty (ShaderProgram::BindingType bindingType) const
 Get whether a bind group layout is empty. More...
 
bool HasUniformsBuffer () const
 Get whether the UNIFORMS bind group has a uniform buffer. More...
 
uint32_t GetPushConstantSize () const
 Get the size of the push constants. More...
 
- Public Member Functions inherited from Video::ShaderProgram
 ShaderProgram ()
 Create a new shader program. More...
 
virtual ~ShaderProgram ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Video::ShaderProgram
enum  BindingType {
  MATRICES , MATERIAL , UNIFORMS , STORAGE_BUFFER ,
  BINDING_TYPES
}
 A type of bound resource. More...
 

Detailed Description

WebGPU implementation of ShaderProgram.

Constructor & Destructor Documentation

◆ WebGPUShaderProgram()

Video::WebGPUShaderProgram::WebGPUShaderProgram ( WGPUDevice  device,
std::initializer_list< const Shader * >  shaders 
)

Create new WebGPU shader program.

Parameters
deviceThe WebGPU device.
shadersList of shaders to link together.

◆ ~WebGPUShaderProgram()

Video::WebGPUShaderProgram::~WebGPUShaderProgram ( )
final

Destructor.

Member Function Documentation

◆ GetBindGroupLayouts()

const WGPUBindGroupLayout * Video::WebGPUShaderProgram::GetBindGroupLayouts ( ) const

Get the bind group layouts.

Returns
The bind group layouts.

◆ GetPushConstantSize()

uint32_t Video::WebGPUShaderProgram::GetPushConstantSize ( ) const

Get the size of the push constants.

Returns
The size of the push constants.

◆ GetShaders()

const std::vector< const WebGPUShader * > & Video::WebGPUShaderProgram::GetShaders ( ) const

Get the shaders in the shader program.

Returns
A list of shaders in the shader program.

◆ HasUniformsBuffer()

bool Video::WebGPUShaderProgram::HasUniformsBuffer ( ) const

Get whether the UNIFORMS bind group has a uniform buffer.

Returns
Whether the shader program has a uniform buffer.

◆ IsBindGroupLayoutEmpty()

bool Video::WebGPUShaderProgram::IsBindGroupLayoutEmpty ( ShaderProgram::BindingType  bindingType) const

Get whether a bind group layout is empty.

Parameters
bindingTypeThe binding type to check the bind group layout for.
Returns
Whether the bind group layout is empty.

The documentation for this class was generated from the following files: