Different behavior of QPaint Print Text in different machines.
The is my Main GlPaint function
- {
- newtonDemos* const mainWindow = (newtonDemos*) parent();
- makeCurrent();
- // do all 2d drawing
- glShadeModel(GL_FLAT);
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
- //This is correct on all OS
- Print (painter, 14, 14, "FPS: %6.2f", fps);
- // This is correct on Widnows 7, Linux and Mac but wrong on Windows64 (what is wrong?)
- Print (painter, 14, 30, "Physics time (ms): %6.3f", m_physicsTime * 1000.0f);
- painter.end();
- }
and this is the Print function
- {
- va_list argptr;
- char string[2048];
- va_start (argptr, fmt);
- vsprintf (string, fmt, argptr);
- va_end( argptr );
- painter.drawText(x, y, tr(string));
- }
This work fine on an Window 7, Linux and Mac
whoever when I test it on a win64 system the statics text is all over the place on the screen.
the funny thing is that If I only call Print once, the Text is printed correct,
Am I doing something incorrect?
edit:
cleanup code to bare mimum tha reproduces the Bug on win64
2 replies
You must log in to post a reply. Not a member yet? Register here!


