From: Alexej Fink (alexejfink++at++gmx.net)
Date: 11/02/2005 02:29:37
Hello,
we have a problem submitting a userdata-pointer to bin pre/post funcs:
---- code ----------------------------------------------------
//virtual
void avMPShaderProgram::setupBin( int bin, pfChannel& chan) {
chan.setBinCallBack( bin, PFBIN_CALLBACK_PRE_DRAW,
&avMPShaderProgram::pre);
chan.setBinCallBack( bin, PFBIN_CALLBACK_POST_DRAW,
&avMPShaderProgram::post);
chan.setBinUserData( bin, this, sizeof(avMPShaderProgram));
...
--------------------------------------------------------------
in the callback function "&avMPShaderProgram::pre":
---- code ----------------------------------------------------
//static
void avMPShaderProgram::pre ( void *userData)
{
avMPShaderProgram *sp = (avMPShaderProgram*) userData;
std::cout << "avMPShaderProgram::pre-userData: " << sp << std::endl <<
std::flush;
sp->pre_impl(); // virtual member func.
}
--------------------------------------------------------------
we get a different/wrong pointer. Any suggestions?
============================================================
and one more time:
- why is bin-managing "done" by channel-instances?
============================================================
btw. in man pfObject, there is a strange sentence:
Note that memory from pfMemory::malloc is not an considered a pfObject so
user-data pointers are not provided for pfMalloc'ed memory.
Alexej
-- Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat, DSL-Flatrate für nur 4,99 Euro/Monat* http://www.gmx.net/de/go/dsl
This archive was generated by hypermail 2b29 : Wed Nov 02 2005 - 02:29:51 PST