You.i Engine
CYIShaderFactory Class Reference

#include <renderer/YiShaderFactory.h>

Static Public Member Functions

static std::shared_ptr< CYIAssetShaderProgramCreateAssetFromSource (const CYIString &vertexShaderSource, const CYIString &fragmentShaderSource)
 
static std::shared_ptr< CYIAssetShaderProgramCreateAssetFromBinary (uint8_t *pVertexShaderData, int32_t vertexShaderSize, uint8_t *pFragmentShaderData, int32_t fragmentShaderSize)
 
static std::shared_ptr< CYIAssetShaderProgramCreateAssetFromFile (const CYIString &vertexShaderFile, const CYIString &fragmentShaderFile, CYIAssetShaderObject::CodeType codeType=CYIAssetShaderObject::CodeType::UncompiledSource)
 
static std::shared_ptr< CYIAssetShaderProgramCreateAssetFromPath (const CYIString &vertexShaderPath, const CYIString &fragmentShaderPath, CYIAssetShaderObject::CodeType codeType=CYIAssetShaderObject::CodeType::UncompiledSource)
 
static std::shared_ptr< CYIAssetShaderProgramCreateAsset (const std::shared_ptr< CYIAssetShaderObject > &pVertexShader, const std::shared_ptr< CYIAssetShaderObject > &pFragmentShader)
 
static std::shared_ptr< IYIGPUObjectCreateShaderProgram ()
 

Member Function Documentation

◆ CreateAsset()

static std::shared_ptr<CYIAssetShaderProgram> CYIShaderFactory::CreateAsset ( const std::shared_ptr< CYIAssetShaderObject > &  pVertexShader,
const std::shared_ptr< CYIAssetShaderObject > &  pFragmentShader 
)
static

Function to create a shader program from two existing shader object assets. These assets will be enrolled into the CYIAssetManager.

◆ CreateAssetFromBinary()

static std::shared_ptr<CYIAssetShaderProgram> CYIShaderFactory::CreateAssetFromBinary ( uint8_t *  pVertexShaderData,
int32_t  vertexShaderSize,
uint8_t *  pFragmentShaderData,
int32_t  fragmentShaderSize 
)
static

Function to create a shader program from two binary data. These assets will be enrolled into the CYIAssetManager using the provided names.

◆ CreateAssetFromFile()

static std::shared_ptr<CYIAssetShaderProgram> CYIShaderFactory::CreateAssetFromFile ( const CYIString vertexShaderFile,
const CYIString fragmentShaderFile,
CYIAssetShaderObject::CodeType  codeType = CYIAssetShaderObject::CodeType::UncompiledSource 
)
static

Function to create a shader program from two source/binary files. These assets will be enrolled into the CYIAssetManager using the provided names. The filenames will be resolved using the system asset root locator.

◆ CreateAssetFromPath()

static std::shared_ptr<CYIAssetShaderProgram> CYIShaderFactory::CreateAssetFromPath ( const CYIString vertexShaderPath,
const CYIString fragmentShaderPath,
CYIAssetShaderObject::CodeType  codeType = CYIAssetShaderObject::CodeType::UncompiledSource 
)
static

Function to create a shader program from two source files. These assets will be enrolled into the CYIAssetManager using the provided paths.

◆ CreateAssetFromSource()

static std::shared_ptr<CYIAssetShaderProgram> CYIShaderFactory::CreateAssetFromSource ( const CYIString vertexShaderSource,
const CYIString fragmentShaderSource 
)
static

Function to create a shader program from two source strings. These assets will be enrolled into the CYIAssetManager using the provided names.

◆ CreateShaderProgram()

static std::shared_ptr<IYIGPUObject> CYIShaderFactory::CreateShaderProgram ( )
static

Function to create a shader program from a shader program asset


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