[2.1] porting Editable Terrain

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Kohedlo
Orc
Posts: 435
Joined: Fri Nov 27, 2009 3:34 pm
Location: Ukraine, Sumy
x 32
Contact:

[2.1] porting Editable Terrain

Post by Kohedlo »

there is simple tasks for porting terrain:

1) add v1:: namespaces.
2) among setMaterial add setDatablock()
3) initialize Movable Object for Tile.cpp

Code: Select all

Ogre::NameValuePairList params;
 //wxMessageBox("START ");
          mTiles[i][j] =  static_cast<Tile*>(Ogre::Root::getSingleton().getSceneManager
			  (CfgManager::getSingleton().main_scene_manager_name)
		->createMovableObject(
			  
			  TileFactory::FACTORY_TYPE_NAME,&Ogre::Root::getSingleton().getSceneManager
		(CfgManager::getSingleton().main_scene_manager_name)
		->_getEntityMemoryManager(Ogre::SCENE_DYNAMIC),
		
		&params));

5)

Code: Select all

	void Tile::_updateRenderQueue(Ogre::RenderQueue* queue)
    {
      mLightListDirty = true;

      queue->addRenderable(this, mRenderQueueID);
	  queue->addRenderable(mRenderQueueID,  5, false,this, this,false);
    }

theere in Tile.cpp present addRenderable( function, but last function not using in Ogre 2.1.


Old terrain (ogre 1.8.1) looks as:

Image
Large

On ogre 2.1 Terrain is not visible.

no crashes but no visible geometry.

Image

Large
c++ game developer.
current project: Imperial Game Engine 2.5
Image
User avatar
Kohedlo
Orc
Posts: 435
Joined: Fri Nov 27, 2009 3:34 pm
Location: Ukraine, Sumy
x 32
Contact:

Re: [2.1] porting Editable Terrain

Post by Kohedlo »

c++ game developer.
current project: Imperial Game Engine 2.5
Image
Post Reply