EDIT : this is possible in ogre 1.6, according to this (latter) thread :
http://www.ogre3d.org/phpBB2/viewtopic.php?t=41073
Hello,
I suggest to add a pragma into material / pass / texture_unit. It's like a user defined information. It could be extremely useful, when a new effect must be developped and tested, without directly produce a patch for it that changes the parser.
Code: Select all
material
{
pragma (nameOfpragma1, what ever you want on the line)
pragma (nameOfpragma2, another information)
technique
{
pass firstpass
{
pragma (passToTexture, myRTT)
pragma (useNvidiaUnfoldShader, true)
texture_unit
{
dog.jpg
}
...
}
}
}
Then the programmer just has to make :
Code: Select all
myMaterialPtr->hasPragma("nameOfpragma1");
String myPragma = myMaterialPtr->getPragma("nameOfpragma1");
Technique / Pass / TextureUnit
(even if maybe Technique is already ok with the scheme feature). It permits lots of customization (for exporters / importers), and prototyping easily new feature (for example the new blend in Shoggoth). It could also be named 'userInfo' instead of pragma...
What do you think?[/b]
