Chapter 10. Textures

 

If I had two loaves of bread, I would sell one and buy hyacinths, for they would feed my soul.

 
 --The Koran

Textures are to 3D graphics what scenery is to the theater, that is, a way of making something appear rich and complex even though it’s not. This is a good thing. Anything that gives us depth at little cost is to be strived for in 3D graphics. Texture mapping is a result of attempts to make 3D objects more interesting and realistic, and its popularity easily demonstrates how successful it’s been.

This chapter covers applying a texture to a surface—from converting a Windows bitmap to OpenGL’s format to automatically creating multiple levels of detailed images to speed up rendering. By the way, if you’re using color-index ...

Get OpenGL Programming for Windows 95 and Windows NT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.