ShapeBase::renderImage crash bug
by Tom Spilman · in Torque Game Engine Advanced · 06/10/2006 (4:17 am) · 3 replies
Pretty simple one. In the change of ShapeBase::renderImage from GL to GFX, you missed the check for a null mShapeInstance. Should look like this...
This was needed when GameBase::gShowBoundingBox is enabled as it forces render images on shapes like cameras which have no shape instance.
void ShapeBase::renderImage(SceneState* state, SceneRenderImage* image)
{
if ( !mShapeInstance )
return;
GFX->pushWorldMatrix();
MatrixF mat = getRenderTransform();
mat.scale( mObjScale );
GFX->setWorldMatrix( mat );
mShapeInstance->animate();
mShapeInstance->render();
GFX->popWorldMatrix();
}This was needed when GameBase::gShowBoundingBox is enabled as it forces render images on shapes like cameras which have no shape instance.
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
Associate Kyle Carter