From Progzoo
Jump to: navigation, search

Links for tutorial One SET09115

OpenGL is an API to drive graphics cards. The glut library provides a convenient interface to the OpenGL commands. Links for the Week 5 Tutorial

Sadly you cannot compile GLUT programs from ProgZoo at present. However you can copy and paste the examples into your own development environment.


This example shows a green triangle in front of a red square:

Create a project (using visual studio or otherwise) and copy in this code.


Change the code so that the triangle is a Right angled triangle with side length 1.0

  • the triangle colour should be Napier red with glColor3ub(189,41,50)
  • the triangle should be rotated at a jaunty 30° angle.
  • the square behind should be a corporate gray glColor3ub(128,128,128)

[Font] [Default] [Show] [Resize] [History] [Profile]