SDL/SDL_image and NPOT textures

Hello all,

When loading in textures via SDL_image and then sticking them onto SDL
surfaces, do you have to worry about power-of-two stuff?
OpenGL 2.0 handles NPOTs in the core, assuming your hardware supports the
ARB_texture_non_power_of_two extension.
Is SDL/SDL_image ok with NPOT textures?

cheers,
Kos.

SDL doesn’t require POT surfaces. Only if you then choose to upload
the surfaces to opengl textures would you need to worry about it.On 5/18/07, Kostas Kostiadis wrote:

Hello all,

When loading in textures via SDL_image and then sticking them onto SDL
surfaces, do you have to worry about power-of-two stuff?
OpenGL 2.0 handles NPOTs in the core, assuming your hardware supports the
ARB_texture_non_power_of_two extension.
Is SDL/SDL_image ok with NPOT textures?

cheers,
Kos.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

You need to check the SDL surface pixel data alignment case where
pitch != witdh*bytesPerPixel

In this (very rare) case you need to set some OpenGL texture upload
settings to cope with this. Other than that it should be OK.

There are also some cases where you may still want to use pow of 2
textures, because of the texture rect speed issues, but that is an
other story.On Friday 18 May 2007, Kostas Kostiadis wrote:

Hello all,

When loading in textures via SDL_image and then sticking them onto
SDL surfaces, do you have to worry about power-of-two stuff?
OpenGL 2.0 handles NPOTs in the core, assuming your hardware supports
the ARB_texture_non_power_of_two extension.
Is SDL/SDL_image ok with NPOT textures?