SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Colors and Textures
      Make it pretty
Review
Colors

• glColor - sets the color state
• Linear interpolate along Vertices
• Code time!
Texture Mapping
What?
Texture
 http://www.opengl.org/wiki/Texture



GL_TEXTURE_1D: Images in this texture all are 1-dimensional. They have width, but no height or depth.
GL_TEXTURE_2D: Images in this texture all are 2-dimensional. They have width and height, but no depth.
GL_TEXTURE_3D: Images in this texture all are 3-dimensional. They have width, height, and depth.
GL_TEXTURE_RECTANGLE: The image in this texture (only one image. No mipmapping) is 2-dimensional.
Texture coordinates used for these textures are not normalized.
GL_TEXTURE_BUFFER: The image in this texture (only one image. No mipmapping) is 1-dimensional. The
storage for this data comes from a Buffer Object.
GL_TEXTURE_CUBE_MAP: There are exactly 6 distinct sets of 2D images, all of the same size. They act as 6
faces of a cube.
GL_TEXTURE_1D_ARRAY: Images in this texture all are 1-dimensional. However, it contains multiple sets of
1-dimensional images, all within one texture. The array length is part of the texture's size.
GL_TEXTURE_2D_ARRAY Array: Images in this texture all are 2-dimensional. However, it contains multiple
sets of 2-dimensional images, all within one texture. The array length is part of the texture's size.
Texture
•   GL_TEXTURE_2D: Images in this
    texture all are 2-dimensional. They
    have width and height, but no
    depth.
glTexImage2D


• Creates The Texture from an array of
  bytes and sets the texture “state”
• All subsequent calls are on this texture
GL_TEXTURE_2D


• glEnable(GL_TEXTURE_2D)
• Might want to turn on texturing.
Texture Environment


• glTexEnvi
• Sets various properties on the texture
  state
Filtering
• Textures rarely map 1-1 to geometric
  primitives.
• You can set magnification filters or
  minification filters.
• Linear interpolation or nearest neighbor
• glTexParameter
Texture Wrapping


• When texture coordinates fall outside 0-1
• REPEAT, CLAMP, CLAMP_TO_EDGE,
  CLAMP_TO_BORDER
Code
Mipmapping

• Scintillation
• Performance
• multum in parvo - “many things in a small
  place”
• That level field on the glTexImage call
Lighting


• Let’s look at code
Thanks

Weitere ähnliche Inhalte

Andere mochten auch

HTML5 Space Invaders
HTML5 Space InvadersHTML5 Space Invaders
HTML5 Space InvadersPascal Rettig
 
SCMC HTML5 Game Development
SCMC HTML5 Game DevelopmentSCMC HTML5 Game Development
SCMC HTML5 Game DevelopmentEric Smith
 
Html5 episode 2
Html5 episode 2Html5 episode 2
Html5 episode 2Eric Smith
 
времена года
времена годавремена года
времена годаSusl1k
 
De Betekenis Van Empowerment Voor Het Opvoedingsondersteunend Werken
De Betekenis Van Empowerment Voor Het Opvoedingsondersteunend WerkenDe Betekenis Van Empowerment Voor Het Opvoedingsondersteunend Werken
De Betekenis Van Empowerment Voor Het Opvoedingsondersteunend Werkenbennydhoop
 
Test driven game development silly, stupid or inspired?
Test driven game development   silly, stupid or inspired?Test driven game development   silly, stupid or inspired?
Test driven game development silly, stupid or inspired?Eric Smith
 

Andere mochten auch (6)

HTML5 Space Invaders
HTML5 Space InvadersHTML5 Space Invaders
HTML5 Space Invaders
 
SCMC HTML5 Game Development
SCMC HTML5 Game DevelopmentSCMC HTML5 Game Development
SCMC HTML5 Game Development
 
Html5 episode 2
Html5 episode 2Html5 episode 2
Html5 episode 2
 
времена года
времена годавремена года
времена года
 
De Betekenis Van Empowerment Voor Het Opvoedingsondersteunend Werken
De Betekenis Van Empowerment Voor Het Opvoedingsondersteunend WerkenDe Betekenis Van Empowerment Voor Het Opvoedingsondersteunend Werken
De Betekenis Van Empowerment Voor Het Opvoedingsondersteunend Werken
 
Test driven game development silly, stupid or inspired?
Test driven game development   silly, stupid or inspired?Test driven game development   silly, stupid or inspired?
Test driven game development silly, stupid or inspired?
 

Ähnlich wie GL_TEXTURE_2D Fundamentals for Color and Texture Mapping

Demystifying Neural Style Transfer
Demystifying Neural Style TransferDemystifying Neural Style Transfer
Demystifying Neural Style TransferSEMINARGROOT
 
Opengl texturing
Opengl texturingOpengl texturing
Opengl texturingSardar Alam
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture MappingMark Kilgard
 
Shaders & Standard Shader In Unity
Shaders & Standard Shader In UnityShaders & Standard Shader In Unity
Shaders & Standard Shader In UnityEhsan Ehrari
 
Texture By Priyanka Chauhan
Texture By Priyanka ChauhanTexture By Priyanka Chauhan
Texture By Priyanka ChauhanPriyanka Chauhan
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsJoseph Charles
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_openglManas Nayak
 
