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

Classes

class  BindGroup
class  BindGroupLayout
struct  BindGroupLayoutDesc
struct  BindGroupLayoutEntryDesc
class  MetalBackBufferRenderTarget
 Backbuffer sentinel target — preserves JS renderTarget/backBuffer identity semantics. More...
class  PipelineLayout
struct  PipelineLayoutDesc

Enumerations

enum class  BindingType {
  UniformBuffer , StorageBuffer , Sampler , SampledTexture ,
  StorageTexture
}
enum  ShaderStageFlags : uint32_t {
  ShaderStage_None = 0 , ShaderStage_Vertex = 1 << 0 , ShaderStage_Fragment = 1 << 1 , ShaderStage_Compute = 1 << 2 ,
  ShaderStage_All = 0x7
}

Functions

MTL::Texture * createDepthTexture (MTL::Device *device, const int width, const int height)
 Create a Depth32Float texture for the back buffer depth attachment.
MTL::CullMode toMetalCullMode (const CullMode cullMode)
 Map engine CullMode to Metal CullMode.
MTL::PrimitiveType toMetalPrimitiveType (const PrimitiveType primitiveType)
 Map engine PrimitiveType to Metal PrimitiveType.
simd::float4x4 toSimdMatrix (const Matrix4 &matrix)
 Convert a column-major Matrix4 to a SIMD float4x4.

Enumeration Type Documentation

◆ BindingType

Enumerator
UniformBuffer 
StorageBuffer 
Sampler 
SampledTexture 
StorageTexture 

Definition at line 13 of file metalPipelineLayout.h.

◆ ShaderStageFlags

Enumerator
ShaderStage_None 
ShaderStage_Vertex 
ShaderStage_Fragment 
ShaderStage_Compute 
ShaderStage_All 

Definition at line 21 of file metalPipelineLayout.h.

Function Documentation

◆ createDepthTexture()

MTL::Texture * visutwin::canvas::metal::createDepthTexture ( MTL::Device * device,
const int width,
const int height )
inline

Create a Depth32Float texture for the back buffer depth attachment.

Definition at line 67 of file metalUtils.h.

◆ toMetalCullMode()

MTL::CullMode visutwin::canvas::metal::toMetalCullMode ( const CullMode cullMode)
inline

◆ toMetalPrimitiveType()

◆ toSimdMatrix()

simd::float4x4 visutwin::canvas::metal::toSimdMatrix ( const Matrix4 & matrix)
inline

Convert a column-major Matrix4 to a SIMD float4x4.

Definition at line 20 of file metalUtils.h.

References visutwin::canvas::Matrix4::getElement().

Referenced by visutwin::canvas::MetalTaaPass::execute().