Fork me on GitHub

11/06/2012

[OpenGL] RedBook example environment setup on Mac

This post records how to setup the OpenGL programming guide source example environment on Mac.

  • Install XCode OpenGL and GLUT come with the OS and Xcode installations. To verify, check for
     /System/Library/Frameworks/{OpenGL,GLUT}.framework
    
  • In your OpenGL source files, include the following line

      #include <OpenGL/gl.h>
      #include <OpenGL/glu.h>
      #include <GLUT/glut.h>
    
  • To make a GLUT application on the command line, use the following linker options:

     -framework OpenGL -framework GLUT
    

For Ubuntu, you can refer this: Setting up an OpenGL development environment in Ubuntu Linux

--EOF--

No comments:

Post a Comment