Re: [Plib-devel] texture support for ssgLoadOBJ
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-04-05 04:39:05
|
Wolfram Kuss wrote: > > Dave wrote: > > > > >> - I had a texture with a size that is not a power of two. > >> plib complained (map is not a power-of-two in size) > >> and exits the program! > >i'll track that down if you want to send me the texture > > Lets first decide what we want :-). > I think most or all graphics cards want to have texture-sizes > that are a power of two. So, internally, we should only have such > textures. More than that - it is a REQUIREMENT of OpenGL that maps have power of two sizes. Before we started to use SSG for PPE and stuff like that, it didn't matter that it exited when something as serious as this happened. The developer of a game would see his error and fix it. No big deal. However, now that SSG is used in things like the PPE modeller, it's important that we can survive without crashing - and yet still report the seriousness of the problem to the application. > I see two ways to deal with this: > - Dont load wrong textures, give an error-message, go on loading > everything else. Exactly. > - Resample the texture when loading. This, of course, slows loading > the texture. Therefore, authors (of games or whatever) should resample > their textures once in a paint-program anyway. If we go this way, > I want a dialog saying "this is not a nice texture, if you want to go > on using it or even distribute it, resample it". I don't think that's a good plan. People will ignore the error if SSG kludges a fix - and the texture will just look bad. Replace the broken texture with a magenta and green chequerboard or something. People learn to recognise this as the 'broken texture' symptom. > It is surprising how uniformed people can be, even if they create > textures professionally. For a long time, we had monochrome textures > with a size of, for example 118x112 pixels :-(. > So, our program was used with the hand brake on :-(. (German idiom, > translated into English. I dont know whether there is an English one). Yep. OpenGL implementations are SUPPOSED to ignore non-power of two maps...not all of them do. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |