Chapter 2 - Rendering Process With OpenGL
Chapter 2 - Rendering Process With OpenGL
Chapter 2
2 Computer - Graphics -
2024
Graphics Software
There are two broad classifications for computer-
graphics software
3 Computer - Graphics -
2024
Cont’d
4 Computer - Graphics -
2024
Coordinate Representations
6 Computer - Graphics -
2024
Cont’d
The scene is then stored in normalized coordinates.
Which range from −1 to 1 or from 0 to 1 Normalized
coordinates are also referred to as normalized device
coordinates.
The coordinate systems for display devices are
generally called device
7 Computer - Graphics -
2024
Cont’d
Example: Figure briefly illustrates the sequence of
coordinate transformations from modeling coordinates
to device coordinates for a display
8 Computer - Graphics -
2024
Graphics Functions
9 Computer - Graphics -
2024
Cont’d
10 Computer - Graphics -
2024
Introduction to OpenGL
12 Computer - Graphics -
2024
Why OpenGL?
Device independence
Platform independence
SGI Irix, MAC, Linux, Windows
Abstractions (GL, GLU, GLUT)
Open source: Hardware-independent software
interface
Support of client-server protocol Other APIs
13 Computer - Graphics -
2024
Features of OpenGL
3D Transformations
Rotations, scaling, translation, perspective
Color models
Values: R, G, B, alpha.
Lightning
Flat shading, Gouraud shading, Phong shading
Rendering
Texture mapping
Modeling
non-uniform rational B-spline (NURB) curves,
surfaces
14 Computer - Graphics -
2024
What is RENDERING
Rendering - is the process by which a computer creates
images from models. These models, or objects, are
constructed from geometric primitives – points (pixels),
lines, and polygons - that are specified by their vertices.
The final rendered image consists of pixels drawn on the
screen; a pixel is the smallest visible element the display
hardware can put on the screen.
Information about the pixels (for instance, what color
they're supposed to be) is organized in memory into
bitplanes.
15 Computer - Graphics -
2024
Cont’d
A bitplane is an area of memory that holds one bit
of information for every pixel on the screen; the bit
might indicate, for example how red a particular
pixel is supposed to be.
The bitplanes are themselves organized into a
framebuffer, which holds all the information that the
graphics display needs to control the color and
intensity of all the pixels on the screen
16 Computer - Graphics -
2024
OpenGl Libraries
Several libraries are built on top of or beside OpenGL to
provide features not available in OpenGL itself. They
include:
The OpenGL Utility Library (GLU)
The OpenGL Utility Toolkit (GLUT)
Simple DirectMedia Layer (SDL)
OpenGL User Interface Library (GLUI)
OpenGL Extension Wrangler Library (GLEW)
OpenGL Easy Extension library (GLEE)
Fast, Light Toolkit" (FLTK)
17 Computer - Graphics -
2024
Preliminaries
18 Computer - Graphics -
2024
Cont’d
19 Computer - Graphics -
2024
Cont’d
20 Computer - Graphics -
2024
Example
21 Computer - Graphics -
2024
Cont’d
22 Computer - Graphics -
2024
OpenGl Utilities Toolkit ( GLUT )
23 Computer - Graphics -
2024
Cont’d
OpenGL: the core library, it is platform (i.e. hardware
system) independent,
glut:
The GL Utilities Toolkit, it contains some extra
routines for drawing 3-D objects and other
primitives. Using glut with OpenGL enables us to
write windows-system independent code.
glu:
The OpenGL Utilities, it contains some extra routines
for projections and rendering complex 3-D objects.
glui: Contains some extra routines for creating user-
interfaces.
24 Computer - Graphics -
2024
Coordinate Systems
In graphics program, we may need to deal with a number
of different coordinate systems, and a good part of the
work ( and the cause of many headaches ) is the
conversion of coordinates from one system to another. list
of some of the coordinate systems you may encounter:
World Coordinate System
Screen Coordinate System
Object Coordinate System
Viewport Coordinate
Viewpoint Coordinate System
System
Model Window Coordinate System
25 Computer - Graphics -
2024
Cont’d
coordinate system.
coordinates relate.
26 Computer - Graphics -
2024
Cont’d
27 Computer - Graphics -
2024
Cont’d
28 Computer - Graphics -
2024
Cont’d
29 Computer - Graphics -
2024
Cont’d
30 Computer - Graphics -
2024
Cont’d
Screen Coordinate System :- This 2D coordinate system
refers to the physical coordinates of the pixels on the
computer screen, based on current screen resolution. ( E.g.
1024x768 )
Viewport Coordinate System - This coordinate system
refers to a subset of the screen space where the model
window is to be displayed.
Typically the viewport will occupy the entire screen window,
or even the entire screen, but it is also possible to set up
multiple smaller viewports within a single screen window.
31 Computer - Graphics -
2024
32 Computer - Graphics -
2024
Cont’d
33 Computer - Graphics -
2024
Viewing Using a Synthetic Camera
graphics.
34 Computer - Graphics -
2024
Other Description
36 Computer - Graphics -
2024
Output Primitives and Attributes
quad.
38 Computer - Graphics -
2024
Cont’d
39 Computer - Graphics -
2024
End of chapter one
40 Computer - Graphics -
2024