CSCI 4530/6530 Advanced Computer Graphics
Spring 2015

Home
  Contact Information
  Office Hours

Announcements
  LMS (Discussion Forum)

Syllabus
  Prerequisites
  References

Grading
  Assigned Readings

Calendar
  Lecture notes
  Lab materials
  Homework
  Test reviews

Homework
  Collaboration Policy
  Homework Late Policy
  Compilers
    Graphics library notes
    CMake notes
    memory debugging
  Electronic Submission

Final Project
   Spring '15 Projects
   Spring '14 Projects
   Spring '13 Projects
   Spring '12 Projects
   Spring '11 Projects
   Spring '10 Projects
   Spring '09 Projects
   Spring '08 Projects
   Spring '07 Projects

Academic Integrity

OpenGL Installation

You probably already have OpenGL on your machine. However, the operating system may not have set you up with the best version of the graphics driver for your particular hardware. You don't want to be stuck with OpenGL 1.X! We'd like to have at least OpenGL 3.2.

So make sure you have recent graphic card drivers. Download the specific driver for your card from NVidia, ATI, or Intel rather than the default Linux or Microsoft Windows driver.

WARNING: OpenGL features beyond OpenGL 1.1 generally do not work over Remote Desktop.


Graphics Libraries Installation

For the homeworks you'll need to install the following libraries:

Please follow the detailed instructions below for each OS.


GNU/Linux

Fedora

    yum install glew glew-devel glm-devel glfw-devel

Ubuntu 14.04

  • First upgrade CMake to at least version 3.1.1.
    Download cmake-3.1.1-Linux-x86_64.sh
    Run it
    In your .bashrc, add

      export PATH="$PATH:path_to_the_cmake_bin_folder"
    
    Confirm that you have the correct cmake by typing:
      cmake --version
    

  • You'll need to build glfw3 from source. Download the GLFW source code zip (at least 3.1) from:
    http://www.glfw.org/download.html.

    Unzip the archive into some directory. cd to that directory and type these commands:

        mkdir build 
        cd build						      
        cmake .. 
        make 
        sudo make install 
    
  • Everything else is available as a package:

        apt-get install glew-utils libglew-dev libglm-dev
        apt-get install libxrandr-dev xorg-dev
    


Mac OSX - 10.9 (Mavericks) & 10.10 (Yosemite)

  • We recommend the Homebrew package manager. After brew is installed, just type:

        brew install glm
        brew install --universal glew
    

    Note: --universal makes a combined 32-bit & 64-bit library. You may need to uninstall & reinstall to add the flag.

  • You'll need to build glfw3 from source. Download the GLFW source code zip (at least 3.0.4) from:
    http://www.glfw.org/download.html

    Unzip the archive into some directory. cd to that directory and type these commands:

        mkdir build 
        cd build						      
        cmake -DGLFW_BUILD_UNIVERSAL=ON ..
        make
        sudo make install 
    

    Note: The brew install of glfw doesn't seem to work. If you do have both a brew install of glfw & the from source install of glfw3, you might need to poke the CMakeLists.txt file and/or the FindGLFW.cmake file (we provide one with the code in src) to make sure it uses the static libglfw3.a library produced by the from source install. Also, you might need to fix user permissions on that library after the sudo make install.

    Note: the flag -DGLFW_BUILD_UNIVERSAL=ON makes a combined 32-bit & 64-bit library.

    Dr Memory Notes: To use Dr Memory you must build a 32 bit executable (which requires 32 bit libraries). Dr. Memory on Mac is incomplete and may give false positives. Try these options on 10.9 Mavericks:

      dr_memory -light -no_replace_malloc -- ./ifs -i fern.txt
    

Windows

  • Create a new folder on your machine named "C:\GraphicsLibraries\"
    and subfolders named:

    • "C:\GraphicsLibraries\include\"
    • "C:\GraphicsLibraries\include\GL\"
    • "C:\GraphicsLibraries\include\GLFW\"
    • "C:\GraphicsLibraries\lib\"
    • "C:\GraphicsLibraries\bin\"

  • Download and unzip the following files and place them as instructed below.
    NOTE: Make sure you are consistent and grab either all 64-bit or all 32-bit versions of the libraries.

    • Download a recent zip of the GLM headers (a headers only libraries) from http://glm.g-truc.net/ under "Downloads". Extract the compressed file, which makes a glm folder. Inside of that folder is another glm folder. Copy the inner glm folder to "C:\GraphicsLibraries\".

      To check: The file "glm.hpp" should be in this folder "C:\GraphicsLibraries\glm\"

    • Download the GLFW Windows binaries (probably 64-bit) from http://www.glfw.org/download.html and unzip the files.

      Put "glfw3.h" and "glfw3native.h" in "C:\GraphicsLibraries\include\GLFW\"
      Put "glfw3.lib" in "C:\GraphicsLibraries\lib\"

    • Download the GLEW Windows binaries from http://glew.sourceforge.net/ and unzip the files.

      Put "glew.h" and "glxew.h" "wglew.h" into "C:\GraphicsLibraries\include\GL\"
      Put "glew32.lib" and "glew32s.lib" in "C:\GraphicsLibraries\lib\"
      Put "glew32.dll" in "C:\GraphicsLibraries\bin\"

  • Edit the "PATH" variable for your account (not the system variables) to append the location of the dynamic libraries (dll's) "C:\GraphicsLibraries\bin\". (Google search if you don't know how to do this already). You might need to make a new variable if you don't already have a PATH.

  • The CMakeLists.txt line in each homework:

    set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "C:\\GraphicsLibraries")
    

    points your compilation at these directories. You could choose to put all of the downloaded library files in another location, and then specify the new path on the command line when building each project for the first time, e.g.:

    cmake ../src -D CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH} C:\\My\\Path\\Here"