can't see other side of triangle

Problems building or running the engine, queries about how to use features etc.
Post Reply
rrl
Halfling
Posts: 78
Joined: Sun Jun 04, 2017 12:33 am

can't see other side of triangle

Post by rrl »

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?
User avatar
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

Post by Kohedlo »

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.
c++ game developer.
current project: Imperial Game Engine 2.5
Image
xrgo
OGRE Expert User
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

Post by xrgo »

Ogre 1.X:

Code: Select all

material mySuperMaterial
{
    technique
    {
        pass
        {
            //...
            cull_hardware none
            cull_software none 
        }
    }
}
Ogre 2.1, via code (I dont know via script, sorry):

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 );
Post Reply