Nehe's lesson 8
How do you load different pictures on each side of cube in Nehe''s lesson 8 ? The reason I ask that because nehe wrote lenthy transparency and loadtexures code in it. I dont know where good place to add multiple textures in it.
Waldoo
make an array of unsigned ints to serve as your texture IDs. Then, use the loading code to load each of your individual images and bind them to their respective sides.
Later,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[if you have a link proposal, email me.]
Later,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[if you have a link proposal, email me.]
[twitter]warrenm[/twitter]
Could you please post code example here. I do understand what you are saying but I am newbie in VC++ and OpenGL. I hope you will be willing to post code here.
Waldoo
Waldoo
I''d be more than willing to. I''ll post it before tomorrow...probably in a few hours in fact.
Hang loose,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[if you have a link proposal, email me.]
Hang loose,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[if you have a link proposal, email me.]
[twitter]warrenm[/twitter]
Great I would like to see your work
I made array on texture load for 16 sides out of 32. I have some work left to go but I think there got to be a way to compress it. I probably need to use variable as array on texture load. If it will work. How do you generate array in variable for texture load and filename? I know its easy, I am newbie in VC++ and I dont know its rules. I ve used Basic and Visual Basic for many years.
Waldoo
I made array on texture load for 16 sides out of 32. I have some work left to go but I think there got to be a way to compress it. I probably need to use variable as array on texture load. If it will work. How do you generate array in variable for texture load and filename? I know its easy, I am newbie in VC++ and I dont know its rules. I ve used Basic and Visual Basic for many years.
Waldoo
I am greatly sorry that I don't have a complete solution. However, this is what I got. I just can't seem to get it to bind the individual textures. The idea is there, though.
This will go in your initialization section, and replace the original line that declares your textures.
I think this is the problem area. However, I have no clue as to why it doesn't work.
When using the different textures, place a line like this before you make your respective calls to glVertex3f(). Replace the 1 with the number of the texture (0-5) that you'd like to use.
Hope this helps a bit,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[if you have a link proposal, email me.]
EDITED for formatting
EDITED because the forums are screwing with my head...
Edited by - zealouselixir on February 18, 2002 2:23:31 PM
|
This will go in your initialization section, and replace the original line that declares your textures.
|
I think this is the problem area. However, I have no clue as to why it doesn't work.
|
When using the different textures, place a line like this before you make your respective calls to glVertex3f(). Replace the 1 with the number of the texture (0-5) that you'd like to use.
Hope this helps a bit,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[if you have a link proposal, email me.]
EDITED for formatting
EDITED because the forums are screwing with my head...
Edited by - zealouselixir on February 18, 2002 2:23:31 PM
[twitter]warrenm[/twitter]
I found what the problem you had. TextureImage need array too before it may enter into data (memory)
To load texture with array:
if (TextureImage[newtexB]=LoadBMP("x1.bmp")) //put this line in "int LoadGLTextures()" paragraph
One more question how do you generate array in filename? like this x[array].bmp ?
Thank for very much for the code
waldoo
Edited by - Waldoo on February 18, 2002 3:17:11 PM
Edited by - Waldoo on February 18, 2002 4:00:17 PM
To load texture with array:
if (TextureImage[newtexB]=LoadBMP("x1.bmp")) //put this line in "int LoadGLTextures()" paragraph
One more question how do you generate array in filename? like this x[array].bmp ?
Thank for very much for the code
waldoo
Edited by - Waldoo on February 18, 2002 3:17:11 PM
Edited by - Waldoo on February 18, 2002 4:00:17 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement