SlideShare a Scribd company logo
25-03-2021
Before we can display anything, we should address the issues like:
1. In what colors are we drawing?
2. Where on the display does our image appear?
3. How large will the image be?
4. How do we create an area of the display—a window—for our
image?
5. How much of our infinite drawing surface will appear on the
display?
6. How long will the image remain on the display?
Points in 3 dimensions by adding z coordinate
THE OPENGL APPLICATION PROGRAMMING INTERFACE
• A graphics system performs multiple tasks to produce output and handle user
input
• An API for interfacing with this system can contain hundreds of individual
functions
• It will be helpful to divide these functions into seven major groups:
1. Primitive functions
2. Attribute functions
3. Viewing functions
4. Transformation functions
5. Input functions
6. Control functions
7. Query functions
Primitives and Attributes
• The primitive functions define the low-level objects or atomic entities that our system
can display
• Depending on the API, the primitives can include points, line segments, polygons,
pixels, text, and various types of curves and surfaces
• OpenGL supports a very limited set of primitives directly, only points, line segments,
and triangles
• If primitives are the what of an API—the primitive objects that can be displayed—
then attributes are the how
• Attribute functions allow us to perform operations ranging from choosing the color
with which we display a line segment, to picking a pattern with which to fill the inside
of a polygon, to selecting a typeface for the titles on a graph
•Our synthetic camera must be described if we are to create an image
•Must describe the camera’s position and orientation in our world and
must select the equivalent of a lens
•This process will not only fix the view but also allow us to clip out
objects that are too close or too far away
•The viewing functions allow us to specify various views, although APIs
differ in the degree of flexibility they provide in choosing a view
•OpenGL does not provide any viewing functions but relies on the use
of transformations in the shaders to provide the desired view
• A good API provides the user with a set of transformation functions that allows her to
carry out transformations of objects, such as rotation, translation, and scaling
• For interactive applications, an API must provide a set of input functions to allow us to
deal with the diverse forms of input that characterize modern graphics systems. We
need functions to deal with devices such as keyboards, mice, and data tablets
• In any real application, we also have to worry about handling the complexities of
working in a multiprocessing, multiwindow environment—usually an environment
where we are connected to a network and there are other users
• The control functions enable us to communicate with the window system, to initialize
our programs, and to deal with any errors that take place during the execution of our
programs
• To write device-independent programs, the API has to take care of differences between
devices
such as how many colors are supported
or the size of the display
A good API provides this information through a set of query functions
The OpenGL Interface
• OpenGL functions are in a single library named GL (or OpenGL in Windows)
• Function names begin with the letters gl
• Shaders are written in the OpenGL Shading Language (GLSL), which has a separate
specification from OpenGL
• To interface with the window system and to get input from external devices into our
programs, we need at least one more library
• For each major window system there is a system-specific library that provides the “glue”
between the window system and OpenGL
• For the X Window System, this library is called GLX, for Windows, it is wgl, and for the
Macintosh, it is agl
• Rather than using a different library for each system, we use two readily available libraries,
the OpenGL Extension Wrangler (GLEW) and the OpenGL Utility Toolkit (GLUT)
Mapping from vertex coordinates to screen coordinates
PRIMITIVES AND ATTRIBUTES
• Geometric primitives
• Image, or raster, primitives
• Geometric primitives are specified in the problem domain and include points, line segments,
polygons, curves, and surfaces
To display points or line segments
Text
• There are two forms of text: stroke and raster
Stroke text: Constructed as other geometric objects
• We use vertices to specify line segments or curves that outline each character
Raster text is simple and fast
• Characters are defined as rectangles of bits called bit blocks
• Each block defines a single character by the pattern of 0 and 1 bits in the block
• A raster character can be placed in the frame buffer rapidly by a bit-block-
transfer (bitblt) operation, which moves the block of bits using a single function
call
• You can increase the size of raster characters by replicating, or duplicating, pixels
Attributes
Color
Two different approaches
• RGB-color model: Has become the norm
• IndexedColor Model: Easier to support in hardware because of its lower memory
requirements and the limited colors available on displays
VIEWING
• The simplest and OpenGL’s default view is the orthographic projection
Polygons and Recursion
CGV.pptx

More Related Content

Similar to CGV.pptx

2D graphics
2D graphics2D graphics
2D graphics
Muhammad Rashid
 
18csl67 vtu lab manual
18csl67 vtu lab manual18csl67 vtu lab manual
18csl67 vtu lab manual
NatsuDragoneel5
 
