glTexImage2D problem with a large image

Hi All,

Displaying an image from 8192 x 300 pixels is no problem with

glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, ImageWidth, ImageHeight, 0,GL_LUMINANCE, GL_UNSIGNED_SHORT, addr(WordBuffer[0]));

But if I use this same function with an image of 12288 x 300 pixels nothing is being displayed.

Any idea why this is?
Is 12288 to large?

Thanks.

Peter.

Textures have size limitation, check for it with:

glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size);

glGetError returns GL_INVALID_VALUE.

Is glDrawPixels capable of displaying a large image?
In the past I used glTexImage2D because I wanted to manipulate the image on screen like glRotatef, glScalef and glTranslatef.

Are these functions also avaible for glDrawPixels?

Thanks

As already said, check glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size), that will tell you the maximum size, that is supported by your particular GPU.

However, to spoil the fun, i will tell you that there is currently no GPU that supports textures bigger than 8192 pixels in any one direction.

Jan.

You’re right. I tried glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size) but it returned 91537540. Bud I made an error.
I correct it and now it’s returning 8192.

I have modifed my code, so I replaced glTexImage2D by glDrawPixels. The first test shows an image of 12288 x 300.
Unfortunately the frame rate drops when zooming out (whole image on screen). Frame rate drops from 60Hz to 20Hz.

Thanks all for your help.

stay away from drawpixels.
just split your texture in several tiles.

Thanks.

Problem solved.