Start learning with our library of video tutorials taught by experts. Get started

Up and Running with OpenGL
Illustration by Don Barnett

Up and Running with OpenGL

with Pablo Colapinto

Video: Welcome

(light chime noises) -Hi, my name is Pablo Colapinto and welcome to "Up and Running with OpenGL." In this course, we'll be learning how to render real time content using the OpenGL API. The world's current standard for cross-platform graphics. I'll begin by showing you how to create a window context for our graphics using the GLFW library. Then, we'll add some geometric primitives in this window using GLs "Legacy Immediate" mode before moving on to modern OpenGL programming.
Expand all | Collapse all
  1. 3m 43s
    1. Welcome
      1m 8s
    2. What you should know before watching this course
      38s
    3. Using the exercise files
      1m 57s
  2. 7m 42s
    1. Setting up OpenGL and CMake in OS X
      3m 5s
    2. Setting up OpenGL and CMake in Windows
      3m 8s
    3. Building an OpenGL project from scratch
      1m 29s
  3. 18m 19s
    1. Understanding OpenGL
      1m 52s
    2. Introduction to OpenGL terminology
      2m 23s
    3. Creating a context and getting version info
      2m 55s
    4. Creating a context and a window
      2m 37s
    5. Creating a context and getting extension info
      4m 5s
    6. Cleaning up the code: Making an app struct
      4m 27s
  4. 5m 3s
    1. Drawing geometric primitives
      3m 34s
    2. Rotating, translating, and scaling
      1m 29s
  5. 19m 56s
    1. Understanding the programmable pipeline
      2m 7s
    2. Introducing shaders and the OpenGL Shading Language (GLSL)
      1m 57s
    3. Compiling shaders
      2m 20s
    4. Generating Vertex Array Objects
      4m 51s
    5. Generating Vertex Buffer Objects
      2m 9s
    6. Adding color attributes
      3m 46s
    7. Detecting errors
      1m 43s
    8. Cleaning up the code: Make a shader struct
      1m 3s
  6. 17m 49s
    1. Understanding the OpenGL coordinate system
      57s
    2. Introducing matrix transformations
      1m 33s
    3. Applying orthographic projection
      3m 32s
    4. Using Model, View, and Projection matrices
      3m 40s
    5. Working with the Model matrix
      4m 51s
    6. Working with the View matrix
      2m 26s
    7. Working with the Projection matrix
      50s
  7. 22m 7s
    1. Using indices of vertex buffers
      3m 20s
    2. Generating dynamic vertex buffer data
      2m 59s
    3. Adding texture coordinates
      4m 35s
    4. Loading image textures
      1m 52s
    5. Adding normals and lighting
      3m 55s
    6. Combining lighting and textures
      2m 23s
    7. Cleaning up the code: Make a texture struct
      3m 3s
  8. 9m 32s
    1. Handling GLFW callbacks
      1m 43s
    2. Adding keyboard input
      3m 55s
    3. Adding mouse input
      3m 54s
  9. 1m 4s
    1. Next steps
      1m 4s

Watch this entire course now —plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Up and Running with OpenGL
1h 45m Intermediate Aug 05, 2014

Viewers: in countries Watching now:

Ready to take your graphics to the next level? Get up and running with OpenGL, the cross-language, multiplatform API for rendering 2D and 3D computer graphics. OpenGL is widely used in CAD, virtual reality, scientific visualization, and video games, where it is particularly useful for game developers who benefit from its hardware-accelerated rendering and advanced programmable pipeline. In this course, Pablo Colapinto will show you how to render real-time content, starting with building a window for your graphics with the GFLW library. Then he'll focus on drawing in 2D and 3D with both the legacy immediate mode and the more modern method of using buffer objects. Plus, learn about texturing and lighting with the GLSL shading language, and accepting keyboard and mouse input for increased interactivity. Start accelerating your graphics with OpenGL today.

Topics include:
  • 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
Subjects:
Developer Games
Software:
OpenGL
Author:
Pablo Colapinto

Welcome

