Can't compile Cocoa-OpenGL1/OpenGL3.3 because of Glew

Reporter: faissaloo  |  Status: open  |  Last Modified: September 29, 2018, 11:09:51 PM

In file included from Bridges/Cocoa-OpenGL1/graphics_bridge.cpp:18:0:
/usr/local/include/GL/glxew.h:98:10: fatal error: X11/Xlib.h: No such file or directory
 #include <X11/Xlib.h>
          ^~~~~~~~~~~~
compilation terminated.
rm -f /Users/faissaloo/.enigma/.eobjs/MacOSX/MacOSX/GNU_GCC_G++/Run/Universal_System/loading.o /Users/faissaloo/.enigma/.eobjs/MacOSX/MacOSX/GNU_GCC_G++/Run/Universal_System/Extensions/MotionPlanning/motion_planning.o
make[1]: *** No rule to make target `/Users/faissaloo/.enigma/.eobjs/MacOSX/MacOSX/GNU_GCC_G++/Run/SHELLmain.o', needed by `compile_game'.  Stop.
make: *** [Game] Error 2
RobertBColton  
I don't remember all the specifics, but I think ENIGMA's original Mac system, Cocoa in this case, uses X11 or something. I'll ask @JoshDreamland and @RemoveRusky to reply here, because I really don't know much about Mac at all. Second, you should also try the SDL platform in ENIGMA settings, people are saying it works a lot better on Mac right now. That's what TKG and hugar have been using.
faissaloo  

If it's really dependant X11 it may as well be removed or switched to use Quartz since X11 isn't supported by MacOS anymore.
RobertBColton  

It is really dependent on X11 and second, as I understand it, apparently broken quite a bit.

Let me reiterate that the reason we are keeping the original platform systems is for performance reasons. SDL was added simply as an alternative, and also because it saves us work to do Android, which is working in the one pr we have still open. Now, the original systems are more performant arguably because they are at a lower level of abstraction than the SDL system, hence by nature they should be more optimal. Josh actually did a small benchmark to verify this with the Win32 platform at least.

Considering that, fundies open OSX fixes pr (#1294) actually hides the original Cocoa system because it is so badly broken. But simply because it relies on outdated X11 that is no longer supported I don't think is reason enough to delete it just yet, it will still work on older Macs, no? Also, for the record OpenGL is now deprecated on Mac lol, so at some point here I will have to do Vulkan (and these graphics changes recently will help).
https://www.pcgamer.com/developers-fear-for-mac-gaming-as-apple-deprecates-opengl-support/

All of this is a low priority for me now, the transforms were the last engine fixes I wanted to do before focusing completely on the IDE. And since we mostly have the EGM format ready to go now, that's where my energy will be redirected. Anybody is welcome to try fixing up the Cocoa system so that we don't need to hide it, but I am not going to pressure anybody into doing it. SDL should be good for now.

Please sign in to post comments, or you can view this issue on GitHub.