CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::MTShaderProgram Class Referencefinal

Metal RenderAPI shader program object. More...

#include <CeresEngine/RenderAPI/Metal/MTShader.hpp>

Inheritance diagram for CeresEngine::MTShaderProgram:
CeresEngine::GPUShaderProgram CeresEngine::MTDeviceObject< MTShaderProgram, GPUShaderProgram > CeresEngine::TDeviceObject< GPUShaderProgramDescriptor > CeresEngine::MTObject< ChildTypeName, ParentType > CeresEngine::GPUDeviceObject CeresEngine::GPUObject

Public Member Functions

 MTShaderProgram (MTDevicePtr device, const GPUShaderProgramDescriptor &descriptor)
 
 ~MTShaderProgram () final
 
GPUPipelineLayoutPtr getPipelineLayout () const final
 The pipeline layout deduced for this shader program.
 
- Public Member Functions inherited from CeresEngine::GPUShaderProgram
 GPUShaderProgram (GPUDevice &device, const Descriptor &descriptor, const GPUShaderReflectionDescriptor &reflection)
 Initializes a new ShaderProgram object instance.
 
 GPUShaderProgram (const GPUShaderProgram &)=delete
 Deleted copy constructor.
 
GPUShaderProgram & operator= (const GPUShaderProgram &)=delete
 
 GPUShaderProgram (GPUShaderProgram &&)=delete
 Deleted move constructor.
 
GPUShaderProgram & operator= (GPUShaderProgram &&)=delete
 
const GPUShaderReflectionDescriptor & reflect () const
 Extracts reflection information from the shader.
 
 TDeviceObject (GPUDevice &device, const Descriptor &descriptor)
 Inherited constructors.
 
 TDeviceObject (const TDeviceObject &)=delete
 Inherited constructors.
 
 TDeviceObject (TDeviceObject &&)=delete
 Inherited constructors.
 
- Public Member Functions inherited from CeresEngine::TDeviceObject< GPUShaderProgramDescriptor >
 TDeviceObject (GPUDevice &device, const Descriptor &descriptor)
 Initializes a new RenderAPI device object instance.
 
 TDeviceObject (const TDeviceObject &)=delete
 
 TDeviceObject (TDeviceObject &&)=delete
 
 ~TDeviceObject () override=default
 
TDeviceObject & operator= (const TDeviceObject &)=delete
 
TDeviceObject & operator= (TDeviceObject &&)=delete
 
- Public Member Functions inherited from CeresEngine::GPUDeviceObject
 GPUDeviceObject (GPUDevice &device)
 
 ~GPUDeviceObject () override
 
- Public Member Functions inherited from CeresEngine::GPUObject
 GPUObject ()=default
 
virtual ~GPUObject ()=default
 
 GPUObject (const GPUObject &)=delete
 
GPUObject & operator= (const GPUObject &)=delete
 
 GPUObject (GPUObject &&)=delete
 
GPUObject & operator= (GPUObject &&)=delete
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Releases the object by decrementing it's reference count by one.
 

Private Attributes

const GPUShaderProgramDescriptor mDescriptor
 A structure that describes the shader program and it's properties.
 
GPUShaderReflectionDescriptor mReflectionDescriptor
 The shader reflection descriptor.
 

Additional Inherited Members

- Public Types inherited from CeresEngine::TDeviceObject< GPUShaderProgramDescriptor >
using Descriptor = GPUShaderProgramDescriptor
 An type-alias to the descriptor struct type.
 
- Static Public Member Functions inherited from CeresEngine::MTObject< ChildTypeName, ParentType >
static RC< ChildTypeName > cast (const RC< ParentType > &ptr)
 Casts a RC containing a ParentType pointer to a pointer to a pointer to a ChildTypeName.
 
static RC< ChildTypeName > safeCast (const RC< ParentType > &ptr)
 Safely casts a RC containing a ParentType pointer to a pointer to a pointer to a ChildTypeName.
 
static ChildTypeName & cast (ParentType &object)
 Casts a object of type ParentType to a object of type ChildTypeName.
 
static const ChildTypeName & cast (const ParentType &object)
 Casts a object of type ParentType to a object of type ChildTypeName.
 
static ChildTypeName * cast (ParentType *object)
 Casts a object of type ParentType to a object of type ChildTypeName.
 
static const ChildTypeName * cast (const ParentType *object)
 Casts a object of type ParentType to a object of type ChildTypeName.
 
static ChildTypeName * safeCast (ParentType *object)
 Casts a object of type ParentType to a object of type ChildTypeName.
 
static const ChildTypeName * safeCast (const ParentType *object)
 Casts a object of type ParentType to a object of type ChildTypeName.
 
- Public Attributes inherited from CeresEngine::GPUShaderProgram
const GPUShaderReflectionDescriptor & reflection
 The shader reflection descriptor.
 
- Public Attributes inherited from CeresEngine::TDeviceObject< GPUShaderProgramDescriptor >
const Descriptor & descriptor
 A structure that describes the object and it's properties.
 
- Public Attributes inherited from CeresEngine::GPUDeviceObject
GPUDevice & device
 The owning device this object was created from.
 
- Protected Member Functions inherited from CeresEngine::GPUObject
virtual void destroy () noexcept
 A internal method called by the system when the object reference count reaches zero.
 
- Protected Member Functions inherited from CeresEngine::MTDeviceObject< MTShaderProgram, GPUShaderProgram >
 MTDeviceObject (MTDevicePtr device)
 Creates a new MTDeviceObject from the given device.
 
- Protected Attributes inherited from CeresEngine::MTDeviceObject< MTShaderProgram, GPUShaderProgram >
MTDevice & deviceMT
 The owning MTDevice instance.
 

Detailed Description

Metal RenderAPI shader program object.

Constructor & Destructor Documentation

◆ MTShaderProgram()

CeresEngine::MTShaderProgram::MTShaderProgram ( MTDevicePtr  device,
const GPUShaderProgramDescriptor &  descriptor 
)

◆ ~MTShaderProgram()

CeresEngine::MTShaderProgram::~MTShaderProgram ( )
final

Member Function Documentation

◆ getPipelineLayout()

GPUPipelineLayoutPtr CeresEngine::MTShaderProgram::getPipelineLayout ( ) const
finalvirtual

The pipeline layout deduced for this shader program.

Will be used if the user doesn't provide another when creating a new pipeline.

Can be null if the shader doesn't have any reflection metadata to create a pipeline layout for the program.

Implements CeresEngine::GPUShaderProgram.

Member Data Documentation

◆ mDescriptor

const GPUShaderProgramDescriptor CeresEngine::MTShaderProgram::mDescriptor
private

A structure that describes the shader program and it's properties.

◆ mReflectionDescriptor

GPUShaderReflectionDescriptor CeresEngine::MTShaderProgram::mReflectionDescriptor
private

The shader reflection descriptor.


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