How to put Wireframe and color together?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
peleta
Posts: 5
Joined: Wed Nov 18, 2009 1:58 pm

How to put Wireframe and color together?

Post by peleta »

Hi everybody!
This is my first question here.

I am trying to put a cube with an specific color, I guess I can do it just with the lights.
But I also want to see the wireframes of the cube.
How can I do that?

Thank you very much!

See ya
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Simply set it to wireframe in the material.
peleta
Posts: 5
Joined: Wed Nov 18, 2009 1:58 pm

Post by peleta »

But in this way I can't see the colors,
Or I see the colors or I see the wireframe..

I would like to have the wireframs in black and the object in another color, like red..

Any idea?

Thanks
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

Like show edged faces in Max 8)))
Do you like VODKA???
Image
Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Simply render two times the same object, one with wireframe and one normal.
peleta
Posts: 5
Joined: Wed Nov 18, 2009 1:58 pm

Post by peleta »

It is still not working,

This is what I am doing

Code: Select all

scene::ISceneNode * table = smgr->addCubeSceneNode();
	if(table){
		table->setPosition(core::vector3df(0,0,0));
		table->setMaterialType(video::EMT_SOLID);

		table->setScale(core::vector3df(40,40,1));
		table->setMaterialFlag(video::EMF_LIGHTING, true);

		table->getMaterial(0).DiffuseColor.set(0,0,0,0);
		table->getMaterial(0).AmbientColor.set(0,0,0,0);
		table->getMaterial(0).SpecularColor.set(0,0,0,0);
		table->getMaterial(0).EmissiveColor.set(255,255,0,0);


		table->setMaterialFlag(video::EMF_WIREFRAME, true);
		
	}
If I set "true" in the last lcode-line, it stays totally red, if I set false, it stays transparent with the wireframe in red. I would like to have the object totally in red with the wireframe in black.

Any clue?

Thank you for your answer!
:)
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

hybrid wrote:Simply render two times the same object, one with wireframe and one normal.
There's your clue ;)
Image Image Image
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

If i am not mistaken, you can apply a texture to an object and turn it wireframe and the wireframe will be the same color as the texture. For example, i had an old project with water(blue texture) and when i change it to wireframe the wireframe was blue. Hope this helps.

Edit:
Here is a screenshot:
Image
multum in parvo
Post Reply