NO COLOR!!!
My texture loader is pretty picky. It''ll only take 24 bit bitmaps, so I don''t think it''s a problem with loading the bitmap in, although I can''t really think of any other reason this wouldn''t work. I''ve had this problem before, and one of my colleagues fixed it, but I have no idea how he did it. Interestingly enough, neither does he.
How do you post files? Tell me how and I''ll be happy to stick some source out on the web.
You need to have some webspace to host them on and then just post a link using normal html. If you don''t have any hosting, try signing up for one of the small free hosting places.
Enigma
Enigma
I do have a web server, but I''m still waiting for a new hard drive to come in for it before I can put it back online. Perhaps I could just email the code to you?
Your problem was indeed the internal texture format. You had:
when it should be
The second parameter is the internal format, but you were passing it the number of textures you had. In this case you only had one texture, so you passed ''1'', which is the legacy way of specifying GL_LUMINANCE, which is greyscale. Also your image is RGB but you were specifying it as BGR.
Enigma
gluBuild2DMipmaps(GL_TEXTURE_2D, sizeof(Texture), BMP.bmWidth, BMP.bmHeight, GL_BGR_EXT, GL_UNSIGNED_BYTE, BMP.bmBits);
when it should be
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, BMP.bmWidth, BMP.bmHeight, GL_RGB, GL_UNSIGNED_BYTE, BMP.bmBits);
The second parameter is the internal format, but you were passing it the number of textures you had. In this case you only had one texture, so you passed ''1'', which is the legacy way of specifying GL_LUMINANCE, which is greyscale. Also your image is RGB but you were specifying it as BGR.
Enigma
Many thanks, but I intentionally used BGR_EXT, just because colors look much better that way.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement