OGRECave / ogre-procedural

procedural geometry for Ogre3D
https://ogrecave.github.io/ogre-procedural/
MIT License
40 stars 17 forks source link

Commit c2616e9 doesn't work in OGRE 2.x #159

Closed TaaTT4 closed 3 years ago

TaaTT4 commented 3 years ago

I'm a bit embarrassed since I'm the same one who asked to cherry-pick that commit onto ogre-next branch (https://github.com/OGRECave/ogre-procedural/issues/158)... but I've discovered that it produces unexpected results with OGRE 2.x.

This is the code I use to create a procedural box:

Ogre::v1::MeshPtr mesh_v1 = Procedural::BoxGenerator(2.0f, 1.0f, 4.0f).realizeMesh("Box_v1");

Ogre::MeshPtr mesh_v2 = Ogre::MeshManager::getSingleton().createByImportingV1("Box_v2",
        Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
        mesh_v1.get(),
        false,
        false,
        true);

Ogre::Item* item = sceneManager()->createItem(mesh_v2);
item->setDatablock("BaseWhite");

Ogre::SceneNode* node = sceneManager()->getRootSceneNode()->createChildSceneNode();
node->attachObject(item);

Which generates the following box checking out the repository at df874a0 commit: Box_01

And the following box checking out the repository at d04fba0 commit: Box_02

Could you please reverse the commit 2d3d3f3 in ogre-next branch?

paroj commented 3 years ago

dropped by force-pushing