0% found this document useful (0 votes)
35 views22 pages

Lap1 OpenGL

This document provides an introduction to 3D graphics and OpenGL. It discusses key concepts in 3D graphics like perspective, color, light, shadow, and texture mapping. It then provides an overview of OpenGL, describing it as a 3D graphics rendering API that is hardware independent, operating system independent, and uses C/C++ calls. The document also covers OpenGL libraries, data types, coordinate systems, and function naming conventions.

Uploaded by

Mado Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views22 pages

Lap1 OpenGL

This document provides an introduction to 3D graphics and OpenGL. It discusses key concepts in 3D graphics like perspective, color, light, shadow, and texture mapping. It then provides an overview of OpenGL, describing it as a 3D graphics rendering API that is hardware independent, operating system independent, and uses C/C++ calls. The document also covers OpenGL libraries, data types, coordinate systems, and function naming conventions.

Uploaded by

Mado Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Introduction to 3D

Graphics
How do
you feel
the 3D?
1- Perspective

It refers to the angle between lines


that lend the illusion of 3D.
2- Color
3- Light
4- Shadow
5- Texture Mapping

Texture mapping adds detail without


adding additional geomatry
Library
Graphics

Open
• Initially, Silicon Graphics Inc. Developed system called “Graphics Library,GL”
• A software interface to graphics hardware

• Very fast

• A 3D graphics rendering API (>120 functions)

• Hardware independent

• operating system independent


OPENGL IS NOT A LANGUAGE

Whenever we say that a program is OpenGL-


It is a Graphics based or OpenGL applications, we mean that
Rendering API it is written in some programming language
(such as C/C++) that makes calls to one or
more of OpenGL libraries
OpenGL usages

Games Animations and Videos

Mobile phones

CAD (Computer Aided Design ) virtual reality


OpenGL Support Libraries
OpenGL
Utility
Toolkit

OpenGL
Auxiliary
Library

OpenGL
Utility
Library

OpenGL
OpenGL Libraries

• gl: OpenGL Core library ( rendering , drawing vertices , … )

•glu: OpenGL Utility library ( transforming , rotating


mathematical operations over GPU , … )

•glut: OpenGL Utility Toolkit library ( multiplatform window


system interface )
OpenGL
Coordinates
System
OpenGL
Coordinates
System
OpenGL Data Representation As C
Type Type
GLbyte 8-bit integer signed char
OPENGL GLshort
GLint, GLsizei
16-bit integer
32-bit integer
short
long
DATA GLfloat
GLdouble
32-bit float
64-bit float
float
double

TYPES GLubyte, GLboolean 8-bit unsigned integer unsigned


char
GLushort 16-bit unsigned short unsigned
short
GLunit, GLenum, 32-bit unsigned integer unsigned
GLbitfield long
OPENGL FUNCTION NAMING

OpenGL functions all follow a naming convention that tells you which
library the function is from, and how many and what type of arguments that
the function takes

<Library prefix><Root command><Argument count><Argument type>


OPENGL FUNCTION NAMING

glColor3f(…)
gl library Root command, # of arguments, type of arguments

gl means OpenGL f: the argument is float type


glu means GLU i: the argument is integer type
glut means GLUT v: the argument requires a vector

You might also like