Leviathan  0.8.0.0
Leviathan game engine
Leviathan::TextureGenerator Class Reference

#include <TextureGenerator.h>

Static Public Member Functions

static DLLEXPORT bool LoadSolidColourLightMaterialToMemory (const std::string &name, const Float4 &diffusecolour=Float4(1))
 

Detailed Description

Definition at line 7 of file TextureGenerator.h.

Member Function Documentation

◆ LoadSolidColourLightMaterialToMemory()

DLLEXPORT bool Leviathan::TextureGenerator::LoadSolidColourLightMaterialToMemory ( const std::string &  name,
const Float4 diffusecolour = Float4(1) 
)
static

Definition at line 10 of file TextureGenerator.cpp.

10  {
11  // Create it with ogre material manager //
12  Ogre::MaterialManager& manager = Ogre::MaterialManager::getSingleton();
13 
14  Ogre::MaterialPtr mat = manager.create(name, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
15 
16  if(mat.isNull()){
17  // Probably failed to create it //
18  return false;
19  }
20  // Set settings //
21  Ogre::Pass* pass = mat->getTechnique(0)->getPass(0);
22 
23  pass->setDiffuse(diffusecolour);
24 
25  mat->compile();
26 
27  return true;
28 }

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