OpenGL - VTC

erectboboSoftware and s/w Development

Dec 14, 2013 (3 years and 10 months ago)

169 views





















Open
-
GL

ELM
-
4701






















Steven Mitchell

12/2/2004


1

Table of Contents

Table of Contents

1

Abstract

2

Concepts

3

Pros & Cons

6

Works Cited

7

References

7


2

Abstract


When you need to create a graphical representation of someth
ing for whatever
reason on a computer you need to use a graphics API. OpenGL is the industry standard
graphics API. OpenGL allows the use of common and complex graphics rendering, in a
fairly simple, cross
-
platform format.
Because OpenGL is created by a

pool of top
graphics and computer companies, it allows the creation of applications that look and act
the same on different operating systems.
One of OpenGL’s biggest advantages is
its

ability to create a graphics application that works on most operating

systems. OpenGL is
also well documented and fairly easy to learn
to program when compared to other
graphics API’s.



3

Concepts


OpenGL is a multipurpose, multiplatform graphics API

(Application Program
Interface)
. Silicon Graphics Inc originally created
it, but
since 1992 OpenGL’s
development has been overseen by the OpenGL Architecture Review Board. This board
is made up from major graphics vendors, and major computer related companies such as
NVIDIA, ATI, Hewlett
-
Packard, Dell, Intel, Matrox, IBM, 3DLa
bs, Evans & Sutherland,
SGI, Sun Microsystems, and Silicon Graphics.

The board determines and maintains
OpenGL’s specifications. The latest version of OpenGL is 2.0 which was just released
recently.


OpenGL is a collection of functions that give access t
o all of the features offered by
graphics hardware. There are hundreds of functions within OpenGL.
Using the OpenGL
API allows you to change various aspects such as current c
olor, blending, lighting, ect.
The core of OpenGL is the rendering pipeline. W
hat appears on the screen is a result of
this pipeline. OpenGL handles most of these steps for you. You can modify the
operations, but the operations at each step are always the same unless you modify them.

Op
enGL allows rendering, texture mapping, spec
ial effects (such as fog), lighting, and
blending.


Figure
1
: The OpenGL pipeline
1




1

“Astle”


4


OpenGL does not support input, windowing or menus

for any operating system
.
In order to get those kinds of functionality y
ou need to use an extended function library

(also known as an extension)
. One of the most important of these
libraries

is GLUT
(OpenGL Utility Toolkit). GLUT provides the input, windowing, and menu functionality
while keeping OpenGL platform independent.

There are also other libraries out there
such as SDL, and G
L
ee. SDL (Simple Direct Media Layer) provides cross
-
platform
support for audio, 2D graphics, and many more functionalities.

GLee (OpenGL Easy
Extension library
) provides functions for W
indows a
nd Linux.



OpenGL programs are created by using C/C++ to program them. Although they
use C/C++, OpenGL has
its

own list of commands that are unique to it.

A sample
program can bee seen below.


Figure
2
: S
ample Program
2



OpenGL is used for a wide variety of graphics applications. Most commonly it is
used for gaming, and computer graphics.

“Any visual computing application requiring maximum performance
-
from
3D animation to CAD to visual simulation
-
can expl
oit high
-
quality, high
-



2

“Astle”


5

performance OpenGL capabilities. These capabilities allow developers in
diverse markets such as broadcasting, CAD/CAM/CAE, entertainment,
medical imaging, and virtual reality to produce and display incredibly
compelling 2D and 3D gr
aphics.”
3




3

“OpenGL

Overview



6

Pros and Cons


One of the biggest advantages of using OpenGL is that
it is the industry standard
for graphics specification. This allows OpenGL to be multiplatform, and vender neutral.
Another advantage is that any changes to OpenGL are overse
en by the ARB to insure
backwards compatibility of older programs, and allows developers enough time to adopt
to any changes made to it. Any OpenGL application is visually consistent when used on
different hardware and operating systems. OpenGL is also o
ne of the easiest API’s to
program, and it is very well documented.



When it comes to programming OpenGL allocations for Windows, using certain
libraries make the application only work on Windows. This eliminates the major
advantage of OpenGL being multi
platform.


Open GL Vs. Direct
-
X



Open GL

Direct
-
X

Vertex Blending

N/A

Yes

Multiple Operating Systems

Yes

No

Extension Mechanism

Yes

Yes

Thorough Specification

Yes

No

Two
-
Sided Lighting

Yes

No

Volume Textures

Yes

No

Hardware Independent Z
-
Buffers

Y
es

No

Accumulation Buffers

Yes

No

Full
-
Screen Antialiasing

Yes

Yes

Motion Blur

Yes

Yes

Depth of Field

Yes

Yes

Stereo Rendering

Yes

No

Point
-
size/Line
-
Width attributes

Yes

No

Picking

Yes

No

Parametric Curves and Surfaces

Yes

No

Cache Geometry

Displ
ay Lists

Vertex Buffers

System Emulation

Hardware Not Present

Let App. Determine

Documentation

Good

Fair

Table
1
: OpenGL Features, and Direct
-
X Features


7

Works Cited:

Astle, Dave, and Hawkins, Kevin.
Beginning OpenGL Game Progra
mming
. Boston,
Thomson Course
Technology, 2004.


“OpenGL Overview.” Article. Nov 29, 2004.
Http://www.opengl.org/about/overview.html


References:

For more information on Open
G
L
:

http://www.opengl.org


For
documentation of OpenGL

specs:

http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf


For more information on
OpenGL extensions:

http://oss.sgi.com/projects/ogl
-
sample/registry/


For more information on GLUT:

http://www.opengl.org/r
esources/libraries/glut.html


For more information on SDL:

http://www.libsdl.org


For more information on Glee:

http://elf
-
stone.com/downloads.php#GLee


For mo
re information on Direct
-
X:

http://www.microsoft.com