SlideShare a Scribd company logo
1 of 13
Download to read offline
CSC 307 1.0
Graphics Programming
Budditha Hettige
Department of Statistics and Computer Science
Graphics Programming
Drawing Fonts
2Budditha Hettige
3
Imaging and Raster Primitives
• Describe OpenGL’s raster primitives:
bitmaps and image rectangles
• Demonstrate how to get OpenGL to read
and render pixel rectangles
Budditha Hettige
4
Pixel-based primitives
• Bitmaps
– 2D array of bit masks for pixels
• update pixel color based on current color
• Images
– 2D array of pixel color information
• complete color information for each pixel
• OpenGL doesn’t understand image
formats
Budditha Hettige
Frame
Buffer
Rasterization
(including
Pixel Zoom)
Per Fragment
Operations
TextureMe
mory
Pixel-Transfer
Operations
(and Pixel Map)
CPU
Pixel
Storage
Modes
glReadPixels(), glCopyPixels()
glBitmap(), glDrawPixels()
glCopyTex*Image();
Pixel Pipeline
• Programmable pixel storage
and transfer operations
CPUCPU DLDL
Poly.Poly.
Per
Vertex
Per
Vertex
RasterRaster FragFrag FBFB
PixelPixel
TextureTexture
Budditha Hettige 5
6
Positioning Image Primitives
• glRasterPos3f( x, y, z )
– raster position transformed like geometry
– discarded if raster position
is outside of viewport
• may need to fine tune
viewport for desired
results
Raster Position
Budditha Hettige
7
Rendering Bitmaps
• glBitmap( width, height, xorig, yorig,
xmove, ymove, bitmap )
– render bitmap in current color
at
– advance raster position by
after
rendering
    yorigyxorigx 
 ymovexmove
width
xorig
yorig
xmove
Budditha Hettige
8
Rendering Fonts using Bitmaps
• OpenGL uses bitmaps for font rendering
– each character is stored in a display list
containing a bitmap
– window system specific routines to access
system fonts
• glXUseXFont()
• wglUseFontBitmaps()
Budditha Hettige
9
Rendering Images
• glDrawPixels( width, height, format,
type, pixels )
– render pixels with lower left of
image at current raster position
– numerous formats and data types
for specifying storage in memory
• best performance by using format and type that
matches hardware
Budditha Hettige
10
Reading Pixels
• glReadPixels( x, y, width, height,
format, type, pixels )
– read pixels from specified (x,y) position in
framebuffer
– pixels automatically converted from
framebuffer format into requested format and
type
• Framebuffer pixel copy
• glCopyPixels( x, y, width, height, type )
Budditha Hettige
11
Raster
Position
glPixelZoom(1.0, -1.0);
Pixel Zoom
• glPixelZoom( x, y )
– expand, shrink or reflect pixels
around current raster position
– fractional zoom supported
Budditha Hettige
12
Storage and Transfer Modes
• Storage modes control accessing memory
– byte alignment in host memory
– extracting a subimage
• Transfer modes allow modify pixel values
– scale and bias pixel component values
– replace colors using pixel maps
Budditha Hettige
Fonts Example
13Budditha Hettige

More Related Content

What's hot

Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Moe Moe Myint
 
Histogram Operation in Image Processing
Histogram Operation in Image ProcessingHistogram Operation in Image Processing
Histogram Operation in Image ProcessingVARUN KUMAR
 
Anatomy of a Texture Fetch
Anatomy of a Texture FetchAnatomy of a Texture Fetch
Anatomy of a Texture FetchMark Kilgard
 
IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...
IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...
IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...VIMALKUMAR KUMARESAN
 
Os revision ques
Os revision quesOs revision ques
Os revision quesJohn Jo
 
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)Subhajit Sahu
 
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTES
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTEScuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTES
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTESSubhajit Sahu
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsMichael Heron
 
Hardware Implementation of Fuzzy Processors: A Review
Hardware Implementation of Fuzzy Processors: A ReviewHardware Implementation of Fuzzy Processors: A Review
Hardware Implementation of Fuzzy Processors: A ReviewIJERDJOURNAL
 
histogram equalization of grayscale and color image
histogram equalization of grayscale and color imagehistogram equalization of grayscale and color image
histogram equalization of grayscale and color imageSaeed Ullah
 
