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?
make changes to a render
-
- Halfling
- Posts: 73
- Joined: Tue Jun 14, 2016 12:26 pm
- x 19
Re: make changes to a render
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?