0
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/TextureGL_TEXTURE_1D: Images in this texture all are 1-dimensional. They have width, bu...
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 t...
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.• Lin...
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 glTexIma...
Lighting• Let’s look at code
Thanks
Upcoming SlideShare
Loading in...5
×

8thlightu3

377

Published on

My third 8th Light University class.

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
377
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • 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
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript of "8thlightu3"

    1. 1. Colors and Textures Make it pretty
    2. 2. Review
    3. 3. Colors• glColor - sets the color state• Linear interpolate along Vertices• Code time!
    4. 4. Texture Mapping
    5. 5. What?
    6. 6. Texture http://www.opengl.org/wiki/TextureGL_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. Thestorage 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 6faces of a cube.GL_TEXTURE_1D_ARRAY: Images in this texture all are 1-dimensional. However, it contains multiple sets of1-dimensional images, all within one texture. The array length is part of the textures size.GL_TEXTURE_2D_ARRAY Array: Images in this texture all are 2-dimensional. However, it contains multiplesets of 2-dimensional images, all within one texture. The array length is part of the textures size.
    7. 7. Texture• GL_TEXTURE_2D: Images in this texture all are 2-dimensional. They have width and height, but no depth.
    8. 8. glTexImage2D• Creates The Texture from an array of bytes and sets the texture “state”• All subsequent calls are on this texture
    9. 9. GL_TEXTURE_2D• glEnable(GL_TEXTURE_2D)• Might want to turn on texturing.
    10. 10. Texture Environment• glTexEnvi• Sets various properties on the texture state
    11. 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. 12. Texture Wrapping• When texture coordinates fall outside 0-1• REPEAT, CLAMP, CLAMP_TO_EDGE, CLAMP_TO_BORDER
    13. 13. Code
    14. 14. Mipmapping• Scintillation• Performance• multum in parvo - “many things in a small place”• That level field on the glTexImage call
    15. 15. Lighting• Let’s look at code
    16. 16. Thanks
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×