mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 17:15:35 +00:00
Avoid OSG setting array binding from multiple threads
This commit is contained in:
parent
7b095e8701
commit
eb80c997b8
2 changed files with 2 additions and 3 deletions
|
@ -186,7 +186,7 @@ namespace Terrain
|
||||||
|
|
||||||
int vertexCount = numVerts * numVerts;
|
int vertexCount = numVerts * numVerts;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Vec2Array> uvs (new osg::Vec2Array);
|
osg::ref_ptr<osg::Vec2Array> uvs (new osg::Vec2Array(osg::Array::BIND_PER_VERTEX));
|
||||||
uvs->reserve(vertexCount);
|
uvs->reserve(vertexCount);
|
||||||
|
|
||||||
for (unsigned int col = 0; col < numVerts; ++col)
|
for (unsigned int col = 0; col < numVerts; ++col)
|
||||||
|
|
|
@ -197,8 +197,7 @@ osg::ref_ptr<osg::Node> ChunkManager::createChunk(float chunkSize, const osg::Ve
|
||||||
bool useCompositeMap = chunkSize >= mCompositeMapLevel;
|
bool useCompositeMap = chunkSize >= mCompositeMapLevel;
|
||||||
unsigned int numUvSets = useCompositeMap ? 1 : 2;
|
unsigned int numUvSets = useCompositeMap ? 1 : 2;
|
||||||
|
|
||||||
for (unsigned int i=0; i<numUvSets; ++i)
|
geometry->setTexCoordArrayList(osg::Geometry::ArrayList(numUvSets, mBufferCache.getUVBuffer(numVerts)));
|
||||||
geometry->setTexCoordArray(i, mBufferCache.getUVBuffer(numVerts));
|
|
||||||
|
|
||||||
geometry->createClusterCullingCallback();
|
geometry->createClusterCullingCallback();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue