Advertisement

Adding more textures to tutorial #10

Started by September 08, 2003 12:49 AM
1 comment, last by Durran21 21 years, 5 months ago
Hey there... been messing around with tutorial number 10, the 3d world one. I know how to add more than one texture to things like cubes... but I cant figure out how to do it with this 3d world. What I guess I need to understand is what "u" and "v" do from the txt file. These are the texture coords, but I don''t understand how they fit into the current triangle... Even then, I''m not sure I''ll be able to change the actual texture that goes with that part of the room. Basically, I want three textures, one for walls, ceiling and floor. Is it possible?
Create 3 texture ID''s and load each texture sparately into each of them. u and v coordinates define horizontal and vertical texture coordinates respectively.

To change the texture for each of the faces of the cube, bind a texture (glBindTexture(TexID)), draw the faces you want to have that texture, bind a different texture, draw the faces you want to have that etc.
"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
Advertisement
Re-read the tout and your eyes will say :

"Now I know this tut" Neo
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/

This topic is closed to new replies.

Advertisement