Polytonic / Glitter

Dead Simple OpenGL
http://polytonic.github.io/Glitter/
2.48k stars 418 forks source link

CMake Error, Could NOT find OpenGL #22

Closed andreasterrius closed 8 years ago

andreasterrius commented 8 years ago

I am migrating to ubuntu from windows and decided to use Glitter to set up some opengl projects.

I cloned the repo with --recursive. cd Build and cmake ..

CMake Error at /usr/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.2/Modules/FindOpenGL.cmake:168 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  Glitter/Vendor/glfw/CMakeLists.txt:88 (find_package)

Any idea why this error occurs ?

Polytonic commented 8 years ago

Do you have your GPU vendor graphics drivers installed?

Alternately, you might be able to use Mesa, via sudo apt-get install mesa-common-dev, or install fglrx for AMD. I'm not sure what Nvidia is offhand, maybe something cuda related.

andreasterrius commented 8 years ago

I actually doesn’t have my GPU vendor graphics card installed since I only have just recently migrated.

I'll try installing the driver and give you an update on how it goes.

andreasterrius commented 8 years ago

Ok so I managed to complete the build

what i did was:

installed driver
sudo apt-get freeglut3-dev

When I tried cmake again, I run into the a separate problem of

path/Build$ cmake ..
-- Using X11 for window creation
-- Using GLX for context creation
CMake Error at Glitter/Vendor/glfw/CMakeLists.txt:269 (message):
  The RandR library and headers were not found

Which I solved using

sudo apt-get install xorg-dev libglu1-mesa-dev

I tried doing a make on the build folder and running the Glitter executable shows a blank window which should mean that everything is working perfectly now.

Polytonic commented 8 years ago

Great! Yeah I'm sorry I don't have any great advice or instructions on this front. Linux dev is surprisingly messy for OpenGL/OpenCL work.

Anything else I can help you with? Or free to close?

andreasterrius commented 8 years ago

Yep, you can close this issue now

Thanks!