From: Larry E. Ramey (hydrajak++at++yahoo.com)
Date: 09/24/2002 14:01:06
Can anyone explain why I would get errors like this?
PF Warning/Internal:
pfuGridifyReadFunc(itile=0x50363f20): no userdata?
PF Warning/Internal:
pfuGridifyReadFunc(itile=0x50378c00): no userdata?
PF Warning/Internal:
pfuGridifyReadFunc(itile=0x5038d8e0): no userdata?
PF Warning/Internal:
pfuGridifyReadFunc(itile=0x503a3280): no userdata?
.
.
.
.
There is nothing wrong with my cliptex config file
since the /usr/share/Performer/ program cliptex runs
it.
My process is forked, but all construction occurs in
the APP process. The ClipCenter is being calculated
correctly, its just the images look like they are
garbage memory when I view them. Some tiles are
correct, but in the wrong place, others lay on top of
each other, and still others are random static.
Clearly there is an initization error, but I'm not
sure why.
Code:
pfClipTexture* ctUnshared =
pfdLoadClipTexture(textureName.data());
pfClipTexture* ct = new(pfGetSharedArena())
pfClipTexture;
ct->copy(ctUnshared);
//pfUnrefDelete(ctUnshared);
pfuGridifyClipTexture(ct);
//##check size
int clipSize[3];
ct->getVirtualSize(clipSize,
clipSize+1,
clipSize+2);
int virtsize =
PF_MAX3(clipSize[0],clipSize[1],clipSize[2]);
int levels = log2int(virtsize) + 1;
int maxlevels;
pfQuerySys(PFQSYS_MAX_CLIPTEXTURE_SIZE,
&maxlevels);
cout<<"MAX LEVELS"<<maxlevels<<endl;
if(maxlevels) /* cliptexturing is supported on
this system */
maxlevels = log2int(maxlevels) + 1;
int neweffectivelevels = PF_MIN2(levels - 1,
maxlevels);
/* force cliptexture to be virtual if it's not
already */
if(neweffectivelevels <
ct->getNumEffectiveLevels()){
//MUST BE NON-VIRTUAL!!!
ct->setNumEffectiveLevels(neweffectivelevels);
}
else assert(false);
tex->setRepeat(PFTEX_WRAP,PFTEX_CLAMP);
gState->setMode(PFSTATE_ENTEXTURE, PF_ON);
gState->setAttr(PFSTATE_TEXTURE, tex);
gState->setAttr(PFSTATE_TEXENV,tev);
<skip>
#####NOTE#####
cb is an object in shared memory. when I call a
function on it, it computes the clipcenter. This works
fine
#############
//MAKE MPCLIP
pfClipTexture* ct =
(pfClipTexture*)s->m_geoSet->getGState()->getAttr(PFSTATE_TEXTURE);
assert(ct);
pfMPClipTexture* mpClip = new
pfMPClipTexture();
assert(mpClip);
mpClip->setClipTexture(ct);
pfuAddMPClipTextureToPipes(mpClip,
pfGetPipe(0), NULL);
//END MAKE MPCLIP
ct->getVirtualSize(&m_virtClipSize[0],
&m_virtClipSize[1],
&m_virtClipSize[2]);
cout<<m_virtClipSize[0]<<"
"<<m_virtClipSize[1]<<" "<<m_virtClipSize[2]<<endl;
int slotNum = m_geode->getNamedUserDataSlot(
PFPeerGeometry::MPCLIP_SLOTNAME );
m_geode->setUserData(slotNum,mpClip);
m_geode->setTravFuncs(PFTRAV_CULL,0,localPFGeometry::calcClipCenter);
m_geode->setTravData(PFTRAV_CULL,cb);
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
This archive was generated by hypermail 2b29 : Tue Sep 24 2002 - 14:01:25 PDT