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

Static Public Member Functions

static Resourceload (const void *const v)
 

Data Fields

const std::string name
 
const unsigned int type
 

Detailed Description

Definition at line 39 of file shaderloader.cpp.

Member Function Documentation

◆ load()

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

Definition at line 46 of file shaderloader.cpp.

47  {
48  if (v == nullptr)
49  return nullptr;
50 
51  const ShaderLoader *const rl
52  = static_cast<const ShaderLoader *>(v);
53  Shader *const resource = shaders.createShader(rl->type, rl->name);
54  if (resource == nullptr)
55  reportAlways("Shader creation error: %s", rl->name.c_str())
56  return resource;
57  }
#define reportAlways(...)
Definition: checkutils.h:253
Definition: shader.h:30
Shader * createShader(const unsigned int type, const std::string &fileName)
ShadersManager shaders

References ShadersManager::createShader(), name, reportAlways, shaders, and type.

Field Documentation

◆ name

const std::string anonymous_namespace{shaderloader.cpp}::ShaderLoader::name

Definition at line 43 of file shaderloader.cpp.

Referenced by load().

◆ type

const unsigned int anonymous_namespace{shaderloader.cpp}::ShaderLoader::type

Definition at line 44 of file shaderloader.cpp.

Referenced by load().


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