Size Of Texturing

Hi, it’s my first post in here. I wanna ask about texturing.
when i bind my polygon with texture (jpg). the holder array can’t stand about > 256x256 pixels (because i use read file structure). How can I get the solution about binding that texture (>256x256 pixel)?

Nikki Joe,
Are you talking about the limit of an array size in C/C++?

If so, use malloc/free for C, new/delete for C++.

Hm… Nope. But allocate an bitmap file to array to create texture. Like NeHe Tutorial when binding texture.

i hope this helps! :slight_smile:

Is that because a limitation?

i dunt know about that im very new but i lke opengl redbook becuz it help me to learn! :slight_smile:

good luck to u nikki! :smiley:

maybe u need good c tut too? i dont know rit now but i look for u if u want :confused:

thanx songho, i’ve read that a lot. Hm… I should create a bitmap file according to 256x256 to protect the array allocation. Am I right?

I thought it is about the limit of array size in stack, because 256x256 = 65536. You can allocate a memory block greater than 64K (65536 bytes) by using malloc/free or new/delete. (in the heap)

Also, OpenGL has the size limit of texture, for examlpe, 2048x2048 pixels. To make sure the maximum size of a texture that your video card supports;

int maxTextureSize;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);

In 32bit C/C++ there is no limit on size of array or stucture on the stack other than size of the stack itself (in Windows it defaults to 1MB).

I have a problem with GL_MAX_TEXTURE_SIZE. I am working on windows and before updating the driver GL_MAX_TEXTURE_SIZE returned the correct max texture size. Now it return twice the size but when I try to render the texture is not rendered. Could this be a driver bug or a software bug? I am coding in java (JOGL) on a NVIDIA GeForce4 MX 440 AGP8X graphic card (I know, it is a relative old graphic card).
Thank you!