WPI Computer Science Department

Computer Science Department
------------------------------------------

CS 543, Spring Semester 2017 Homework 0


Homework 0: Not to be submitted (in class discussion next week)

This project guides you through steps to run OpenGL/GLUT in the CS/IMGD zoolab. OpenGL/GLUT will only run on computers with the right hardware (graphics card) and software. The WPI CS/IMGD Zoolab has PCs with adequate hardware for this class. We will use the zoolab for this class. To do Homework 0, you have to physically go to the CS/IMGD zoolab and follow the steps below.

Homework 0: (Mandatory Part A: Using OpenGL/GLUT in the CS/IMGD Zoolab)

Step 1: Finding out what version of OpenGL your zoolab machine's graphics card supports: The very first thing you need to do is determine if your graphics card can support GPU programming. Specifically, you are looking to see if your graphic card supports OpenGL version 4.3 or later. To determine your card's capabilities for you, try the Glinfo application located here: (GLinfo2.exe). This application will tell you what OpenGL version your card supports and a list of extensions your card supports. Run the GLinfo2 application, make sure you have OpenGL 4.3 or higher.

Step 2: Running a working Shader application : Next, try downloading the following full blown application that uses shaders and playing with it. The rendering application to test your machine's shader abilities is located here GLSLDemo.zip. GLSLDemo is a Win32-only application. Unzip the application to a computer with a programmable GPU. The executable file is located in the "bin" directory of the demo application. Double-click on the executable to open the application. Try playing with it by changing the shape rendered, the textures used and other rendering modes. If GLSLDemo runs okay, you are done with this test!

Step 3: Compiling Shader application using Visual Studio: Download and unzip the following zip file [ Here ] . This zip archive contains a working OpenGL program. All you have to do in this test is to compile this working program and run it. Visual Studio 2015 is already installed on the Zoolab machines. Open the folder Graphics_Starting_Code\ and double-click on the Visual Studio file GLSLExperiment_files.sln to open it. Hit Ctrl-F5 to compile and run the program. It should display a red triangle on a white background on the screen. If the shape is drawn, you are done with this test! You are now able to compile OpenGL and shader programs.

If you haven't used Visual studio before you *MAY* get the following fixable warnings/errors. The warnings/errors and their solutions are posted below.


1. To fix warning:
LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification

Open the Project Properties. Click General in the C/C++ tab.
There is an option that says 'Debug Information Format', which you should
change to Program Database (/Zi). You shouldn't get the warning anymore.



2. To fix the error

LINK : fatal error LNK1207: incompatible PDB format in
'C:\Users\Admir\Documents\Visual Studio
2010\Projects\nr.fjaleve.while\Debug\nr.fjaleve.while.pdb'; delete and
rebuild.

Just go to the menu "Clean solution", then "Rebuild solution"



Homework 0 (Optional Part B)

This part is optional. You only have to do it if you have want to install/use OpenGL on your home machine. Please note that I will now give some help in setting up your home machine to run GLUT and GLEW. Since there are so many different machines on the market, I cannot provide help for all machines. You can use the Zoolab for all projects. However, if you want to set up your home machine for convenience, the following instructions will help. But it will be your responsibility to get things to work on your home machine and I will not answer questions regarding your home machine. You should also note that even if you develop your project solutions on your home machine, you will be required to make your project run on the zoolab machines before submission. If you want the easiest path, you can just go to the zoolab, work on your projects there and submit there.

Before installing GLUT/GLEW, perform steps 1 and 2 above (check your graphics card and run the GLSLDemo). If successful on both steps 1 and 2, you may now install Visual Studio 2015 and GLUT/GLEW.

Step 3: Install Visual Studio 2015 and GLUT/GLEW: If you don't have Visual Studio 2015 installed, install it first. It's free. The following instructions guide you through how to install Visual Studio:

[ How to install Visual Studio 2015 ]

After installing Visual Studio 2015, you can now install GLUT/GLEW. There are two ways to install GLUT/GLEW:
  1. You can install GLUT/GLEW in Visual-Studios and Windows sub-directories. This is a "permanent" type of installation. To use this approach, you need to have administrator privileges on the target machine.
  2. You can install GLUT/GLEW folders as sub-directories of Visual Studio folders that you create. This is a temporary solution that we will use and is described in the following document:

    [GLEW/GLUT installation instructions ]
Step 4: Test your GLUT/GLEW installation After you install GLUT/GLEW, you should test this installation by performing step 3 of part A above (Compile the sample program using Visual Studio). If the program compiles, you are ready to run OpenGL/GLUT/GLEW programs on your home machine.


[Feedback] [Search Our Web] [Help & Index]

[Return to the WPI Homepage] [Return to CS Homepage]

mailto:emmanuel@cs.wpi.edu