View Full Version : textures with images which do not have a 2^n dimension
06-27-2001, 03:33 AM
Where can I find information about displaying exact images (I mean not interpolated) which do not have a 2^n dimension? This is for a 2D image viewer...
06-27-2001, 06:57 AM
You can't use a texture that doesn't have 2^n x 2^m dimensions without first converting it to 2^n x 2^m somehow unless you use an extension like NV_rectangle_texture (or some name like that, anyway.) http://www.opengl.org/discussion_boards/ubb/smile.gif You can use glDrawPixels to draw images that are not 2^n x 2^m. Another option might be to pad the image with black edges to make it 2^n x 2^m.
06-28-2001, 12:00 AM
I made a black texture with gluBuild2DMipmaps, and filled it with a glTexSubImage2D. The texture is always made, but the filling is only made for textures under 512*512????
06-28-2001, 06:24 AM
Ok. Two things come to mind. First, how big is your initial black texture? Second, I could be wrong about this because I haven't played with glTexSubImage2D with mipmaps before, but my initial thought is that if you just do that for the base level texture, I don't think it will automatically copy into the other mipmap levels for you. In order to do that you may have to use it on all the levels using something like gluScaleImage to scale it down for the smaller mipmaps.
06-28-2001, 11:58 PM
I think you are right when you say I must copy it the different levels. Does anybody know if there is something to apply always the same level (level 0), cause copying the image several times may be long, and take a lot a RAM room...
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.