mirror of
https://github.com/aap/librw.git
synced 2025-12-19 17:09:51 +00:00
fixed handling of NATIVE flag
This commit is contained in:
@@ -27,9 +27,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;
|
||||
@@ -87,7 +87,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_GL3);
|
||||
|
||||
@@ -322,7 +322,8 @@ 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, wdgl can't render)
|
||||
if(geo->instData)
|
||||
return;
|
||||
InstanceDataHeader *header = new InstanceDataHeader;
|
||||
geo->instData = header;
|
||||
@@ -441,7 +442,6 @@ instance(rw::ObjPipeline *rwpipe, Atomic *atomic)
|
||||
}
|
||||
a++;
|
||||
}
|
||||
geo->flags |= Geometry::NATIVE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user