⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.
|
Axmol Engine 3.0.0-14b93b2
|
Create and reuse shader module. More...
#include <ShaderCache.h>
Public Member Functions | |
| void | purge () |
| purges the cache. | |
| rhi::ShaderModule * | acquireVertexShaderModule (std::string_view shaderSource) |
| Create a vertex shader module and add it to cache. | |
| rhi::ShaderModule * | acquireFragmentShaderModule (std::string_view shaderSource) |
| Create a fragment shader module. | |
| void | removeUnusedShader () |
| Remove all unused shaders. | |
Create and reuse shader module.
| void purge | ( | ) |
purges the cache.
It releases the retained instance.
| rhi::ShaderModule * acquireVertexShaderModule | ( | 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.
| shaderSource | The source code of the shader. |
| rhi::ShaderModule * acquireFragmentShaderModule | ( | std::string_view | shaderSource | ) |
Create a fragment shader module.
If it is created before, then just return the cached shader module.
| shaderSource | The source code of the shader. |