mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:45:36 +00:00
fixes build (#3134)
* quadtreeworld.cpp * renderingmanager.cpp [ci skip] * quadtreeworld.hpp * cellborder.hpp * cellborder.cpp
This commit is contained in:
parent
803195a05f
commit
d8707a763f
5 changed files with 9 additions and 9 deletions
|
@ -414,9 +414,10 @@ namespace MWRender
|
|||
const int vertexLodMod = Settings::Manager::getInt("vertex lod mod", "Terrain");
|
||||
float maxCompGeometrySize = Settings::Manager::getFloat("max composite geometry size", "Terrain");
|
||||
maxCompGeometrySize = std::max(maxCompGeometrySize, 1.f);
|
||||
bool debugChunks = Settings::Manager::getBool("debug chunks", "Terrain");
|
||||
mTerrain.reset(new Terrain::QuadTreeWorld(
|
||||
sceneRoot, mRootNode, mResourceSystem, mTerrainStorage.get(), Mask_Terrain, Mask_PreCompile, Mask_Debug,
|
||||
compMapResolution, compMapLevel, lodFactor, vertexLodMod, maxCompGeometrySize));
|
||||
compMapResolution, compMapLevel, lodFactor, vertexLodMod, maxCompGeometrySize, debugChunks));
|
||||
if (Settings::Manager::getBool("object paging", "Terrain"))
|
||||
{
|
||||
mObjectPaging.reset(new ObjectPaging(mResourceSystem->getSceneManager()));
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <osg/Material>
|
||||
#include <osg/PolygonMode>
|
||||
#include <osg/Geometry>
|
||||
#include <osg/Geode>
|
||||
|
||||
#include "world.hpp"
|
||||
#include "../esm/loadland.hpp"
|
||||
|
@ -22,7 +21,7 @@ CellBorder::CellBorder(Terrain::World *world, osg::Group *root, int borderMask,
|
|||
{
|
||||
}
|
||||
|
||||
osg::ref_ptr<osg::Geode> CellBorder::createBorderGeometry(float x, float y, float size, Terrain::Storage* terrain, Resource::SceneManager* sceneManager, int mask,
|
||||
osg::ref_ptr<osg::Group> CellBorder::createBorderGeometry(float x, float y, float size, Terrain::Storage* terrain, Resource::SceneManager* sceneManager, int mask,
|
||||
float offset, osg::Vec4f color)
|
||||
{
|
||||
const int cellSize = ESM::Land::REAL_SIZE;
|
||||
|
@ -66,8 +65,8 @@ osg::ref_ptr<osg::Geode> CellBorder::createBorderGeometry(float x, float y, floa
|
|||
|
||||
border->addPrimitiveSet(new osg::DrawArrays(GL_LINE_STRIP,0,vertices->size()));
|
||||
|
||||
osg::ref_ptr<osg::Geode> borderGeode = new osg::Geode;
|
||||
borderGeode->addDrawable(border.get());
|
||||
osg::ref_ptr<osg::Group> borderGeode = new osg::Group;
|
||||
borderGeode->addChild(border.get());
|
||||
|
||||
osg::StateSet *stateSet = borderGeode->getOrCreateStateSet();
|
||||
osg::ref_ptr<osg::Material> material (new osg::Material);
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Terrain
|
|||
*/
|
||||
void destroyCellBorderGeometry();
|
||||
|
||||
static osg::ref_ptr<osg::Geode> createBorderGeometry(float x, float y, float size, Storage* terrain, Resource::SceneManager* sceneManager, int mask, float offset = 10.0, osg::Vec4f color = { 1,1,0,0 });
|
||||
static osg::ref_ptr<osg::Group> createBorderGeometry(float x, float y, float size, Storage* terrain, Resource::SceneManager* sceneManager, int mask, float offset = 10.0, osg::Vec4f color = { 1,1,0,0 });
|
||||
|
||||
protected:
|
||||
Terrain::World *mWorld;
|
||||
|
|
|
@ -271,7 +271,7 @@ private:
|
|||
unsigned int mNodeMask;
|
||||
};
|
||||
|
||||
QuadTreeWorld::QuadTreeWorld(osg::Group *parent, osg::Group *compileRoot, Resource::ResourceSystem *resourceSystem, Storage *storage, unsigned int nodeMask, unsigned int preCompileMask, unsigned int borderMask, int compMapResolution, float compMapLevel, float lodFactor, int vertexLodMod, float maxCompGeometrySize)
|
||||
QuadTreeWorld::QuadTreeWorld(osg::Group *parent, osg::Group *compileRoot, Resource::ResourceSystem *resourceSystem, Storage *storage, unsigned int nodeMask, unsigned int preCompileMask, unsigned int borderMask, int compMapResolution, float compMapLevel, float lodFactor, int vertexLodMod, float maxCompGeometrySize, bool debugChunks)
|
||||
: TerrainGrid(parent, compileRoot, resourceSystem, storage, nodeMask, preCompileMask, borderMask)
|
||||
, mViewDataMap(new ViewDataMap)
|
||||
, mQuadTreeBuilt(false)
|
||||
|
@ -279,7 +279,7 @@ QuadTreeWorld::QuadTreeWorld(osg::Group *parent, osg::Group *compileRoot, Resour
|
|||
, mVertexLodMod(vertexLodMod)
|
||||
, mViewDistance(std::numeric_limits<float>::max())
|
||||
, mMinSize(1/8.f)
|
||||
, mDebugTerrainChunks(Settings::Manager::getBool("debug chunks", "Terrain"))
|
||||
, mDebugTerrainChunks(debugChunks)
|
||||
{
|
||||
mChunkManager->setCompositeMapSize(compMapResolution);
|
||||
mChunkManager->setCompositeMapLevel(compMapLevel);
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace Terrain
|
|||
class QuadTreeWorld : public TerrainGrid // note: derived from TerrainGrid is only to render default cells (see loadCell)
|
||||
{
|
||||
public:
|
||||
QuadTreeWorld(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, unsigned int nodeMask, unsigned int preCompileMask, unsigned int borderMask, int compMapResolution, float comMapLevel, float lodFactor, int vertexLodMod, float maxCompGeometrySize);
|
||||
QuadTreeWorld(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, unsigned int nodeMask, unsigned int preCompileMask, unsigned int borderMask, int compMapResolution, float comMapLevel, float lodFactor, int vertexLodMod, float maxCompGeometrySize, bool debugChunks);
|
||||
|
||||
~QuadTreeWorld();
|
||||
|
||||
|
|
Loading…
Reference in a new issue