Results 1 to 6 of 6

Thread: Problem from OpenGL to QT OpenGL

  1. #1
    Join Date
    May 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Problem from OpenGL to QT OpenGL

    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
    Attached Files Attached Files
    Last edited by wysota; 14th May 2009 at 01:35. Reason: Threads merged, please don't multipost

  2. #2
    Join Date
    May 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Problem from OpenGL to QT OpenGL

    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

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem from OpenGL to QT OpenGL

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem from OpenGL to QT OpenGL

    Your thread lacks some kind of problem description.

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

  5. #5
    Join Date
    May 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Problem from OpenGL to QT OpenGL

    allrite guys i am sorry for bad description of my problem...but here is what i am saying...

    Qt Code:
    1. void AntiAliasWidget::run(int value)
    2. {
    3. //If animation is on (not hit F3 yet), then keep adding height
    4. // to make effect of sun raising, if over 4.8, then go down to 2.7
    5. if ((sunDirection == 1) & (animationEnable)) {
    6. _height += 0.01f;
    7. if (_height >= 4.8) sunDirection = -1;
    8. } else if ((sunDirection == -1) & (animationEnable)) {
    9. _height -= 0.01f;
    10. if (_height <= 2.7f) sunDirection = 1;
    11. }
    12. //glutPostRedisplay(); //Update the display
    13. updateGL();
    14. //glutTimerFunc(value, run, 0); //Call it again in 25 ms
    15. }
    To copy to clipboard, switch view to plain text mode 

    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
    Last edited by nuts_fever_007; 15th May 2009 at 06:06.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem from OpenGL to QT OpenGL

    Read about QTimer::singleShot().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. OpenGL problem on msvc2008 in release
    By redoctober0 in forum Qt Programming
    Replies: 3
    Last Post: 6th February 2009, 17:59
  2. Qt Embedded + OpenGL problem
    By EeroS in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 7th October 2008, 14:32
  3. problem in rendering opengl on QGraphicsView
    By Sandip in forum Qt Programming
    Replies: 17
    Last Post: 15th April 2008, 08:27
  4. Problem when mixing openGL and QPainter
    By sanjayshelke in forum Qt Programming
    Replies: 9
    Last Post: 21st March 2008, 12:49
  5. problem with opengl, zooming, drawpixels, and origin
    By ntp in forum General Programming
    Replies: 0
    Last Post: 22nd February 2008, 21:48

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.