Objectives

 

Exercise1 consists in the following:

 

 - Update your graphics drivers to their latest versions.

 

Download the libraries: Glew (last version: 2.1.0) and FreeGlut (3.0.0 is the last version) for your system and install them.

Read these instructions to install and setup freeglut and glew libraries in Microsoft Visual Studio.

 

- Create a project to compile, link and run your code based on the example provided in this section in your favorite programming environment

 

 - Verify what OpenGL contexts your computer can support, focusing on OpenGL 2.1, OpenGL 3.2, OpenGL 3.3.

 

- Change the program so display is called at 60 FPS.

 

-  Add functionality to your code in order to read shader code from external files;

 

- Check shader compilation and linkage for error messages.

 

- Draw a cube by using the information provided in file cube.h. Try to understand why the number of vertices are 24 instead of 8.

 

- Modify the function createBufferObjects(), by using both OGL functions: glBufferData() and glBufferSubData()

 

- Set up a perspective projection in the reshape() function and make it to support correctly the resizing of the window by the user

 

Note: Besides the 2 books of the main bibliography of this course, we strongly suggest the consultation of the following tutorial in http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/

 

The code in the template is incomplete and comes with no warranties, use it at your own risk

Attachments