(light chime noises) -Hi, my name is Pablo Colapinto and welcome to "Up and Running with OpenGL." In this course, we'll be learning how to render real time content using the OpenGL API. The world's current standard for cross-platform graphics. I'll begin by showing you how to create a window context for our graphics using the GLFW library. Then, we'll add some geometric primitives in this window using GLs "Legacy Immediate" mode before moving on to modern OpenGL programming.

Next, we'll investigate how to generate 3-D meshes by sending buffers of vertex data to the GPU and how to manipulate our virtual scene using matrix transforms. Finally, we'll explore textures and lighting using the GLSL shading language and add some basic interactivity using our keyboard and mouse. By the end of this course, you'll be up to speed with modern OpenGL and the new advanced, programmable Pipeline. Now, let's get started with "Up and Running with OpenGL."

Find answers to the most frequently asked questions about Up and Running with OpenGL .


Expand all | Collapse all
please wait ...
Q: Why am I getting errors saying I don’t have GLEW installed when I try to create the Xcode projects with Cmake?
A: Newer macs running OS X 10.9 Mavericks or later do not come with GLEW preinstalled. You may have it if you upgraded to Mavericks from a previous version of OS X, but it will not be on a new computer or a clean install of the operating system. As such, you’ll need to install a few things to get GLEW set up.

1) Download, Install, and Run Xcode

First, you’ll need to make sure Xcode is installed and fully loaded. You can download Xcode for free from the Mac App Store. Make sure you open Xcode at least once before proceeding, as it needs to authenticate your administrative privileges before it finishes installing all its components. If you fail to do this, you’ll receive errors in later steps.
 
2) Install Homebrew, to Help Install GLEW and CMake
 
Next, we’re going to install Homebrew, which will allow us to install GLEW and also CMake.
 
To find out if you have Homebrew installed, open the OS X Terminal and type:
 
which brew
 
If brew is installed, Terminal should return “/usr/local/bin/”. If it’s not found, then we’ll need to install it. To install brew, enter this command in terminal:
 
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
 
Homebrew will install, and once it’s completed, you’ll see it prompt you to run brew doctor, which will test for any issues. To run brew doctor, simply type:
 
brew doctor
 
Once it has finished running you’ll see a list of potential warnings. It’s important to note that brew is very cautious, so you’ll likely get at least one or two warnings, but they may not be deal breakers or even cause any problems. Brew is designed to work in a wide variety of applications, most of which we will not be using.
 
3) Install GLEW
 
Now that we have brew setup, we’re going to install GLEW. To install GLEW, type:
 
brew install glew
 
Homebrew may recommend you run brew doctor before installing anything, and you should do so if you haven’t already. See step 2 for more information on brew doctor. At this point you can return to the video if you wish. The rest of the steps are also listed here for reference.
 
4) Install CMake to Build Project Files
 
CMake will allow us to build Xcode projects that work with GLEW. There are two ways to install CMake. To see if you have CMake installed, type:
 
which cmake
 
Terminal should return “/usr/local/bin/cmake/”.
 
If it doesn’t, you can download and unzip the UNIX/Linux source, a tar.gz file (filename cmake-3.0.0.tar.gz as of publish date) from http://www.cmake.org/cmake/resources/software.html.
 
(Note: Do not download the binary distribution, as this makes it more difficult to access CMake from the command line.)
 
First, in Terminal navigate to your CMake folder, which you can do by typing “cd ” and then dragging the folder into Terminal. Next type:
 
./bootstrap && make && make install
 
CMake should install, and you should be ready to go! If this doesn’t work, you can also try using brew, though compiling from source is the preferred method. To use brew, from Terminal type:
 
brew install cmake
 
Brew should install CMake and you’ll be ready for the next step.
 
5) Build Xcode Project Files
 
Finally, once GLEW and CMake has finished installing, we need to build our Xcode project to test. (In the following commands where it says “Exercise Files”, this should be the location of the Exercise Files you downloaded from lynda.com)
 
cd Exercise Files
mkdir xcode
cd xcode
cmake -G "Xcode" ..
 
Once completed, there should be a project available in the “xcode” folder that was created.
 
If you prefer, you can also build individual projects for each C++ file at a time by running a command like this:
 
./run.sh examples/Extensions.cpp
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Up and Running with OpenGL.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.