🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OpenGL and GLUT on MacOSX

Started by
3 comments, last by Salvietta 15 years, 9 months ago
I'm developing a plug-in for an existing application using a developer kit specific for this application...I can add command and I'm trying to make this...specially a viewer able to show an image using OpenGL and GLUT... This is the simple code use to initialize and install this viewer: ---------------------------- glutInit (NULL, NULL); glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowSize (800, 600); gViewerWind = glutCreateWindow ("Viewer"); DoViewer_Init (); glutReshapeFunc (DoViewer_Reshape); glutDisplayFunc (DoViewer_Display); glutKeyboardFunc (DoViewer_Key); glutSpecialFunc (DoViewer_Special); glutMouseFunc (DoViewer_Mouse); glutMainLoop (); ---------------------------- I have no way to retrive data for <argc> and <argv> arguments necessary to glutInit so I use NULL for both...Everything seems to be right...I can see this because the main application lose focus after executing the glutMainLoop instruction...but unfortunately I'm not able to see the window created using the glutCreateWindow instruction... In all examples I have found usually the above code is called inside the <main> function so the question is...can I do the same thing from a running application like I'm trying? Thank you for any type of help you can give me
Advertisement
Is anything relevant logged in the console logs when starting the application?
I've checked and I can say nothing relevant logged in the console logs when starting the application. Inside documentation related to application I'm not able to find out something that can help me and inside the Development Kit I'm using there are no methods useful in this sense....

When running your application, the arguments in argv are the command line parameters you used.
For instance: gdb myApp results in argc=2 and argv={"gdb","myApp"}. Usually glut wont need any other params then the first one, so just pass in you application name with argc=1.
Thank you Caste. I've tried as you suggest me: inside the glutInit call I've put 1 parameter and the name of the application...The glutCreateWindow return as result 1 so window seems to be right but...as before calling glutMainLoop simply the main application lose the focus and my window doesn't appear...maybe is not due to the glutInit call...SIGH!!!

This topic is closed to new replies.

Advertisement