Introduction of openGL
Introduction  of openGLIntroduction  of openGL
Introduction of openGL
Gary Yeh
 
Python and GIS: Improving Your Workflow
Python and GIS: Improving Your WorkflowPython and GIS: Improving Your Workflow
Python and GIS: Improving Your Workflow
John Reiser
 
AlgorithmVisualiserProject_TanuJaiswal.pdf
AlgorithmVisualiserProject_TanuJaiswal.pdfAlgorithmVisualiserProject_TanuJaiswal.pdf
AlgorithmVisualiserProject_TanuJaiswal.pdf
Tanu Jaiswal
 
OpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsOpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIs
Jungsoo Nam
 
Ch-4 Middleware Architectures.pptx
Ch-4 Middleware Architectures.pptxCh-4 Middleware Architectures.pptx
Ch-4 Middleware Architectures.pptx
dagilema
 
Computer Vision Bootcamp: First Worshop
Computer Vision Bootcamp: First  WorshopComputer Vision Bootcamp: First  Worshop
Computer Vision Bootcamp: First Worshop
MohammedArbi
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
Jungsoo Nam
 
Chapter02 graphics-programming
Chapter02 graphics-programmingChapter02 graphics-programming
Chapter02 graphics-programming
Mohammed Romi
 
Session 9 advance_verification_features
Session 9 advance_verification_featuresSession 9 advance_verification_features
Session 9 advance_verification_features
Nirav Desai
 
Programming with OpenGL
Programming with OpenGLProgramming with OpenGL
Programming with OpenGL
Syed Zaid Irshad
 
CAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHCAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECH
RAJESHS631800
 
Final year embedded projects in bangalore
Final year embedded projects in bangaloreFinal year embedded projects in bangalore
Final year embedded projects in bangalore
Ashok Kumar.k
 
CAD
CADCAD
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURINGUnit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
Mohanumar S
 
C- language Lecture 4
C- language Lecture 4C- language Lecture 4
C- language Lecture 4
Hatem Abd El-Salam
 
Graphical Objects and Scene Graphs
Graphical Objects and Scene GraphsGraphical Objects and Scene Graphs
Graphical Objects and Scene Graphs
Syed Zaid Irshad
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI Presentation
Ajeeth Pingle
 
Open gl basics
Open gl basicsOpen gl basics
Open gl basics
saad siddiqui
 

Similar to CGV.pptx (20)

2D graphics
2D graphics2D graphics
2D graphics
 
18csl67 vtu lab manual
18csl67 vtu lab manual18csl67 vtu lab manual
18csl67 vtu lab manual
 
Introduction of openGL
Introduction  of openGLIntroduction  of openGL
Introduction of openGL
 
Python and GIS: Improving Your Workflow
Python and GIS: Improving Your WorkflowPython and GIS: Improving Your Workflow
Python and GIS: Improving Your Workflow
 
AlgorithmVisualiserProject_TanuJaiswal.pdf
AlgorithmVisualiserProject_TanuJaiswal.pdfAlgorithmVisualiserProject_TanuJaiswal.pdf
AlgorithmVisualiserProject_TanuJaiswal.pdf
 
OpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsOpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIs
 
Ch-4 Middleware Architectures.pptx
Ch-4 Middleware Architectures.pptxCh-4 Middleware Architectures.pptx
Ch-4 Middleware Architectures.pptx
 
Computer Vision Bootcamp: First Worshop
Computer Vision Bootcamp: First  WorshopComputer Vision Bootcamp: First  Worshop
Computer Vision Bootcamp: First Worshop
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
 
Chapter02 graphics-programming
Chapter02 graphics-programmingChapter02 graphics-programming
Chapter02 graphics-programming
 
Session 9 advance_verification_features
Session 9 advance_verification_featuresSession 9 advance_verification_features
Session 9 advance_verification_features
 
Programming with OpenGL
Programming with OpenGLProgramming with OpenGL
Programming with OpenGL
 
CAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHCAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECH
 
Final year embedded projects in bangalore
Final year embedded projects in bangaloreFinal year embedded projects in bangalore
Final year embedded projects in bangalore
 
CAD
CADCAD
CAD
 
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURINGUnit 3-ME8691 & COMPUTER AIDED DESIGN AND    MANUFACTURING
Unit 3-ME8691 & COMPUTER AIDED DESIGN AND MANUFACTURING
 
C- language Lecture 4
C- language Lecture 4C- language Lecture 4
C- language Lecture 4
 
Graphical Objects and Scene Graphs
Graphical Objects and Scene GraphsGraphical Objects and Scene Graphs
Graphical Objects and Scene Graphs
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI Presentation
 
Open gl basics
Open gl basicsOpen gl basics
Open gl basics
 

Recently uploaded

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
Addu25809
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 

Recently uploaded (20)

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 

CGV.pptx

  • 2. Before we can display anything, we should address the issues like: 1. In what colors are we drawing? 2. Where on the display does our image appear? 3. How large will the image be? 4. How do we create an area of the display—a window—for our image? 5. How much of our infinite drawing surface will appear on the display? 6. How long will the image remain on the display?
  • 3.
  • 4.
  • 5. Points in 3 dimensions by adding z coordinate
  • 6. THE OPENGL APPLICATION PROGRAMMING INTERFACE
  • 7. • A graphics system performs multiple tasks to produce output and handle user input • An API for interfacing with this system can contain hundreds of individual functions • It will be helpful to divide these functions into seven major groups: 1. Primitive functions 2. Attribute functions 3. Viewing functions 4. Transformation functions 5. Input functions 6. Control functions 7. Query functions
  • 8. Primitives and Attributes • The primitive functions define the low-level objects or atomic entities that our system can display • Depending on the API, the primitives can include points, line segments, polygons, pixels, text, and various types of curves and surfaces • OpenGL supports a very limited set of primitives directly, only points, line segments, and triangles • If primitives are the what of an API—the primitive objects that can be displayed— then attributes are the how • Attribute functions allow us to perform operations ranging from choosing the color with which we display a line segment, to picking a pattern with which to fill the inside of a polygon, to selecting a typeface for the titles on a graph
  • 9. •Our synthetic camera must be described if we are to create an image •Must describe the camera’s position and orientation in our world and must select the equivalent of a lens •This process will not only fix the view but also allow us to clip out objects that are too close or too far away •The viewing functions allow us to specify various views, although APIs differ in the degree of flexibility they provide in choosing a view •OpenGL does not provide any viewing functions but relies on the use of transformations in the shaders to provide the desired view
  • 10. • A good API provides the user with a set of transformation functions that allows her to carry out transformations of objects, such as rotation, translation, and scaling • For interactive applications, an API must provide a set of input functions to allow us to deal with the diverse forms of input that characterize modern graphics systems. We need functions to deal with devices such as keyboards, mice, and data tablets • In any real application, we also have to worry about handling the complexities of working in a multiprocessing, multiwindow environment—usually an environment where we are connected to a network and there are other users • The control functions enable us to communicate with the window system, to initialize our programs, and to deal with any errors that take place during the execution of our programs • To write device-independent programs, the API has to take care of differences between devices such as how many colors are supported or the size of the display A good API provides this information through a set of query functions
  • 12. • OpenGL functions are in a single library named GL (or OpenGL in Windows) • Function names begin with the letters gl • Shaders are written in the OpenGL Shading Language (GLSL), which has a separate specification from OpenGL • To interface with the window system and to get input from external devices into our programs, we need at least one more library • For each major window system there is a system-specific library that provides the “glue” between the window system and OpenGL • For the X Window System, this library is called GLX, for Windows, it is wgl, and for the Macintosh, it is agl • Rather than using a different library for each system, we use two readily available libraries, the OpenGL Extension Wrangler (GLEW) and the OpenGL Utility Toolkit (GLUT)
  • 13. Mapping from vertex coordinates to screen coordinates
  • 14. PRIMITIVES AND ATTRIBUTES • Geometric primitives • Image, or raster, primitives • Geometric primitives are specified in the problem domain and include points, line segments, polygons, curves, and surfaces
  • 15. To display points or line segments
  • 16.
  • 17. Text • There are two forms of text: stroke and raster Stroke text: Constructed as other geometric objects • We use vertices to specify line segments or curves that outline each character Raster text is simple and fast • Characters are defined as rectangles of bits called bit blocks • Each block defines a single character by the pattern of 0 and 1 bits in the block • A raster character can be placed in the frame buffer rapidly by a bit-block- transfer (bitblt) operation, which moves the block of bits using a single function call • You can increase the size of raster characters by replicating, or duplicating, pixels
  • 19. Color
  • 20. Two different approaches • RGB-color model: Has become the norm • IndexedColor Model: Easier to support in hardware because of its lower memory requirements and the limited colors available on displays
  • 21. VIEWING • The simplest and OpenGL’s default view is the orthographic projection