SlideShare une entreprise Scribd logo
1  sur  23
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

Contenu connexe

Similaire à CGV.pptx

Introduction of openGL
Introduction  of openGLIntroduction  of openGL
Introduction of openGLGary Yeh
 
Python and GIS: Improving Your Workflow
Python and GIS: Improving Your WorkflowPython and GIS: Improving Your Workflow
Python and GIS: Improving Your WorkflowJohn Reiser
 
AlgorithmVisualiserProject_TanuJaiswal.pdf
AlgorithmVisualiserProject_TanuJaiswal.pdfAlgorithmVisualiserProject_TanuJaiswal.pdf
AlgorithmVisualiserProject_TanuJaiswal.pdfTanu Jaiswal
 
OpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsOpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsJungsoo Nam
 
Ch-4 Middleware Architectures.pptx
Ch-4 Middleware Architectures.pptxCh-4 Middleware Architectures.pptx
Ch-4 Middleware Architectures.pptxdagilema
 
Computer Vision Bootcamp: First Worshop
Computer Vision Bootcamp: First  WorshopComputer Vision Bootcamp: First  Worshop
Computer Vision Bootcamp: First WorshopMohammedArbi
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading LanguageJungsoo Nam
 
Chapter02 graphics-programming
Chapter02 graphics-programmingChapter02 graphics-programming
Chapter02 graphics-programmingMohammed Romi
 
Session 9 advance_verification_features
Session 9 advance_verification_featuresSession 9 advance_verification_features
Session 9 advance_verification_featuresNirav Desai
 
CAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHCAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHRAJESHS631800
 
Final year embedded projects in bangalore
Final year embedded projects in bangaloreFinal year embedded projects in bangalore
Final year embedded projects in bangaloreAshok Kumar.k
 
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 MANUFACTURINGMohanumar S
 
Graphical Objects and Scene Graphs
Graphical Objects and Scene GraphsGraphical Objects and Scene Graphs
Graphical Objects and Scene GraphsSyed Zaid Irshad
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI PresentationAjeeth Pingle
 

Similaire à 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
 

Dernier

Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 

Dernier (20)

Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 

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