large bitmaps

Does anyone know how to break a large bitmap into smaller bit and then display them all in one screen? Having trouble reading in large bitmap of 24000k

thanks

having trouble allocating memory or…?

Originally posted by Gavin:
having trouble allocating memory or…?

I’m not sure. My program works ok with small bitmaps but when I increase the size to about 24000K it takes an age to load and when it loads the image is not in the window?

Thanks

That sounds bizarre…could you tell us how you are loading this texture in? That may shed some light. Me personally, bitmaps are simple enough that I looked up the structure and read the bits in myself. This seems to handle really large bitmaps no problem, how do you do it?

Originally posted by KShots:
That sounds bizarre…could you tell us how you are loading this texture in? That may shed some light. Me personally, bitmaps are simple enough that I looked up the structure and read the bits in myself. This seems to handle really large bitmaps no problem, how do you do it?

I’m using a GLuint texture[1] to store the image and the fuction is :

GLvoid CMicroscopeView::LoadGLTextures()
{
AUX_RGBImageRec *texture1;
texture1 = auxDIBImageLoad(“Data/bit.bmp”);
if (!texture1) exit(1);

// Create Texture
glGenTextures(1, &texture[0]);
glBindTexture(GL_TEXTURE_2D, texture[0]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, 3, texture1->sizeX, texture1->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, texture1->data);

}

i don’t think the glaux library is supported anymore. you may be safer loading the BMP file yourself, our using an external image library like DevIL.

jebus

You are aware that there is a max texture size for your graphics card!!! use glgetintegerv to check this size.

Originally posted by jebus:
[b]i don’t think the glaux library is supported anymore. you may be safer loading the BMP file yourself, our using an external image library like DevIL.

jebus[/b]

Thanks but,
What method are you talking about for loading a BMP? Also Can you use DevIL with OpenGL?

yes, you can use DevIL with OpenGL. For extreme cases I would recommend you to write your own bmp loader. BMP format is really simple (you can find information about file formats at www.wotsit.org ). Also it will help you understand how an image is stored in memory, which will be useful since you will have to break this image into several smaller images yourself.
As Gavin pointed out, an OpenGL implementation has a maximum texture size, which you can query by glGetIntegerv. This maximum texture size is probably the size you’ll use for your smaller images. Remember that OpenGL only accepts textures which width & height are powers of 2.

Originally posted by kehziah:
yes, you can use DevIL with OpenGL. For extreme cases I would recommend you to write your own bmp loader. BMP format is really simple (you can find information about file formats at www.wotsit.org ). Also it will help you understand how an image is stored in memory, which will be useful since you will have to break this image into several smaller images yourself.
As Gavin pointed out, an OpenGL implementation has a maximum texture size, which you can query by glGetIntegerv. This maximum texture size is probably the size you’ll use for your smaller images. Remember that OpenGL only accepts textures which width & height are powers of 2.

Thank you all for your help!!!