ManaPlus
Static Public Member Functions | Data Fields
anonymous_namespace{shaderprogramloader.cpp}::ShaderProgramLoader Struct Reference

Static Public Member Functions

static Resourceload (const void *const v)
 

Data Fields

const std::string vertex
 
const std::string fragment
 
const bool isNewShader
 

Detailed Description

Definition at line 39 of file shaderprogramloader.cpp.

Member Function Documentation

◆ load()

static Resource* anonymous_namespace{shaderprogramloader.cpp}::ShaderProgramLoader::load ( const void *const  v)
inlinestatic

Definition at line 47 of file shaderprogramloader.cpp.

48  {
49  if (v == nullptr)
50  return nullptr;
51 
52  const ShaderProgramLoader *const rl
53  = static_cast<const ShaderProgramLoader *>(v);
54  ShaderProgram *const resource = shaders.createProgram(
55  rl->vertex,
56  rl->fragment,
57  rl->isNewShader);
58  if (resource == nullptr)
59  reportAlways("Shader program creation error")
60  return resource;
61  }
#define reportAlways(...)
Definition: checkutils.h:253
ShaderProgram * createProgram(const std::string &vertex, const std::string &fragment, const bool isNewShader)
ShadersManager shaders

References ShadersManager::createProgram(), fragment, isNewShader, reportAlways, shaders, and vertex.

Field Documentation

◆ fragment

const std::string anonymous_namespace{shaderprogramloader.cpp}::ShaderProgramLoader::fragment

Definition at line 44 of file shaderprogramloader.cpp.

Referenced by load().

◆ isNewShader

const bool anonymous_namespace{shaderprogramloader.cpp}::ShaderProgramLoader::isNewShader

Definition at line 45 of file shaderprogramloader.cpp.

Referenced by load().

◆ vertex

const std::string anonymous_namespace{shaderprogramloader.cpp}::ShaderProgramLoader::vertex

Definition at line 43 of file shaderprogramloader.cpp.

Referenced by load().


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