- April 21, 2010 at 8:45 am #30122Hi,Does anyone know how to ratate text on the screen?
So far, I can use the following API to show text on the screen base on PVRtool.m_Print3D.Print3D(8.0f, 30.0f, 1.5f, 0xFFAA4040, “example”)But, I want to rotate the text with 30 degree for x-axis(y-axis or z-axis ) on the screen.Does anyone have any idea about this question?Thank for your help.April 21, 2010 at 9:02 am #33862Hi,By the way.I implement this function which was shown text on the screen base on OpenGL ES 2.0 and I run this program in linux system.So far,I only can show text on the screen.I can’t rotate any degree of text with x-axis on the screen.Does anyone have similar experience about this question?If you have similar experience ,please kindly give me some suggestion.Thanks.April 21, 2010 at 10:27 am #33863
Print3D doesn’t offer this facility, I’m afraid. You could try altering the Print3D code to render at the angle you want, otherwise you’d have to implement your own solution.April 21, 2010 at 10:57 am #33864
Hi Gordon,Thank for your response so quickly.Could I ask more detail information about this question ?In fact, I have tried to modify Print3D code.in the PVRTPrint3DAPI.cppI find that there are two function which is relative with text.The first one is APIDrawLogo.it will show the logo picture.The second one is APIRenderStates.it seems like to show text on the screen.in the APIDrawLogo()I can rotate logo picture by calling PVRTMatrixRotationZ().It can work successfully.in the APIRenderStates()I try to rotate text by calling PVRTMatrixRotationZ().but It cannot work successfully.I can’t rotate any angle by calling PVRTMatrixRotationZOnce I modify the Matrix, the text will disappear on the screen.Do you have any idea about this question ?I’m very appreciate your response again.in the PVRTPrint3DAPI.cpp/* Set matrix with viewport dimensions */
for(i=0; i<16; i++)
Matrix.f = (2.0f/(m_fScreenScale*640.0f));
Matrix.f = (-2.0f/(m_fScreenScale*480.0f));
Matrix.f = (1.0f);
Matrix.f = (-1.0f);
Matrix.f = (1.0f);
Matrix.f = (1.0f);/* Use the shader */
glUseProgram(m_pAPI->m_ProgramObject);/* Bind the projection and modelview matrices to the shader */
int location = glGetUniformLocation(m_pAPI->m_ProgramObject, “myMVPMatrix”);
glUniformMatrix4fv( location, 1, GL_FALSE, Matrix.f);April 21, 2010 at 1:20 pm #33865
Hi Gordon,I have solved this issue.it seems that the text is out of screen.Therefore I can’t see the text which I rotate.Now I can rotate text successfully.Thank for your help and response.