CPVRTPrint3D , Text wrong Aspect Ratio

Hello,

 would like to use CPVRTPrint3D to print some text in a viewport (something like 800x200) but, face the problem that the text is stretched to much into the X-Axes.

I tried to fix this by changing the dwScreenX and dwScreenY Parameter in SetTextures(), or the the fSizeX/fSizeY Parameter in SetWindow(), but changing these parameters, does seem to effect how the text ist displayed at all.

I have seen people asking questions about being able to change the font used by CPVRTPrint3D, is this needed in order to change the text aspect ratio?

Regards,
Manuel




Hi Manuel.


Take a look at the functions SetProjection and SetModelView. These allow you to pass in your own projection and view matrices allowing for customisation of the output - this should solve your problem.





Regards.

Hello Arron,

thank you very much! I found setProjection as part of pvrengine::UniformHandler

Code:

void setProjection(const VERTTYPE fFOV,
            const VERTTYPE fAspectRatio,
            const VERTTYPE fNear,
            const VERTTYPE fFar,
            const bool bRotate);


But to be honest i try for some time now to use this method "somehow" with no success. I think i just have not enough insight in the povershell framework, but how can/should i use setProjection?  I dont even now where to get a UniformHandler from ( in only found Material::getUniformHandler(), and this gets it from MaterialManager, which receives it as an argument to init() ? from whom? )

Is there maybe an example on how to use UniformHandler?

Regards,
Manuel


Hi Manuel.





Apologies, I should have been more clear. I meant the SetProjection and SetModelView methods belonging to Print3D (i.e CPVRTPrint3D::SetProjection).





These functions were added to the latest SDK release (2.9) so make sure you’ve got the latest download.Arron2011-11-18 14:25:00