View Full Version : glbindtexture
02-07-2000, 10:02 AM
How do I use glBindTexture? - all the source code I can find is hopelessly unreadable and the OpenGL help file I have skips over most of it conveniantly. Simple examples preferred with some doc. if poss
After you first loaded a texture in opengl and assigned a number to it(using glGenTextures or else) you call glBindTexture(GL_TEXTURE_*, NUMBER_OF_YOUR_TEXTURE).
(the * stand for 1D, 2D, 3D
This will make your texture object active or "waiting to be called".
//other texture info
//create texture one
//Set color in filter and etc.
//create the other textures with the same template.
After, when you get to the actual scene rendering and want to render using the first texture you call glBindTexture again(this time it will says to opengl use that texture for the next textures mapping if the number you pass to glBindTexture is one that has an active texture(that mean you already called glBind for it)).
//render stuff that use the first texture
//render stuff using the second texture.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.