Math 155A - Introduction to Computer Graphics Winter 2018
Sam Buss,  University of California, San Diego

Project #0 - Learn to login and use Visual C++ with OpenGL, GLFW and GLEW

Goals:  In this assignment, you get oriented to using the APM basement computer labs, make sure your passwords work, learn how to access your files on the lab PCs, learn how to use Visual C++, learn how to create a new C++ program in Visual C++, and learn some simple debugging techniques.  See the "Summary of Work" at the bottom of this document for a list of what you must do.

DUE DATE: Friday, January 12, by 9:00pm.

What to hand in:  When you successfully complete this assignment, you fill out a google docs form as described below, and answer the questions that are included with the assignment.  You may in addition post related questions and answers to the piazza bulletin board.

The google form for your answers is at:

If you have problems and cannot complete the work by the due date, you must promptly contact the professor or the TA to discuss the problems.

Turn in procedures (For Future Assignments Only NOT THIS ASSIGNMENT.)   Grading will be personalized and one-on-one with Professor Buss or one of the TAs.  Your program must run on the PC lab, and compile and run under Visual C++ 2015.   You must come into the PC lab and meet one of us.  You will have to show your source code, run the program, answer questions about the program, and possibly make changes on the spot to your program and recompile as requested by the grader.  You must be able to explain how your program works and why it renders what it does.

If you want to work on your home machine or other machine:  OpenGL will run on many environments, including Linux, Unix and Macintosh.  You may do development on other machines, but you will be responsible for getting your system to work with Visual C++ 2015, plus, you must transfer everything back to the PC lab for grading purposes.  If OpenGL, or GLFW and GLEW, are not installed on your machine, you will need to download the header files and the library .lib files.  See the "Graphics resources on the main course web page for help on where to find these.

Logging in: The PC lab for this course is in APM B325. The rooms APM B337 and B349 (they are the same room!), and B432 are also available.  Academic Computing and Media Services (ACMS) should have already given you the appropriate user account privileges after you are enrolled in the course. The doors are locked in evenings and weekends, but a door code can be found at using the Account Lookup link under Tools.

Logging out: Don't forget to log out when you are done.  Otherwise, you leave your account completely unprotected. 

To keep your files from being automatically deleted store your files in the networked drive on the lab computers (same name as your user-id). You should be able to remotely access your files through the Virtual Lab, see instructions at To be completely sure your files are not erased when you logout, you might wish to save copies of your work to your Google drive or other storage. (A few students had problems with files being lost both last year and the year before!)


1.      Download the PDF file VChelp.html. Follow the instructions in that document. (The full URL for this file is

2.      Write short answers for questions A, B, C, and D.

3.      Fill out the google form at, at, answering the three questions; and letting us know whether you have finished the assignment. If any of your answers are long, please consider emailing Professor Buss with it, or, even better, posting to the course bulletin board.

Congratulations: you have learned how to use Visual C++. Summary of work:  You should have completed the following tasks:

1.      Created a new HelloWorld project.

2.      Learned how to use the interactive debugger, including
a.  How to set a breakpoint,
b.  How to single step through your code,
c.  How to watch the value of variables as you single-step through the code, and
d.  How to step into a function call.

3.      Downloaded, compiled, and run the SimpleDrawModern program, using Modern OpenGL with GLFW and GLEW.

4.      Experimented with different color values.  Seen an example of how the values for Red/Green/Blue (RGB values) affect the color you see on the screen.

5.      Learned how an OpenGL program can receive key strokes as input.

6.      If not using the lab machines, learned how to compile and run C++ with OpenGL code, learned how to transfer code to the lab and get it to work there under Visual C++.

DUE DATE: Friday, January 13, by 9:00pm. Please email the instructor and TA if you are not able to meet the due date.


Instructions from ACMS on file storage:

Students will need to save files on the networked link you saw under Computer. They are not able to SSH or sftp to the stored files. All students now have accounts in the UCSD Google domain and can save their files to the cloud. They can also log into the Virtual Lab from a home device and get to the networked drive through there.


Instructions to use the Virtual Lab are at