Hi all,
Because ghosting is currently broke in 1.6.2, I thought I'd have a go at playing with object data directly to see if it was possible to force DGDK to render an object ghosted, by directly modifying the parameters of an object structure stored internally.
It almost worked, but unfortunately there were side effects, but you can experiment further yourself to see if you can eventually get it to work. I'm just laying down the foundation.
#include <DarkGDK.h>
#include <dbodata.h>
bool GhostObject( int nObjectID, int nGhostMode )
{
bool bErr = true;
sObject *pDBObject;
long lObject;
pDBObject = dbGetObject( nObjectID );
if( pDBObject )
{
pDBObject->bGhostedObject = true;
pDBObject->bTransparentObject = true;
for( lObject = 0; lObject<pDBObject->iMeshCount; lObject++ )
{
pDBObject->ppMeshList[ lObject ]->bGhost = true;
pDBObject->ppMeshList[ lObject ]->bTransparency = true;
pDBObject->ppMeshList[ lObject ]->iGhostMode = nGhostMode
}
bErr = false;
}
return bErr;
}
This is in no way a solution of course, but it's an attempt and trying to figure if I can directly influence DX for rendering a Ghost object.
Also, if your dbGetObject function is commented out or wrong for whatever reason in the header file (DarkSDKBasic3D.h), the prototype is:
sObject* dbGetObject( int iID );
Also, you will need to #include <DBO Format/dbodata.h>
at the top of the header file as well, otherwise sObject will cause an error when building
I've tweaked and changed my headers to resolve problems so much, I can't remember if this is actually available in the originally installed header files.
Anyway, have fun.
Paul.