mirror of
https://github.com/aap/librw.git
synced 2025-12-20 01:19:51 +00:00
implemented reinstancing for d3d9
This commit is contained in:
@@ -73,6 +73,7 @@ Geometry::create(int32 numVerts, int32 numTris, uint32 flags)
|
||||
geo->addMorphTargets(1);
|
||||
|
||||
geo->matList.init();
|
||||
geo->lockedSinceInst = 0;
|
||||
geo->meshHeader = nil;
|
||||
geo->instData = nil;
|
||||
geo->refCount = 1;
|
||||
@@ -98,6 +99,24 @@ Geometry::destroy(void)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Geometry::lock(int32 lockFlags)
|
||||
{
|
||||
lockedSinceInst |= lockFlags;
|
||||
if(lockFlags & LOCKPOLYGONS){
|
||||
rwFree(this->meshHeader);
|
||||
this->meshHeader = nil;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Geometry::unlock(void)
|
||||
{
|
||||
if(this->meshHeader == nil)
|
||||
this->buildMeshes();
|
||||
|
||||
}
|
||||
|
||||
struct GeoStreamData
|
||||
{
|
||||
uint32 flags;
|
||||
|
||||
Reference in New Issue
Block a user