make changes to a render

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

make changes to a render

Post 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::HlmsUnlit *hlmsUnlit = static_cast<Ogre::HlmsUnlit*>

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?

Posts: 73
Joined: Tue Jun 14, 2016 12:26 pm
x 18

Re: make changes to a render

Post 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?

Post Reply