Colored wireframe material

Problems building or running the engine, queries about how to use features etc.
Post Reply
jchmack
Goblin
Posts: 267
Joined: Tue Feb 28, 2006 12:30 pm

Colored wireframe material

Post by jchmack »

I am trying to create a green wireframe material:

Code: Select all

CustomMaterial = MaterialManager::getSingleton().create("DebugGreenWireframe", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
	CustomMaterial->setAmbient(ColourValue(0,1,0));
	CustomMaterial->getTechnique(0)->getPass(0)->setPolygonMode(PM_WIREFRAME);
even though i set the ambient to green it still stays white. This has got to be something simple lol.

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Try setting the diffuse also.

Code: Select all

CustomMaterial->setDiffuse(ColourValue(0,1,0)); 
:wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

jchmack
Goblin
Posts: 267
Joined: Tue Feb 28, 2006 12:30 pm

Post by jchmack »

:oops: Thx Jac

Post Reply