JulNadeauCA / libagar

Cross-Platform GUI Toolkit (stable)
https://libagar.org/
BSD 2-Clause "Simplified" License
377 stars 41 forks source link

Updating Instructions for how to install on Cocoa /macOS #45

Closed mucholove closed 1 year ago

mucholove commented 4 years ago

Hi! Just tried to configure / install LibAgar. Excited to use it but I'm getting a few errors on my Mac running Mojave 10.14.6.

The first was 1 error. This header wasn't found.

#include <GL/glu.h>

Fair enough. Fixed it using the technique here: https://stackoverflow.com/questions/3907818/opengl-headers-for-os-x-linux

#if defined(_AGAR_SG_INTERNAL) || defined(_USE_SG_GL)
#ifdef __APPLE__
#include <OpenGL/glu.h>
#else
# include <GL/glu.h>
#endif
#endif

But now I get these errors related to the OpenGL deprecation.

vg_view.c:790:3: warning: 'glBegin' is deprecated: first deprecated in macOS
      10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence
      these warnings) [-Wdeprecated-declarations]

Not sure what OpenGL to install or how to reference the install. Will update if I figure it out. :)

gaetandezeiraud commented 4 years ago

OpenGL 2.0 is separated to the OpenGL 3.0+ implementation. And OpenGL 3.0+ is now deprecated (In profit of Metal).

If you adding this before #include <OpenGL/glu.h>:

#define GL_SILENCE_DEPRECATION
#include <OpenGL/gl.h>

Maybe?

JulNadeauCA commented 1 year ago

Fix will be included in Agar 1.7.0. Thanks!