Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
ShaderCache Class Reference

Create and reuse shader module. More...

#include <ShaderCache.h>

Public Member Functions

void purge ()
 purges the cache.
 
backend::ShaderModulenewVertexShaderModule (std::string_view shaderSource)
 Create a vertex shader module and add it to cache.
 
backend::ShaderModulenewFragmentShaderModule (std::string_view shaderSource)
 Create a fragment shader module.
 
void removeUnusedShader ()
 Remove all unused shaders.
 

Detailed Description

Create and reuse shader module.

Member Function Documentation

◆ purge()

void purge ( )

purges the cache.

It releases the retained instance.

◆ newVertexShaderModule()

backend::ShaderModule * newVertexShaderModule ( std::string_view shaderSource)

Create a vertex shader module and add it to cache.

If it is created before, then just return the cached shader module.

Parameters
shaderSourceThe source code of the shader.

◆ newFragmentShaderModule()

backend::ShaderModule * newFragmentShaderModule ( std::string_view shaderSource)

Create a fragment shader module.

If it is created before, then just return the cached shader module.

Parameters
shaderSourceThe source code of the shader.

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