opengl.pdf

(12566 KB) Pobierz
renierhS ikciV
legnA dE
renierhS evaD
gnimmargorP LGnepO
ot noitcudortnI evitcaretnI nA
An Interactive Introduction to OpenGL Programming
1
1
An Interactive Introduction to OpenGL Programming
This course provides a general introduction and overview to the OpenGL API
(Application Programming Interface) and its features. OpenGL is a rendering
library available on almost any computer which supports a graphics monitor.
Today, we’ll discuss the basic elements of OpenGL: rendering points, lines,
polygons and images, as well as more advanced features as lighting and texture
mapping.
scipoT LGnepO decnavdA
gnigamI
gnip paM erutxeT
gnithgiL
sedoM gniredneR
sevitimirP gniredneR
noitcudortnI L GnepO lareneG
2
yadoT eeS ll’uoY tahW
2
An Interactive Introduction to OpenGL Programming
Today we hope to demonstrate the capabilities and flexibility of OpenGL such
that you’ll be able to author your own programs which can display 3D objects
with lighting effects, shading, and custom texture maps.
Additionally, we’ll introduce more advanced OpenGL topics for further
personal investigation.
One of OpenGL’s strengths is that its interface is easy to use for the novice, yet
powerful enough to satisfy the requirement of professional applications,
whether they be for flight simulation, animation, computer aided design, or
scientific visualization.
htiw margorp scihparg evitcaretni
na etirw ot LGnepO hguone etartsnomeD
noitagitsevni
erut uf rof scipot decnavda ecudortnI
yregami ro stcejbo D3 deledom motsuc
gnippam erutxet
gnithgil
3
yadoT rof slaoG
3
An Interactive Introduction to OpenGL Programming
weivrevO TULG dna LGnepO
4
4
An Interactive Introduction to OpenGL Programming
In this section, we discuss what the OpenGL API (Application Programming
Interface) is, and some of its capabilities.
As OpenGL is platform independent, we need some way to integrate OpenGL
into each windowing system. Every windowing system where OpenGL is
supported has additional API calls for managing OpenGL windows, colormaps,
and other features. These additional APIs are platform dependent.
For the sake of simplicity, we’ll use an additional freeware library for
simplifying interacting with windowing systems, GLUT. GLUT, the OpenGL
Utility Toolkit is a library to make writing OpenGL programs regardless of
windowing systems much easier. It’ll be the base of all of our examples in the
class.
We conclude the section with a basic program template for an OpenGL
program using GLUT.
etalpmet margorp TULG A
TULG yhW
smetsys gniwodniw ni LGnepO
?em rof od ti nac tahw & LGnepO si tahW
5
weivrevO TULG dna LGnepO
5
Zgłoś jeśli naruszono regulamin