matus-chochlik / oglplu2

Wrapper for OpenGL, OpenAL and EGL including utilities for writing distributed applications with graphics and/or audio rendering.
Boost Software License 1.0
89 stars 11 forks source link

Changes to OS X + Clang build #6

Closed deranen closed 8 years ago

deranen commented 8 years ago

Regarding my previous PR (#5):

I'm not sure how to detect OS X version, but I think it's quite safe to just check APPLE since according to the warning it has been deprecated since OS X 10.9 Mavericks. I kind of doubt very many people use anything older than that, especially since upgrading to newer versions is either free or very cheap. But I agree with you, if it's easy to detect the version, then why not make it more narrow.

Here is the error message:

/Users/deranen/Programming/oglplu2/example/oglplus/example/main_glut.cpp:67:3: error: 'glutDisplayFunc' is deprecated: first deprecated in OS X 10.9 [-Werror,-Wdeprecated-declarations] glutDisplayFunc(&display_func); ^ /System/Library/Frameworks/GLUT.framework/Headers/glut.h:505:22: note: 'glutDisplayFunc' has been explicitly marked deprecated here extern void APIENTRY glutDisplayFunc(void (*func)(void)) OPENGL_DEPRECATED(10_0, 10_9);

It is not possible to get rid of the deprecated warning by wrapping the pragmas around the include statements, it needs to be around the code which uses the functions. It seems like every single glut function is deprecated, so I wrapped the whole file.

The noreturn warning could probably be fixed instead of suppressing it, but I'll leave that to you if you want to do it.

If you want me to make any changes before merging then just tell me.

matus-chochlik commented 8 years ago

Thanks, merged! Where exactly do you get the noreturn warnings? Clang doesn't complain on Linux.

deranen commented 8 years ago

@matus-chochlik I get the warning for the quit() function in main_glut.cpp.

matus-chochlik commented 8 years ago

Should be fixed on develop now.