Render Wireframe Cube Only - No world Wireframe

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
explodingpancakes
Gnoblar
Posts: 12
Joined: Mon Jan 27, 2014 8:27 pm

Render Wireframe Cube Only - No world Wireframe

Post by explodingpancakes »

Hello all,

I'm trying to render a wireframe cube in my world (where each edge of the cube is displayed, but all of the faces are transparent). I have other objects in my world that cannot be wireframe, so I don't think I can use the camera wireframe functionality. From what I've researched, it looks like that makes the entire world a wireframe. I'm new to Ogre, so I'm sort of at a loss at how to do this. Does anyone have any tips? Or is there a way to do this that's already been defined?

Also, I've looked a bit at http://www.ogre3d.org/tikiwiki/tiki-ind ... metricmesh Not sure if that would be a solution for me?

Thanks! :D
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Render Wireframe Cube Only - No world Wireframe

Post by scrawl »

You can override the polygon mode on a per material basis. A possible solution for your problem could be:

1. Set camera to PM_WIREFRAME
2. For the meshes you do not want rendered as wireframe, go to their material and set polygon_mode_overrideable = false:

Code: Select all

material mymat
{
pass
{
polygon_mode_overrideable false
...
}
}
Or you could do it the other way round, keep your camera with the default PM_SOLID, then for the meshes you *do* want wireframe on set "polygon_mode wireframe" in the material's pass.

[1] http://www.ogre3d.org/docs/manual/manua ... errideable
[2] http://www.ogre3d.org/docs/manual/manua ... n_005fmode
Post Reply