VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::Compute Class Reference

#include <platform/graphics/compute.h>

Public Member Functions

 Compute (GraphicsDevice *graphicsDevice, const std::shared_ptr< Shader > &shader, std::string name="")
uint32_t dispatchX () const
uint32_t dispatchY () const
uint32_t dispatchZ () const
TexturegetTextureParameter (const std::string &name) const
GraphicsDevicegraphicsDevice () const
const std::string & name () const
void setParameter (const std::string &name, Texture *texture)
void setupDispatch (uint32_t x, uint32_t y, uint32_t z)
const std::shared_ptr< Shader > & shader () const
const std::unordered_map< std::string, Texture * > & textureParameters () const

Detailed Description

A representation of a compute shader with the associated resources, that can be executed on the GPU.

Definition at line 23 of file compute.h.

Constructor & Destructor Documentation

◆ Compute()

visutwin::canvas::Compute::Compute ( GraphicsDevice * graphicsDevice,
const std::shared_ptr< Shader > & shader,
std::string name = "" )

Definition at line 14 of file compute.cpp.

References graphicsDevice(), name(), and shader().

Member Function Documentation

◆ dispatchX()

uint32_t visutwin::canvas::Compute::dispatchX ( ) const
inline

Definition at line 38 of file compute.h.

◆ dispatchY()

uint32_t visutwin::canvas::Compute::dispatchY ( ) const
inline

Definition at line 39 of file compute.h.

◆ dispatchZ()

uint32_t visutwin::canvas::Compute::dispatchZ ( ) const
inline

Definition at line 40 of file compute.h.

◆ getTextureParameter()

Texture * visutwin::canvas::Compute::getTextureParameter ( const std::string & name) const

Definition at line 24 of file compute.cpp.

References name().

◆ graphicsDevice()

GraphicsDevice * visutwin::canvas::Compute::graphicsDevice ( ) const
inline

Definition at line 29 of file compute.h.

Referenced by Compute().

◆ name()

const std::string & visutwin::canvas::Compute::name ( ) const
inline

Definition at line 30 of file compute.h.

Referenced by Compute(), getTextureParameter(), and setParameter().

◆ setParameter()

void visutwin::canvas::Compute::setParameter ( const std::string & name,
Texture * texture )

Definition at line 19 of file compute.cpp.

References name().

◆ setupDispatch()

void visutwin::canvas::Compute::setupDispatch ( uint32_t x,
uint32_t y,
uint32_t z )

Definition at line 30 of file compute.cpp.

◆ shader()

const std::shared_ptr< Shader > & visutwin::canvas::Compute::shader ( ) const
inline

Definition at line 28 of file compute.h.

Referenced by Compute().

◆ textureParameters()

const std::unordered_map< std::string, Texture * > & visutwin::canvas::Compute::textureParameters ( ) const
inline

Definition at line 34 of file compute.h.


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