Data Challenges with 3D Computer Vision
Data Challenges with 3D Computer VisionData Challenges with 3D Computer Vision
Data Challenges with 3D Computer VisionMartin Scholl
 
Object_Recognition_using_Deeplearning_Report.pptx
Object_Recognition_using_Deeplearning_Report.pptxObject_Recognition_using_Deeplearning_Report.pptx
Object_Recognition_using_Deeplearning_Report.pptxYaopeng (Gyoho) Wu
 
Multi graph encoder
Multi graph encoderMulti graph encoder
Multi graph encoderYajie Zhou
 
Seam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital ImagesSeam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital ImagesIJLT EMAS
 
Kernel Architecture
Kernel ArchitectureKernel Architecture
Kernel ArchitectureThakursahib
 

What's hot (20)

Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)
 
Histogram Operation in Image Processing
Histogram Operation in Image ProcessingHistogram Operation in Image Processing
Histogram Operation in Image Processing
 
Anatomy of a Texture Fetch
Anatomy of a Texture FetchAnatomy of a Texture Fetch
Anatomy of a Texture Fetch
 
IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...
IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...
IITB Poster. Benchmarking GPU-based Acceleration of Spark in ML Workload usin...
 
Os revision ques
Os revision quesOs revision ques
Os revision ques
 
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs (NOTES)
 
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTES
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTEScuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTES
cuSTINGER: Supporting Dynamic Graph Aigorithms for GPUs : NOTES
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D Graphics
 
Hardware Implementation of Fuzzy Processors: A Review
Hardware Implementation of Fuzzy Processors: A ReviewHardware Implementation of Fuzzy Processors: A Review
Hardware Implementation of Fuzzy Processors: A Review
 
histogram equalization of grayscale and color image
histogram equalization of grayscale and color imagehistogram equalization of grayscale and color image
histogram equalization of grayscale and color image
 
Data Challenges with 3D Computer Vision
Data Challenges with 3D Computer VisionData Challenges with 3D Computer Vision
Data Challenges with 3D Computer Vision
 
Ch8
Ch8Ch8
Ch8
 
Object_Recognition_using_Deeplearning_Report.pptx
Object_Recognition_using_Deeplearning_Report.pptxObject_Recognition_using_Deeplearning_Report.pptx
Object_Recognition_using_Deeplearning_Report.pptx
 
Rn d presentation_gurulingannk
Rn d presentation_gurulingannkRn d presentation_gurulingannk
Rn d presentation_gurulingannk
 
Bp.On.Cuda
Bp.On.CudaBp.On.Cuda
Bp.On.Cuda
 
Multi graph encoder
Multi graph encoderMulti graph encoder
Multi graph encoder
 
Week 6
Week 6Week 6
Week 6
 
B05531119
B05531119B05531119
B05531119
 
Seam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital ImagesSeam Carving Approach for Multirate Processing of Digital Images
Seam Carving Approach for Multirate Processing of Digital Images
 
Kernel Architecture
Kernel ArchitectureKernel Architecture
Kernel Architecture
 

Similar to Drawing Fonts

Technical glossary
Technical glossaryTechnical glossary
Technical glossaryhalo4robo
 
graphics processing unit ppt
graphics processing unit pptgraphics processing unit ppt
graphics processing unit pptNitesh Dubey
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer GraphicsAdri Jovin
 
Computer graphics - Nitish Nagar
Computer graphics - Nitish NagarComputer graphics - Nitish Nagar
Computer graphics - Nitish NagarNitish Nagar
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility bufferWolfgang Engel
 
Overview of graphics systems.ppt
Overview of graphics systems.pptOverview of graphics systems.ppt
Overview of graphics systems.pptMalleshBettadapura1
 
Gpu with cuda architecture
Gpu with cuda architectureGpu with cuda architecture
Gpu with cuda architectureDhaval Kaneria
 
PhD defense talk (portfolio of my expertise)
PhD defense talk (portfolio of my expertise)PhD defense talk (portfolio of my expertise)
PhD defense talk (portfolio of my expertise)Gernot Ziegler
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdfmraaaaa
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading LanguageJungsoo Nam
 
Introduction to Graphics - Session
Introduction to Graphics - SessionIntroduction to Graphics - Session
Introduction to Graphics - SessionNEEVEE Technologies
 
Photoshop graphic intro ppt by kartik mandothiya
Photoshop graphic intro ppt by kartik mandothiyaPhotoshop graphic intro ppt by kartik mandothiya
Photoshop graphic intro ppt by kartik mandothiyaKartik Mandothiya
 

Similar to Drawing Fonts (20)

MM1
MM1MM1
MM1
 
Technical glossary
Technical glossaryTechnical glossary
Technical glossary
 
graphics
graphicsgraphics
graphics
 
graphics processing unit ppt
graphics processing unit pptgraphics processing unit ppt
graphics processing unit ppt
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Computer graphics - Nitish Nagar
Computer graphics - Nitish NagarComputer graphics - Nitish Nagar
Computer graphics - Nitish Nagar
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility buffer
 
Overview of graphics systems.ppt
Overview of graphics systems.pptOverview of graphics systems.ppt
Overview of graphics systems.ppt
 
Gpu with cuda architecture
Gpu with cuda architectureGpu with cuda architecture
Gpu with cuda architecture
 
Kompüter Qrafikasına giriş
Kompüter Qrafikasına girişKompüter Qrafikasına giriş
Kompüter Qrafikasına giriş
 
GPU - Basic Working
GPU - Basic WorkingGPU - Basic Working
GPU - Basic Working
 
Blendertut
BlendertutBlendertut
Blendertut
 
Files and stuff
Files and stuffFiles and stuff
Files and stuff
 
(2) gui drawing
(2) gui drawing(2) gui drawing
(2) gui drawing
 
PhD defense talk (portfolio of my expertise)
PhD defense talk (portfolio of my expertise)PhD defense talk (portfolio of my expertise)
PhD defense talk (portfolio of my expertise)
 
High Performance Rust UI.pdf
High Performance Rust UI.pdfHigh Performance Rust UI.pdf
High Performance Rust UI.pdf
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
 
Introduction to Graphics - Session
Introduction to Graphics - SessionIntroduction to Graphics - Session
Introduction to Graphics - Session
 
Photoshop graphic intro ppt by kartik mandothiya
Photoshop graphic intro ppt by kartik mandothiyaPhotoshop graphic intro ppt by kartik mandothiya
Photoshop graphic intro ppt by kartik mandothiya
 
Mod 2 hardware_graphics.pdf
Mod 2 hardware_graphics.pdfMod 2 hardware_graphics.pdf
Mod 2 hardware_graphics.pdf
 

More from Budditha Hettige

Graphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::BlocksGraphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::BlocksBudditha Hettige
 
Introduction to Computer Graphics
Introduction to Computer GraphicsIntroduction to Computer Graphics
Introduction to Computer GraphicsBudditha Hettige
 
Computer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentalsComputer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentalsBudditha Hettige
 
Computer System Architecture Lecture Note 8.1 primary Memory
Computer System Architecture Lecture Note 8.1 primary MemoryComputer System Architecture Lecture Note 8.1 primary Memory
Computer System Architecture Lecture Note 8.1 primary MemoryBudditha Hettige
 
Computer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache MemoryComputer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache MemoryBudditha Hettige
 
Computer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressingComputer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressingBudditha Hettige
 
Computer System Architecture Lecture Note 6: hardware performance
Computer System Architecture Lecture Note 6: hardware performanceComputer System Architecture Lecture Note 6: hardware performance
Computer System Architecture Lecture Note 6: hardware performanceBudditha Hettige
 
Computer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technologyComputer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technologyBudditha Hettige
 
Computer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architectureComputer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architectureBudditha Hettige
 
Computer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: HistoryComputer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: HistoryBudditha Hettige
 

More from Budditha Hettige (20)

Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
 
Sorting
SortingSorting
Sorting
 
Link List
Link ListLink List
Link List
 
Queue
QueueQueue
Queue
 
02 Stack
02 Stack02 Stack
02 Stack
 
Data Structures 01
Data Structures 01Data Structures 01
Data Structures 01
 
Lighting
LightingLighting
Lighting
 
Viewing
ViewingViewing
Viewing
 
OpenGL 3D Drawing
OpenGL 3D DrawingOpenGL 3D Drawing
OpenGL 3D Drawing
 
2D Drawing
2D Drawing2D Drawing
2D Drawing
 
Graphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::BlocksGraphics Programming OpenGL & GLUT in Code::Blocks
Graphics Programming OpenGL & GLUT in Code::Blocks
 
Introduction to Computer Graphics
Introduction to Computer GraphicsIntroduction to Computer Graphics
Introduction to Computer Graphics
 
Computer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentalsComputer System Architecture Lecture Note 9 IO fundamentals
Computer System Architecture Lecture Note 9 IO fundamentals
 
Computer System Architecture Lecture Note 8.1 primary Memory
Computer System Architecture Lecture Note 8.1 primary MemoryComputer System Architecture Lecture Note 8.1 primary Memory
Computer System Architecture Lecture Note 8.1 primary Memory
 
Computer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache MemoryComputer System Architecture Lecture Note 8.2 Cache Memory
Computer System Architecture Lecture Note 8.2 Cache Memory
 
Computer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressingComputer System Architecture Lecture Note 7 addressing
Computer System Architecture Lecture Note 7 addressing
 
Computer System Architecture Lecture Note 6: hardware performance
Computer System Architecture Lecture Note 6: hardware performanceComputer System Architecture Lecture Note 6: hardware performance
Computer System Architecture Lecture Note 6: hardware performance
 
Computer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technologyComputer System Architecture Lecture Note 5: microprocessor technology
Computer System Architecture Lecture Note 5: microprocessor technology
 
Computer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architectureComputer System Architecture Lecture Note 3: computer architecture
Computer System Architecture Lecture Note 3: computer architecture
 
Computer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: HistoryComputer System Architecture Lecture Note 2: History
Computer System Architecture Lecture Note 2: History
 

Recently uploaded

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Recently uploaded (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

Drawing Fonts

  • 1. CSC 307 1.0 Graphics Programming Budditha Hettige Department of Statistics and Computer Science
  • 3. 3 Imaging and Raster Primitives • Describe OpenGL’s raster primitives: bitmaps and image rectangles • Demonstrate how to get OpenGL to read and render pixel rectangles Budditha Hettige
  • 4. 4 Pixel-based primitives • Bitmaps – 2D array of bit masks for pixels • update pixel color based on current color • Images – 2D array of pixel color information • complete color information for each pixel • OpenGL doesn’t understand image formats Budditha Hettige
  • 5. Frame Buffer Rasterization (including Pixel Zoom) Per Fragment Operations TextureMe mory Pixel-Transfer Operations (and Pixel Map) CPU Pixel Storage Modes glReadPixels(), glCopyPixels() glBitmap(), glDrawPixels() glCopyTex*Image(); Pixel Pipeline • Programmable pixel storage and transfer operations CPUCPU DLDL Poly.Poly. Per Vertex Per Vertex RasterRaster FragFrag FBFB PixelPixel TextureTexture Budditha Hettige 5
  • 6. 6 Positioning Image Primitives • glRasterPos3f( x, y, z ) – raster position transformed like geometry – discarded if raster position is outside of viewport • may need to fine tune viewport for desired results Raster Position Budditha Hettige
  • 7. 7 Rendering Bitmaps • glBitmap( width, height, xorig, yorig, xmove, ymove, bitmap ) – render bitmap in current color at – advance raster position by after rendering     yorigyxorigx   ymovexmove width xorig yorig xmove Budditha Hettige
  • 8. 8 Rendering Fonts using Bitmaps • OpenGL uses bitmaps for font rendering – each character is stored in a display list containing a bitmap – window system specific routines to access system fonts • glXUseXFont() • wglUseFontBitmaps() Budditha Hettige
  • 9. 9 Rendering Images • glDrawPixels( width, height, format, type, pixels ) – render pixels with lower left of image at current raster position – numerous formats and data types for specifying storage in memory • best performance by using format and type that matches hardware Budditha Hettige
  • 10. 10 Reading Pixels • glReadPixels( x, y, width, height, format, type, pixels ) – read pixels from specified (x,y) position in framebuffer – pixels automatically converted from framebuffer format into requested format and type • Framebuffer pixel copy • glCopyPixels( x, y, width, height, type ) Budditha Hettige
  • 11. 11 Raster Position glPixelZoom(1.0, -1.0); Pixel Zoom • glPixelZoom( x, y ) – expand, shrink or reflect pixels around current raster position – fractional zoom supported Budditha Hettige
  • 12. 12 Storage and Transfer Modes • Storage modes control accessing memory – byte alignment in host memory – extracting a subimage • Transfer modes allow modify pixel values – scale and bias pixel component values – replace colors using pixel maps Budditha Hettige