Page 1 of 1

[2.1] Wireframe on solid?

Posted: Tue Oct 09, 2018 6:14 pm
by Jay721
Hi guys.

Nooby question here, I need to show a wireframe ontop of a solid object. I've been doing

Code: Select all

macroblock.mPolygonMode = Ogre::PM_WIREFRAME;
To get a pure wireframe, but not sure how to get solid and wireframe at the same time?

Thanks..

Re: [2.1] Wireframe on solid?

Posted: Tue Oct 09, 2018 6:28 pm
by al2950
You will need to render the object twice. I would recommend duplicating the objecting and putting it in a separate render queue and a separate pass. Render the solid object first then render your wireframe object. To ensure the wireframe object does not get culled by the depth buffer make sure you set the depth bias, see HlmsMacroblock::mDepthBiasConstant

Re: [2.1] Wireframe on solid?

Posted: Tue Oct 09, 2018 11:14 pm
by xrgo
Haven't tried it but you could also implement wireframe drawing via pixel shader:
http://codeflow.org/entries/2012/aug/02 ... ordinates/
You can extend the PBS implementation using custom pieces