- November 15, 2011 at 12:13 pm #30687
would like to use CPVRTPrint3D to print some text in a viewport (something like 800×200) 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?
ManuelNovember 15, 2011 at 12:58 pm #35229
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.November 18, 2011 at 2:09 pm #35230
thank you very much! I found setProjection as part of pvrengine::UniformHandlerCode: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?
ManuelNovember 18, 2011 at 2:24 pm #35231
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.
Arron 2011-11-18 14:25:00