Re: how does one resize images to be used for textures?
Re: how does one resize images to be used for textures?
- Subject: Re: how does one resize images to be used for textures?
- From: Carlos Weber <email@hidden>
- Date: Thu, 5 Jul 2001 07:50:10 -1000
On Thursday, July 5, 2001, at 06:16 , email@hidden wrote:
I'm trying to load images of arbitrary dimensions, to be used as OpenGL
textures. The textures have to have dimensions of powers of 2. Is there
a way to resize these things? The setSize method of NSImageRep does not
seem to do the job. My code is below. It works on images that already
have dimensions as powers of two.
One option is to use gluScaleImage() to... well, scale the image so that
it does have dimensions of 2 to the nth.