Presentation is loading. Please wait.

Presentation is loading. Please wait.

OpenGL Brian Farrimond Robina Hetherington. What is OpenGL A specification of a set of functions for drawing graphics –Names of functions –What information.

Similar presentations


Presentation on theme: "OpenGL Brian Farrimond Robina Hetherington. What is OpenGL A specification of a set of functions for drawing graphics –Names of functions –What information."— Presentation transcript:

1 OpenGL Brian Farrimond Robina Hetherington

2 What is OpenGL A specification of a set of functions for drawing graphics –Names of functions –What information these use to do their job –Description of what they do Software companies create implementations –We shall use Microsoft.NET implementation

3 What OpenGL does Can create 2D and 3D objects made from lines, curves and polygons Can create a controllable virtual camera to view the objects Can generate realistic images of the objects as viewed through the camera Can enhance realism using lighting, materials, blending and fog etc

4 Making OpenGL easier to use OpenGL only deals in points, lines, curves and polygons Additional libraries are available –GLU library provides more complex shapes e.g. spheres, boxes –GLUT library provides straightforward windowing capability

5 OpenGL function names Begin with gl e.g. glClearColor(); An OpenGL function can have different types of arguments. This is achieved by amending the name e.g. glVertex2i(7, 3); glVertex3f(1.0, 3.0, 7.5); 2 integers 3 floating point numbers

6 Installing the GLUT library GLUT already installed in Room FML 400 You need to install GLUT on your home machine See instructions on page 7.

7 Example OpenGL Programs Cubes Texture Filters Loading and moving through a 3D world Flag waving

8 Brief intro to Computer Graphics Computer monitor –2D array of picture elements –Cathode Ray Tube (CRT) –Liquid Crystal Display (LCD)

9 OpenGL use of hardware Data structure corresponding to the array of pixels in the monitor Stored in main memory or video adapter Scans the frame buffer Activates corresponding pixels on monitor

10 Scanning the display Full screen scan every 10 milliseconds (Refresh rate)

11 First OpenGL Program


Download ppt "OpenGL Brian Farrimond Robina Hetherington. What is OpenGL A specification of a set of functions for drawing graphics –Names of functions –What information."

Similar presentations


Ads by Google