CPVRTPrint3D , Text wrong Aspect Ratio

This topic contains 3 replies, has 2 voices, and was last updated by  Arron 5 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30687

    mapa17
    Member

    Hello,

     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?

    Regards,
    Manuel

    #35229

    Arron
    Member

    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.

    #35230

    mapa17
    Member

    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

    #35231

    Arron
    Member

    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

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.