fixed handling of NATIVE flag

This commit is contained in:
aap
2017-08-21 23:15:31 +02:00
parent 0d8dc5d799
commit 8fc446f13b
10 changed files with 50 additions and 18 deletions

View File

@@ -248,9 +248,9 @@ instance(rw::ObjPipeline *rwpipe, Atomic *atomic)
{
ObjPipeline *pipe = (ObjPipeline*)rwpipe;
Geometry *geo = atomic->geometry;
if(geo->flags & Geometry::NATIVE)
// TODO: allow for REINSTANCE
if(geo->instData)
return;
geo->flags |= Geometry::NATIVE;
InstanceDataHeader *header = new InstanceDataHeader;
MeshHeader *meshh = geo->meshHeader;
geo->instData = header;
@@ -328,7 +328,8 @@ render(rw::ObjPipeline *rwpipe, Atomic *atomic)
{
ObjPipeline *pipe = (ObjPipeline*)rwpipe;
Geometry *geo = atomic->geometry;
if((geo->flags & Geometry::NATIVE) == 0)
// TODO: allow for REINSTANCE
if(geo->instData == nil)
pipe->instance(atomic);
assert(geo->instData != nil);
assert(geo->instData->platform == PLATFORM_D3D8);

View File

@@ -313,9 +313,9 @@ instance(rw::ObjPipeline *rwpipe, Atomic *atomic)
{
ObjPipeline *pipe = (ObjPipeline*)rwpipe;
Geometry *geo = atomic->geometry;
if(geo->flags & Geometry::NATIVE)
// TODO: allow for REINSTANCE
if(geo->instData)
return;
geo->flags |= Geometry::NATIVE;
InstanceDataHeader *header = new InstanceDataHeader;
MeshHeader *meshh = geo->meshHeader;
geo->instData = header;
@@ -399,7 +399,8 @@ render(rw::ObjPipeline *rwpipe, Atomic *atomic)
{
ObjPipeline *pipe = (ObjPipeline*)rwpipe;
Geometry *geo = atomic->geometry;
if((geo->flags & Geometry::NATIVE) == 0)
// TODO: allow for REINSTANCE
if(geo->instData == nil)
pipe->instance(atomic);
assert(geo->instData != nil);
assert(geo->instData->platform == PLATFORM_D3D9);

View File

@@ -197,9 +197,9 @@ instance(rw::ObjPipeline *rwpipe, Atomic *atomic)
ObjPipeline *pipe = (ObjPipeline*)rwpipe;
Geometry *geo = atomic->geometry;
if(geo->flags & Geometry::NATIVE)
// TODO: allow for REINSTANCE (or not, xbox can't render)
if(geo->instData)
return;
geo->flags |= Geometry::NATIVE;
InstanceDataHeader *header = new InstanceDataHeader;
MeshHeader *meshh = geo->meshHeader;
geo->instData = header;