Help needed: Textures (Tutorial 6)
I have a problem with my textures.
I''ve made a bmp file. I saved it in the same folder as my program.
But when I run the program all I see is a complete white cube.
I went through the code again and compared it with the original, but I can''t find anything.
Does anybody know what could be wrong?
Another question:
If I want to load a picture in another format (BMP uses quite much memory), what changes do I have to do in the code?
Thanks!
Personally I use TGA''s, because you can use alpha channels. Anyways, you may want to paste code.
Make sure in your initialize code you add this
glEnable(GL_TEXTURE_2D);
or
glEnable(GL_TEXTURES_2D);
dont remember which
IT Administrator / Software Engineere
http://drdsoftware.cjb.net
Make sure in your initialize code you add this
glEnable(GL_TEXTURE_2D);
or
glEnable(GL_TEXTURES_2D);
dont remember which

IT Administrator / Software Engineere
http://drdsoftware.cjb.net
Dustin DavisOwner / CEOProgrammers Unlimitedwww.Programmers-Unlimited.com
The problem is fixed... I changed the size of the picture to 64x64 and now it''s working fine!
Question:
If I want to use TGA, do I have to make any changes in the code?
Question:
If I want to use TGA, do I have to make any changes in the code?
Unless you''re using mipmaps, textures sizes have to be a multiple of two. 64, 128, 256, 512, 1024, 2096
TGA''s require a different loading code. Both NeHe and www.gametutorials.com have tutorials for them.
------------
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
"It''s all part of the conspiracy of conspirators conspiring to conspire their own conspiracies..."
TGA''s require a different loading code. Both NeHe and www.gametutorials.com have tutorials for them.
------------
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
"It''s all part of the conspiracy of conspirators conspiring to conspire their own conspiracies..."
_______________________________________Pixelante Game Studios - Fowl Language
quote:
Original post by LockePick
Unless you''re using mipmaps, textures sizes have to be a multiple of two. 64, 128, 256, 512, 1024, 2096
Textures must be a power of two if you are using mipmaps. If you want a non-mipmapped texture that is not a power of 2, then use the NV_texture_rectangle extension ( can''t remember if there''s an ARB version ).
Death of one is a tragedy, death of a million is just a statistic.

If at first you don't succeed, redefine success.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement