# Size of an image?

Could anyone tell me what is the maximum size of image that opengl can work with? Also I heard that it could only work with images that are in a power of 2? Does this mean that the image will have to be a square? Or can it work with say 1k by 2K?

Thanks

If you mean texture images:
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &i);
implementation specific value. Minmum supported resultion must be 64. Power of two is meant for each side separately. Any combination 2^n * 2^m should work if you don’t exceed the GL_MAX_TEXTURE_SIZE.
For non-power of two textures have a look for the texture_rectangle extension.

(If you meant screen size look for GL_MAX_VIEWPORT_DIMS.)

[This message has been edited by Relic (edited 12-06-2002).]

Relic,

Thanks.

You say resolution must be 64. what does 64 mean?

Originally posted by Relic:
[b]If you mean texture images:
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &i);
implementation specific value. Minmum supported resultion must be 64. Power of two is meant for each side separately. Any combination 2^n * 2^m should work if you don’t exceed the GL_MAX_TEXTURE_SIZE.
For non-power of two textures have a look for the texture_rectangle extension.

(If you meant screen size look for GL_MAX_VIEWPORT_DIMS.)

[This message has been edited by Relic (edited 12-06-2002).][/b]

the minimum width and height of a texture image is 64. it must be at least 64 X 64 pixels.

Originally posted by SThomas:
the minimum width and height of a texture image is 64. it must be at least 64 X 64 pixels.

So many people seem to think this. There is no minimum size for a texture.
What there IS however, is an implementation dependent maximum texture size. OpenGL requires that THIS is at least 64.

So ff I code:
int I;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &I);

‘I’ should tell me the max integer value that my texture can hold? I have tried this and it gives me the value of 84? Also could anyone give me a briefing on what a texture is? Is it related to my graphics card?

Originally posted by SThomas:
the minimum width and height of a texture image is 64. it must be at least 64 X 64 pixels.

Originally posted by Bakery2k:
So many people seem to think this. There is no minimum size for a texture.
What there IS however, is an implementation dependent maximum texture size. OpenGL requires that THIS is at least 64.

of course, how retarded of me. thanks for the correction.

Well, 84 is definitely not correct. Probably a typo?

The max_texture_size value is the maximum edge length of a full RGBA texture with all mipmap levels plus borders your OpenGL implementation (driver | graphics card) can handle.

Search for the RedBook.pdf on the web and download it (it’s only 8MB). Read chapter 9 for texture mapping.