Scaling a shapebaseimage
by Ian Omroth Hardingham · in Torque Game Engine · 09/01/2005 (5:50 am) · 3 replies
Hey everyone.
I can't find any way to scale a shapebaseimagedata for mounting. Is this simply a feature not supported?
thanks,
Ian
I can't find any way to scale a shapebaseimagedata for mounting. Is this simply a feature not supported?
thanks,
Ian
About the author
Designer and lead programmer on Frozen Synapse, Frozen Endzone, and Determinance. Co-owner of Mode 7 Games.
#2
Nice :) Thanks Anthony.
Ian
09/01/2005 (6:26 am)
Ah, I didn't realise it would be as easy as adding a scale member to shapeBaseImageData and:// new code
glScalef(image.dataBlock->scale.x, image.dataBlock->scale.y, image.dataBlock->scale.z);
// end of new code
image.shapeInstance->setupFog(fogAmount,state->getFogColor());
//image.shapeInstance->animate();
image.shapeInstance->render();
// easiest just to shut it off here. If we're cloaked on the next frame,
// we don't want envmaps...
image.shapeInstance->setEnvironmentMapOn(false, 1.0);Nice :) Thanks Anthony.
Ian
#3
--edit--
AH! To get this to work, I added in Player::renderMountedImage()
glScalef(image.dataBlock->scale.x, image.dataBlock->scale.y, image.dataBlock->scale.z);
03/14/2007 (4:41 pm)
I tried adding a Point3F scale member to struct ShapeBaseImageData: public GameBaseData {} and added the "glScalef()" in the function ShapeBase::renderMountedImage(). Is this the correct place to do it and does this work in TGE 1.5?--edit--
AH! To get this to work, I added in Player::renderMountedImage()
glScalef(image.dataBlock->scale.x, image.dataBlock->scale.y, image.dataBlock->scale.z);
Associate Anthony Rosenbaum