Skip to main content
GameDev.net gamedev.net
🔒 Locked

loading bmp

Started by siddim Aug 15, 2002 at 2:19 PM 0 replies 250+ views
Original Post
siddim
siddim
hi, been working with the tutorial 6 of nehe(texture mapping), I change it a little so i can pass the texture name as a parameter. it work fine but only for one texture, when i load the second one nothing display, not even the first one anymore. did i miss something? i have been looking but i can''t find the problem. how do i use glGenTextures(1,texture[0]); ? does it have to be call only once in the constructor of my textureManager class like: glGenTextures(TableSize, texture[TableSize]); ? thanks. siddim.
Crispy
Crispy
glGenTextures() takes in the number of textures to generate and an array of uint''s:


  
GLuint Textures[5];

glGenTextures(5, Textures);


If you want to generate one texture only, you need to reference it properly:


  
GLuint Textures[5];

glGenTextures(1, &Textures[0]);


Hope this helps,
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.