mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 06:39:42 +00:00
Pathgrid edge resource management for editing multiple cells or multiple documents.
This commit is contained in:
parent
e430dcfd8a
commit
0e0ad97a91
1 changed files with 4 additions and 2 deletions
|
@ -28,6 +28,9 @@ namespace CSVRender
|
|||
|
||||
void CSVRender::Cell::createGridMaterials()
|
||||
{
|
||||
if(!Ogre::ResourceGroupManager::getSingleton().resourceGroupExists(DEBUGGING_GROUP))
|
||||
Ogre::ResourceGroupManager::getSingleton().createResourceGroup(DEBUGGING_GROUP);
|
||||
|
||||
if(Ogre::MaterialManager::getSingleton().getByName(PG_LINE_MATERIAL, DEBUGGING_GROUP).isNull())
|
||||
{
|
||||
Ogre::MaterialPtr lineMatPtr =
|
||||
|
@ -56,6 +59,7 @@ Ogre::ManualObject *CSVRender::Cell::createPathgridEdge(const std::string &name,
|
|||
{
|
||||
Ogre::ManualObject *result = mSceneMgr->createManualObject(name);
|
||||
|
||||
createGridMaterials();
|
||||
result->begin(PG_LINE_MATERIAL, Ogre::RenderOperation::OT_LINE_LIST);
|
||||
|
||||
Ogre::Vector3 direction = (end - start);
|
||||
|
@ -323,8 +327,6 @@ float CSVRender::Cell::getTerrainHeightAt(const Ogre::Vector3 &pos) const
|
|||
// - repainting edges while moving
|
||||
void CSVRender::Cell::loadPathgrid()
|
||||
{
|
||||
if(!Ogre::ResourceGroupManager::getSingleton().resourceGroupExists(DEBUGGING_GROUP))
|
||||
Ogre::ResourceGroupManager::getSingleton().createResourceGroup(DEBUGGING_GROUP);
|
||||
createGridMaterials();
|
||||
|
||||
int worldsize = ESM::Land::REAL_SIZE;
|
||||
|
|
Loading…
Reference in a new issue