Texture Loading Headaches
Quote:Originally posted by arekkusuThat's funny.
Maybe flooding Apple with bugs saying "don't break stuff, dumbasses" will fix it?
I was just thinking that if that's the case, I'm sure they'll be right on it. I hope something materializes soon cause I'm just about out of ideas on this one. Luckily I have a good workaround with gluBuild2DMipmaps for now.
All that changed is that glTexImage2D is now much better able to tell whether a texture upload will actually succeed or not... but maybe they went overboard a little
Those of you just calling glTexImage2D, are you doing a proper proxy test to check the texture will fit before you do the upload? If not, don't be surprised if glTexImage2D fails unexpectedly, though you should get a GL error.
I've just installed Panther on my G5 at work, so I'll test Weatherscape XT tomorrow -- I'm pretty sure that does the "right thing" when it comes to texture uploads.
Those of you just calling glTexImage2D, are you doing a proper proxy test to check the texture will fit before you do the upload? If not, don't be surprised if glTexImage2D fails unexpectedly, though you should get a GL error.
I've just installed Panther on my G5 at work, so I'll test Weatherscape XT tomorrow -- I'm pretty sure that does the "right thing" when it comes to texture uploads.
Quote:Originally posted by OneSadCookieWhat the heck is a "proper proxy test"? I'm checking for NPT but I've never heard of a proxy test before. I'm not getting a GL error.
Those of you just calling glTexImage2D, are you doing a proper proxy test to check the texture will fit before you do the upload? If not, don't be surprised if glTexImage2D fails unexpectedly, though you should get a GL error.
EDIT: Okay, I found the proxy test thing you were talking about. I'd seen it before but disregarded it. It seems a little silly for a standard 128x128 pixel bmp though.
Got it! Must specify glTexParameteri for the GL_TEXTURE_MIN_FILTER for glTexImage2D to work. I wasn't doing that in the loading routine for flexibility and forgot to do so later. I thought that it would work with default parameters. Apparently it DID, but not anymore.
"The Force with him strong is, but ready he is not." 
Thank you for sorting that out. I was getting concerned too.

Thank you for sorting that out. I was getting concerned too.
Ah, I forgot about that
According to the GL spec, the default texture minification filter is GL_NEAREST_MIPMAP_LINEAR (go figure), and you get a white texture image if you don't have mipmaps. 8.x, 9.x, 10.0.x, 10.1.x and 10.2.x treat NEAREST_MIPMAP_LINEAR as LINEAR (I believe) if there are no mipmaps. This was wrong, and has been "fixed" for Panther.
I'm still not sure if that's a good thing or not
According to the GL spec, the default texture minification filter is GL_NEAREST_MIPMAP_LINEAR (go figure), and you get a white texture image if you don't have mipmaps. 8.x, 9.x, 10.0.x, 10.1.x and 10.2.x treat NEAREST_MIPMAP_LINEAR as LINEAR (I believe) if there are no mipmaps. This was wrong, and has been "fixed" for Panther.
I'm still not sure if that's a good thing or not
Seems to me that it should be/should have been according to spec. Sucks that Apple didn't send out a technote on it though. Can we sue them for potential hair-loss?
I'm also having the same problem as the original poster. I want to load in a texture file, but I am using C++. All I need is the C++ code to load in the file. I can get it to texture with patterns that I created, but I don't know how to load in a file using C++. Any help, would be greatly appreciated.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| iPhone texture loading issue | yotryu | 0 | 3,128 |
Mar 11, 2009 03:40 AM Last Post: yotryu |
|
| Texture Mapping: Loading a texture from a .bmp file? | ishrock | 5 | 5,023 |
Dec 13, 2008 09:27 AM Last Post: ThemsAllTook |
|
| OpenGL Texture Loading & Sprites | corporatenewt | 2 | 10,606 |
Jan 30, 2008 12:39 PM Last Post: ynda20 |
|
| Texture Loading in Cocoa... | dave05 | 3 | 7,675 |
Dec 11, 2007 03:12 AM Last Post: DoG |
|
| Cocoa Texture Loading Code Problem | Nick | 1 | 2,778 |
Oct 28, 2005 11:44 PM Last Post: OneSadCookie |
|

