[Pbrt-discuss] help! plugin problem.

Bill Conan billconan at gmail.com
Mon Jan 28 20:49:37 EST 2008


hello guys,

i wrote a accelerator plugin for pbrt. the code was modified directly
from grid.cpp, however weird problem happened when i tried to run it.

this is the problematic part:

extern "C" DLLEXPORT Primitive *CreateAccelerator(const
vector<Reference<Primitive> > &prims,const ParamSet &ps)
{
printf("%d",prims.size());
if(!prims[0]) printf("kkkkk");
return new GridTreeAccel(prims);
}

i tried to render areapot.pbrt
the prims.size() is 105, however prims[0] is NULL, i will get access violation.

why does this happen? i can't see any difference with grid.cpp.

thank you.


More information about the pbrt-discuss mailing list