[SDL] SDL stretching surfaces

Vasileiou Nikolaos nbasili at ceid.upatras.gr
Thu Sep 26 03:12:00 PDT 2002


Thanks alot




On 25 Sep 2002, DrEvil wrote:

> On Wed, 2002-09-25 at 10:42, Vasileiou Nikolaos wrote:
> > 
> > Hi,
> > Is there any way to stretch (resize) an SDL Surface?
> > It is quite usefull for making a surface combatible for usage as an 
> > openGL texture which is not power of two.
> 
> Some texture resampling code for resampling -- BSD license:
> 
> http://zerowing.idsoftware.com/viewcvs/viewcvs.cgi/*checkout*/GtkRadiant/radiant/texmanip.cpp?rev=1.1&content-type=text/plain
> 
> 
> 
> Example of how to use it (don't copy and paste this code, just read it
> to see how to use the resampling code -- iD Software License):
> 
> Look for this function:
> QERApp_LoadTextureRGBA
> 
> In this link:
> http://zerowing.idsoftware.com/viewcvs/viewcvs.cgi/*checkout*/GtkRadiant/radiant/texwindow.cpp?rev=1.41.2.16&only_with_tag=Stable-1_2&content-type=text/plain
> 
> 
> That's the way I do it for GtkRadiant, to resample textures to a power
> of 2 size. I'm sure it could be done better. But that works quite well.
> 
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 





More information about the SDL mailing list