Join Pablo Colapinto for an in-depth discussion in this video Building an OpenGL project from scratch, part of Up and Running with OpenGL.
I recommend for this course that you use CMake to automate the generation of your project files But, if you're having trouble using CMake, you can build your project from scratch. So, an Xcode for example, you wanna set your headers search paths to search in the exercise files include directory, the exercise files directory, and the exercise files/GLFW/include directory. You also need to make sure that you're linking to the correct libraries. You wanna make sure that you're linking to GLFW itself.
GLFW will need to be built using CMake. so you'll need to CD into the GLFW directory, and build GLFW from there. You'll want to point to wherever GLU is installed on your system. And you'll need to link to the Cocoa OpenGL I/O kit, core foundation, and core video frameworks. If you're on a Windows machine, you need to make sure that you're linked to the GLU library and OpenGL 32.lib in addition to the GLFW library.
Also make sure that your library search paths are set so that they search in the correct directory for those libraries. And making sure that your header search paths are set correctly. And you're linking to all the necessary libraries. And your library search paths are searching in the right directory for those libraries. You should have no trouble building an OpenGL environment from scratch.
- What is OpenGL?
- Setting up an OpenGL workflow
- Creating a window with GLFW
- Working with geometric primitives
- Rotating, translating, and scaling
- Understanding matrix transformations
- Creating mesh data structures
- Buffering mesh data
- Getting mouse and keyboard input
Skill Level Intermediate
Q: Why am I getting errors saying I don’t have GLEW installed when I try to create the Xcode projects with Cmake?
1) Download, Install, and Run Xcode
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install glew
./bootstrap && make && make install
brew install cmake
cd Exercise Filesmkdir xcodecd xcodecmake -G "Xcode" ..