implemented reinstancing for d3d9

This commit is contained in:
aap
2020-04-16 12:53:25 +02:00
parent 47fcb3001a
commit f1c9112f27
8 changed files with 189 additions and 100 deletions

View File

@@ -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;