Closed dorier closed 5 years ago
I managed to have NanoGUI-SDL compile by removing the condition that NANOGUI_LINUX must be defined to use SDL2/SDL_opengl.h in the following:
#ifdef NANOGUI_LINUX
#include <SDL2/SDL_opengl.h>
#include <SDL2/SDL_opengl_glext.h>
#else
#include <SDL/SDL_opengl.h>
#endif
(in opengl.h and in the examples)
I also had to add SDL2
as external library line 102 of the CMakeLists.txt file.
Now I have another issue; when I run either of the example programs, I get the following output:
Available Renderers: opengl metal software Vendor : Intel Inc. Renderer : Intel(R) HD Graphics 6000 Version : 4.1 INTEL-10.32.48 Shader shader/vert error: ERROR: 0:1: '' : #version required and missing. ERROR: 0:13: 'attribute' : syntax error: syntax error
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Could not initialize NanoVG! Abort trap: 6
Making progress: adding -DNANOGUI_GL_IMPLEMENTATION=gl3
in the cmake command makes everything works fine.
Would be worth documenting all of this :-)
library redesinged for sdl2 api, try now
Any chance you could document how to build on Mac OSX? I'm on High Sierra, I have installed SDL and SDL2 with Homebrew (apparently both are needed), but I have errors when building:
I'm guessing those errors are related to OpenGL's installation on OSX?