OpenGL GLUT "glutCreateWindow" deprecated?

2.6k Views Asked by At

I am following a openGL tutorial which includes this function called "glutCreateWindow", my compiler (XCode 5 gcc, OSX) says it is deprecated.

What else option would be proper to replace these "glut*" related functions?

glutCreateWindow glutDisplayFunc glutMainLoop

?

1

There are 1 best solutions below

4
user1118321 On BEST ANSWER

As mentioned, those methods are deprecated. The best way to proceed is to create a proper Cocoa app. There are a few ways to create a Cocoa app that works via OpenGL. The simplest is probably to just create an app from the Application template in Xcode, and add a window that contains an NSOpenGLView.