Hi
I need EGL for a project on linux and tried to compile cinder with es3 support.
After adding the if ! defined
around the debug parameters in RendererGlLinuxGlfw.cpp
as seen below - I was able to compile Cinder with the following cmake .. -DCINDER_TARGET_GL=es3
#if ! defined( CINDER_GL_ES )
platformData->mDebug = mRenderer->getOptions().getDebug();
platformData->mDebugLogSeverity = mRenderer->getOptions().getDebugLogSeverity();
platformData->mDebugBreakSeverity = mRenderer->getOptions().getDebugBreakSeverity();
platformData->mObjectTracking = mRenderer->getOptions().getObjectTracking();
#endif
But when I try to compile the BasicApp example with cmake .. -DCINDER_TARGET_GL=es3
- I get the following errors about GLX not being defined:
/usr/bin/cmake -E cmake_link_script CMakeFiles/BasicApp.dir/link.txt --verbose=1
/usr/bin/c++ -g CMakeFiles/BasicApp.dir/home/debian/Cinder/samples/BasicApp/src/BasicApp.cpp.o -o Debug/BasicApp/BasicApp -L/usr/lib/gcc/x86_64-linux-gnu/6 -rdynamic /home/debian/Cinder/lib/linux/x86_64/es3/Debug/libcinder.a -lX11 -lXext -lXcursor -lXinerama -lXrandr -lXi -lEGL -lGLESv2 -lz -lcurl -lfontconfig -lpulse -lmpg123 -lsndfile -lgobject-2.0 -lglib-2.0 -lgstreamer-1.0 -lgstbase-1.0 -lgstapp-1.0 -lgstvideo-1.0 -lgstgl-1.0 /home/debian/Cinder/lib/linux/x86_64//libboost_system.a /home/debian/Cinder/lib/linux/x86_64//libboost_filesystem.a -ldl -lpthread
/home/debian/Cinder/lib/linux/x86_64/es3/Debug/libcinder.a(x11_init.c.o): In function `_glfwPlatformTerminate':
/home/debian/Cinder/src/glfw/src/x11_init.c:808: undefined reference to `_glfwTerminateGLX'
/home/debian/Cinder/lib/linux/x86_64/es3/Debug/libcinder.a(x11_window.c.o): In function `_glfwPlatformCreateWindow':
/home/debian/Cinder/src/glfw/src/x11_window.c:1555: undefined reference to `_glfwInitGLX'
/home/debian/Cinder/src/glfw/src/x11_window.c:1557: undefined reference to `_glfwChooseVisualGLX'
/home/debian/Cinder/src/glfw/src/x11_window.c:1576: undefined reference to `_glfwCreateContextGLX'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
CMakeFiles/BasicApp.dir/build.make:115: recipe for target 'Debug/BasicApp/BasicApp' failed
make[2]: *** [Debug/BasicApp/BasicApp] Error 1
make[2]: Leaving directory '/home/debian/Cinder/samples/BasicApp/proj/cmake/build'
CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/BasicApp.dir/all' failed
make[1]: *** [CMakeFiles/BasicApp.dir/all] Error 2
make[1]: Leaving directory '/home/debian/Cinder/samples/BasicApp/proj/cmake/build'
Makefile:86: recipe for target 'all' failed
make: *** [all] Error 2
I did however manage to get a clean GLFW example running with a EGL window.
Any pointers are welcome.