PDA

View Full Version : Problem from OpenGL to QT OpenGL



nuts_fever_007
13th May 2009, 23:33
hey i have this program that i first created in OpenGL using C++ but now i am trying to translate that program in QT Creator but i am having problem...so can please someone check what's wrong with it... i am attaching my source code too...

well i am able to run the program without any errors but there are some parts that need to be modified but this is my first time using QT so i dont knw what to modify so can some please help me with this...thank you

really appreciate

nuts_fever_007
14th May 2009, 02:30
hey actually i figure out the problem but i need help for translating openGL code which have GLUT in it...but i dont knw how to translate the glut to QT...can someone please help

thank you

wysota
14th May 2009, 09:05
If you ask specific questions you will be given specific answers. We're not here to do your job for you but to help you do your job.

JohannesMunk
14th May 2009, 13:29
Your thread lacks some kind of problem description.

You can use glut directly. No need to 'translate' anything.

nuts_fever_007
15th May 2009, 04:53
allrite guys i am sorry for bad description of my problem...but here is what i am saying...



void AntiAliasWidget::run(int value)
{
//If animation is on (not hit F3 yet), then keep adding height
// to make effect of sun raising, if over 4.8, then go down to 2.7
if ((sunDirection == 1) & (animationEnable)) {
_height += 0.01f;
if (_height >= 4.8) sunDirection = -1;
} else if ((sunDirection == -1) & (animationEnable)) {
_height -= 0.01f;
if (_height <= 2.7f) sunDirection = 1;
}
//glutPostRedisplay(); //Update the display
updateGL();
//glutTimerFunc(value, run, 0); //Call it again in 25 ms
}


the source code above have glutTimerFunc function but i dont know how to translate that particular line to QT ... so can someone please tell me how to do it

i hope this will be clear explanation from my part..thank you

wysota
15th May 2009, 09:37
Read about QTimer::singleShot().