Last change
on this file since 11085 was
11085,
checked in by landauf, 8 years ago
|
enable glow shader in all scenes
|
-
Property svn:eol-style set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef _GlowMaterialListener_H__ |
---|
2 | #define _GlowMaterialListener_H__ |
---|
3 | |
---|
4 | #include <Ogre.h> |
---|
5 | #include <OgreMaterialManager.h> |
---|
6 | |
---|
7 | namespace orxonox |
---|
8 | { |
---|
9 | class GlowMaterialListener : public Ogre::MaterialManager::Listener |
---|
10 | { |
---|
11 | public: |
---|
12 | GlowMaterialListener() |
---|
13 | { |
---|
14 | mBlackMat = Ogre::MaterialManager::getSingleton().create("mGlowBlack", "Internal"); |
---|
15 | mBlackMat->getTechnique(0)->getPass(0)->setDiffuse(0,0,0,0); |
---|
16 | mBlackMat->getTechnique(0)->getPass(0)->setSpecular(0,0,0,0); |
---|
17 | mBlackMat->getTechnique(0)->getPass(0)->setAmbient(0,0,0); |
---|
18 | mBlackMat->getTechnique(0)->getPass(0)->setSelfIllumination(0,0,0); |
---|
19 | } |
---|
20 | |
---|
21 | Ogre::Technique* handleSchemeNotFound(unsigned short, const Ogre::String& schemeName, Ogre::Material*mat, unsigned short, const Ogre::Renderable*) |
---|
22 | { |
---|
23 | if (schemeName == "glow") |
---|
24 | { |
---|
25 | //LogManager::getSingleton().logMessage(">> adding glow to material: "+mat->getName()); |
---|
26 | return mBlackMat->getTechnique(0); |
---|
27 | } |
---|
28 | return NULL; |
---|
29 | } |
---|
30 | |
---|
31 | private: |
---|
32 | Ogre::MaterialPtr mBlackMat; |
---|
33 | }; |
---|
34 | } |
---|
35 | |
---|
36 | #endif /* _GlowMaterialListener_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.