Function TRAP::Graphics::ShaderManager::LoadSource#

Function Documentation#

Ref<Shader> TRAP::Graphics::ShaderManager::LoadSource(const std::string &name, const std::string &glslSource, RendererAPI::ShaderType shaderType, const std::vector<Shader::Macro> &userMacros = {})#

Load a shader from GLSL source.

Parameters:
  • name – Name for the shader.

  • glslSource – GLSL source code.

  • shaderType – Type of the shader.

  • userMacrosOptional user defined macros. Default: nullptr.

Returns:

Loaded shader.