O'Reilly logo

OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition by Bill M. Licea-Kane, John M. Kessenich, Graham Sellers, Dave Shreiner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and Initializing Textures

The first step in using textures in OpenGL is to reserve names for texture objects and bind them to the context’s texture units. To create a texture, as with many other objects in OpenGL, names are reserved and then bound to their appropriate target. To reserve names for texture objects, call glGenTextures(), specifying the number of names to reserve and the address of an array into which to deposit the names.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required