I'm programming an experiment where we're using images that are much larger than the screen. The subject can click on a scaled-down overview map to zoom in on various parts of the image.
The problem is that the images are also too large to make textures on some computers. I'm using an Intel Core i7 iMac with 512MB of VRAM. When I try to turn the image (8466 x 3855 pixels) into a texture, I get the following error message:
PTB-ERROR: Texture creation failed or malfunctioned for a texture of requested size w x h = 3948 x 8480 texels
PTB-ERROR: and at least 4 bytes VRAM memory consumption per texel.
PTB-ERROR: Your image or texture exceeds the maximum width and/or height of 8192 texels supported by your graphics hardware.
PTB-ERROR: You'll have to either reduce the size of your images below that limit, or upgrade your hardware.
The machines we plan on using for testing have even less VRAM.
My solution is just to break up the image into tiles. But I would like some way of querying, within the program, what the maximum texture size would be (e.g., 8192 in this case) so I know when to engage in a tiling strategy, and when I can just pull out part of the array into a single texture.
I'm assuming there's some OpenGL command that will do this (I use glGetIntegerv for querying the maximum point size for DrawDots, for example), but I can't figure it out from the online OpenGL reference.
thanks
Todd
The problem is that the images are also too large to make textures on some computers. I'm using an Intel Core i7 iMac with 512MB of VRAM. When I try to turn the image (8466 x 3855 pixels) into a texture, I get the following error message:
PTB-ERROR: Texture creation failed or malfunctioned for a texture of requested size w x h = 3948 x 8480 texels
PTB-ERROR: and at least 4 bytes VRAM memory consumption per texel.
PTB-ERROR: Your image or texture exceeds the maximum width and/or height of 8192 texels supported by your graphics hardware.
PTB-ERROR: You'll have to either reduce the size of your images below that limit, or upgrade your hardware.
The machines we plan on using for testing have even less VRAM.
My solution is just to break up the image into tiles. But I would like some way of querying, within the program, what the maximum texture size would be (e.g., 8192 in this case) so I know when to engage in a tiling strategy, and when I can just pull out part of the array into a single texture.
I'm assuming there's some OpenGL command that will do this (I use glGetIntegerv for querying the maximum point size for DrawDots, for example), but I can't figure it out from the online OpenGL reference.
thanks
Todd