Re: [PyOpenGL-Users] Textures on Bad Hardware
Brought to you by:
mcfletch
From: Almar K. <alm...@gm...> - 2010-09-14 19:59:28
|
On 1 August 2010 02:06, Ian Mallett <geo...@gm...> wrote: > On Sat, Jul 31, 2010 at 3:05 PM, Dirk Reiners <dir...@gm...>wrote: > >> All of that looks pretty straightforward. The only thing I can think of, >> but >> that should give a different error, is textures that are not power-of-two >> size. >> What are the sizes of your textures? >> > I hadn't even thought of that! > > And after some testing, it seems that's the problem. My test code can be > found here: > > http://download577.mediafire.com/jnza7ybur4qg/ievqu4buekair6k/test_texture.zip > > I'm surprised at how ubiquitous using power-of-two textures must be. > Basically no other applications seemed to have problems. I never had > problems, so I guess I assumed it was irrelevant. > > Uggggh I assume I'll have to rewrite my texture code so that it can take an > argument to scale surfaces to the nearest factor of two. Any other way? I > know of ARB_texture_rectangle, but that sounds horrible. Blech. I hate > Intel. > The pretties way of doing this is checking the openGl version and if its < 2.0, you need power-of-two textures. However, I recently encountered a system with an ATI card, that did have OpenGl >=2.0, but did NOT support non-power-of-two textures. So my current implementation just tries resizing the texture if it fails to initialize, or if OpenGl <2.0. Cheers, Almar |