Overview of Convolutional Neural Networks
Overview of Convolutional Neural NetworksOverview of Convolutional Neural Networks
Overview of Convolutional Neural Networksananth
 
Image segmentation
Image segmentationImage segmentation
Image segmentationKuppusamy P
 
Lecture 9&10 computer vision segmentation-no_task
Lecture 9&10 computer vision segmentation-no_taskLecture 9&10 computer vision segmentation-no_task
Lecture 9&10 computer vision segmentation-no_taskcairo university
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentationParijat Sinha
 
Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...
Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...
Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...Zahra Mansoori
 
Texture features - wirth06.pdf
Texture features - wirth06.pdfTexture features - wirth06.pdf
Texture features - wirth06.pdfSatishkumarLVarma
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparencyacbess
 

Ähnlich wie GL_TEXTURE_2D Fundamentals for Color and Texture Mapping (20)

OpenGL L05-Texturing
OpenGL L05-TexturingOpenGL L05-Texturing
OpenGL L05-Texturing
 
Demystifying Neural Style Transfer
Demystifying Neural Style TransferDemystifying Neural Style Transfer
Demystifying Neural Style Transfer
 
XNA L05–Texturing
XNA L05–TexturingXNA L05–Texturing
XNA L05–Texturing
 
PPT s08-machine vision-s2
PPT s08-machine vision-s2PPT s08-machine vision-s2
PPT s08-machine vision-s2
 
Opengl texturing
Opengl texturingOpengl texturing
Opengl texturing
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
Shaders & Standard Shader In Unity
Shaders & Standard Shader In UnityShaders & Standard Shader In Unity
Shaders & Standard Shader In Unity
 
Texture Mapping
Texture Mapping Texture Mapping
Texture Mapping
 
OpenGL Texture Mapping
OpenGL Texture MappingOpenGL Texture Mapping
OpenGL Texture Mapping
 
Texture By Priyanka Chauhan
Texture By Priyanka ChauhanTexture By Priyanka Chauhan
Texture By Priyanka Chauhan
 
Computer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methodsComputer Graphics: Visible surface detection methods
Computer Graphics: Visible surface detection methods
 
Texture mapping in_opengl
Texture mapping in_openglTexture mapping in_opengl
Texture mapping in_opengl
 
Digital Image Processing.pptx
Digital Image Processing.pptxDigital Image Processing.pptx
Digital Image Processing.pptx
 
Overview of Convolutional Neural Networks
Overview of Convolutional Neural NetworksOverview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Lecture 9&10 computer vision segmentation-no_task
Lecture 9&10 computer vision segmentation-no_taskLecture 9&10 computer vision segmentation-no_task
Lecture 9&10 computer vision segmentation-no_task
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentation
 
Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...
Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...
Content-based Image Retrieval Using The knowledge of Color, Texture in Binary...
 
Texture features - wirth06.pdf
Texture features - wirth06.pdfTexture features - wirth06.pdf
Texture features - wirth06.pdf
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparency
 

Kürzlich hochgeladen

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

GL_TEXTURE_2D Fundamentals for Color and Texture Mapping

  • 1. Colors and Textures Make it pretty
  • 3. Colors • glColor - sets the color state • Linear interpolate along Vertices • Code time!
  • 6. Texture http://www.opengl.org/wiki/Texture GL_TEXTURE_1D: Images in this texture all are 1-dimensional. They have width, but no height or depth. GL_TEXTURE_2D: Images in this texture all are 2-dimensional. They have width and height, but no depth. GL_TEXTURE_3D: Images in this texture all are 3-dimensional. They have width, height, and depth. GL_TEXTURE_RECTANGLE: The image in this texture (only one image. No mipmapping) is 2-dimensional. Texture coordinates used for these textures are not normalized. GL_TEXTURE_BUFFER: The image in this texture (only one image. No mipmapping) is 1-dimensional. The storage for this data comes from a Buffer Object. GL_TEXTURE_CUBE_MAP: There are exactly 6 distinct sets of 2D images, all of the same size. They act as 6 faces of a cube. GL_TEXTURE_1D_ARRAY: Images in this texture all are 1-dimensional. However, it contains multiple sets of 1-dimensional images, all within one texture. The array length is part of the texture's size. GL_TEXTURE_2D_ARRAY Array: Images in this texture all are 2-dimensional. However, it contains multiple sets of 2-dimensional images, all within one texture. The array length is part of the texture's size.
  • 7. Texture • GL_TEXTURE_2D: Images in this texture all are 2-dimensional. They have width and height, but no depth.
  • 8. glTexImage2D • Creates The Texture from an array of bytes and sets the texture “state” • All subsequent calls are on this texture
  • 10. Texture Environment • glTexEnvi • Sets various properties on the texture state
  • 11. Filtering • Textures rarely map 1-1 to geometric primitives. • You can set magnification filters or minification filters. • Linear interpolation or nearest neighbor • glTexParameter
  • 12. Texture Wrapping • When texture coordinates fall outside 0-1 • REPEAT, CLAMP, CLAMP_TO_EDGE, CLAMP_TO_BORDER
  • 13. Code
  • 14. Mipmapping • Scintillation • Performance • multum in parvo - “many things in a small place” • That level field on the glTexImage call

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. Texture mapping is a term from computer graphics which means to display a 2- D image over a surface in 3-D.\nTexels - 0-1. (usually S, T sometimes U,V).\n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n