When drawing triangles using vertex buffers, how is it that you can see one side and after rotating it, you don't see the other side.
Is there some way to change that?
can't see other side of triangle
- Kohedlo
- Orc
- Posts: 435
- Joined: Fri Nov 27, 2009 3:34 pm
- Location: Ukraine, Sumy
- x 32
- Contact:
Re: can't see other side of triangle
1)commonly material draw forward faces of triangles/ clockwise anticlockwise or none.
2) need make back side of trianfkle in manual object in same manerr as first.
2) need make back side of trianfkle in manual object in same manerr as first.
c++ game developer.
current project: Imperial Game Engine 2.5
current project: Imperial Game Engine 2.5
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
Re: can't see other side of triangle
Ogre 1.X:
Ogre 2.1, via code (I dont know via script, sorry):
Code: Select all
material mySuperMaterial
{
technique
{
pass
{
//...
cull_hardware none
cull_software none
}
}
}
Code: Select all
Ogre::HlmsMacroblock macroBlock = *datablock->getMacroblock();
macroBlock.mCullMode = Ogre::CULL_NONE;
Ogre::HlmsManager* hlmsManager = Ogre::Root::getSingletonPtr()->getHlmsManager();
const Ogre::HlmsMacroblock* finalMacroblock = hlmsManager->getMacroblock( macroBlock );
datablock->setMacroblock( finalMacroblock );