Page 1 of 1

make changes to a render

Posted: Sun Apr 14, 2019 1:56 am
by rrl
Ogre Version: :2.1:
Operating System: :linux:
Render System: :GL3+:

I have a one-time function call where I create a model and sets up like so:

void MyTest::createVehicle() {
Ogre::HlmsManager* hlmsManager =
Ogre::Root::getSingleton().getHlmsManager();

Ogre::HlmsUnlit *hlmsUnlit = static_cast<Ogre::HlmsUnlit*>
(hlmsManager->getHlms(Ogre::HLMS_UNLIT));

Ogre::HlmsMacroblock mblck = Ogre::HlmsMacroblock();
mblck.mPolygonMode = Ogre::PM_WIREFRAME;
mblck.mCullMode = Ogre::CULL_NONE;
// ...

Once this function completes, the model renders. Now I'd like to press a button that changes mCullMode to CULL_CLOCKWISE, but don't know where or how to change this so that it takes affect.

Can anyone offer advice on how to do this?

Re: make changes to a render

Posted: Tue Apr 16, 2019 11:21 am
by Hrenli
Should be quite straightforward. Create another datablock with its macroblock set to CULL_CLOCKWISE and then call item.setDatablock() with that new datablock as a parameter I suppose?