PDA

View Full Version : Textures



TiX0
04-26-2002, 01:41 AM
Taking the first steps in OGL-programming I tried some texture binding - and didn't succeed with my own bmp-file. Binding the bmp of a sample-code brought the wanted result. NeHe claims that not every bitmap-size is allowed. So, what do I have to consider regarding the bitmaps size?

Thanks for your reply!!!

TiX0

Azdo
04-26-2002, 01:54 AM
Originally posted by TiX0: So, what do I have to consider regarding the bitmaps size?


Your textures' size must be powers of two: 16,32,64,128,256...

jimmi
04-26-2002, 02:15 AM
if your bitmap hasn't got dimensions which are a power of 2, you can use gluScaleImage to resize it.

jimmi

Furrage
04-26-2002, 06:06 AM
I thought the minimum texture size was 64. In that case 32 and 16 don't count.
Originally posted by Azdo:
Your textures' size must be powers of two: 16,32,64,128,256...

Mazy
04-26-2002, 06:08 AM
The minimum is 1*1, the max is queryable.

Furrage
04-26-2002, 06:44 AM
Is that with mipmapping or you can load a 1*1 bitmap and create a level 0 texture with it? Chapter 9 of the Redbook in the definition of glTexImage2D() states "Both width and height must have the form 2m+2b, where m is a nonnegative integer (which can have a different value for width than for height) and b is the value of border. The maximum size of a texture map depends on the implementation of OpenGL, but it must be at least 64 64 (or 66 66 with borders)."
Originally posted by Mazy:
The minimum is 1*1, the max is queryable.

Gavin
04-26-2002, 07:44 AM
so what is 2^0 furrage? :-)

Deiussum
04-26-2002, 08:57 AM
Read your quote again, Furrage..

"The maximum size of a texture map depends on the implementation of OpenGL, but it must be at least 64 64 (or 66 66 with borders)."

Basically it's saying that the smallest an implementation can use for the MAXIMUM value is 64, not that the minimum must be 64. http://www.opengl.org/discussion_boards/ubb/smile.gif

In other words, you are guaranteed to at least have support up to 64x64.