Join Pablo Colapinto for an in-depth discussion in this video Using the exercise files, part of Learning OpenGL.
The exercise files folder includes everything you need to set up a working OpenGL environment. The examples folder has all of the .cpp source code that we use in this course. We're going to be using CMake to generate the actual Xcode project files or Visual Studio files if you're on Windows, from these .cpp files. Alternatively, you can also use the run.sh script if you're on a Unix-like system, feeding it the file path to the .cpp file.
So for instance, you could do ./run.sh examples/cube.cpp to compile and run that project. The GLFW folder contains a popular library for generating GL window contexts in a cross-platform manner. The GLM folder contains a popular mathematics library we'll be using for generating matrix transforms. The Include folder contains some encapsulated OpenGL functionality that we'll be going over throughout the course.
The Resources folder contains any assets that we'll be importing into our project, such as this flower bumpmap which we'll be using as a texture. Finally, in the Win folder, I've included the Windows-specific version of the GLU extension wrangler library. I've included GLU here for those of you buidling on Windows since knowing exactly where GLU is can be helpful. The CMake list files will also help CMake find the relevant include-paths, such as the exercise files path itself, the include folder and GLFW's include-path.
With these resources and examples, we have everything we need to get up and running with OpenGL.
- 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" ..