make changes to a render

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

make changes to a render

Post by rrl » Sun Apr 14, 2019 1:56 am

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?
0 x

Hrenli
Halfling
Posts: 64
Joined: Tue Jun 14, 2016 12:26 pm
x 9

Re: make changes to a render

Post by Hrenli » Tue Apr 16, 2019 11:21 am

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?
1 x

Post Reply