Morning all,
Just made a dumb mistake with my code that cause a bit of frustration. I now know the cause, but it doesn't make sense and I don't see how to fix it
I had some simple code along the lines of:
ID3D10EffectTechnique *t = g_pEffect->GetTechniqueByName( "name" );
if( NULL == t )
{
// Technique called "name" doesn't exist - error!
}
But D3D10 plodded on straight through this trap and eventually crashed when creating a state block during rendering (note: this is a bad error - it just hangs the app, no failed return code). A bit of investigating showed that GetTechniqueByName() returns garbage instead of NULL like previous FX9 did.
There is no mention in the specs I have nor the documentation about how to check if a technique (or variable..) exists and no mention of special return codes to check for...
So, anyone come across this I'm hoping I'm just doing something stupid here - I can't understand why there wouldn't be a way of checking this sort of thing short of complete enumeration of the effect.
Any help is appreciated!
Cheers,
Jack