c++ - qt, using freeglut, error with 'glutInit' -
i've been trying utilize freeglut in qt project. unfortunately when utilize glut function 'glutwiresphere' or 'glutwiretorus' error:
freeglut error: function called without first calling 'glutinit'.
and when seek run application quits itself. don't know should phone call 'glutinit'. i've installed freeglut according tutorial:
https://www.youtube.com/watch?v=m4fm-chgoyu&index=1&list=llkybbrydu3gfoojsrqom3jq
i've figured out. quite simple actualy. needed utilize 'glutinit( & argc, argv )' in main.cpp this:
int main(int argc, char *argv[]) { glutinit( & argc, argv ); qapplication a(argc, argv); mainwindow w; w.show(); homecoming a.exec(); }
c++ qt opengl glut freeglut
No comments:
Post a Comment