GL_PROXY_TEXTURE_3D

From the blue book:

 void [b]glTexImage3D[/b](GLenum [i]target[/i],
GLint [i]level[/i],
GLenum [i]internalformat[/i],
GLsizei [i]width[/i],
GLsizei [i]height[/i],
GLsizei [i]depth[/i],
GLint [i]border[/i],
GLenum [i]format[/i],
GLenum [i]type[/i],
const GLvoid *[i]pixels[/i]) 

If target is GL_PROXY_TEXTURE_3D … if the implementation cannot handle a texture of the requested texture size, it sets all of the image state to 0, but does not generate an error …

Anyone know what exactly gets set to 0? Is it one of the parameters to glTexImage3D maybe? I know my texture is too big, but the blue book says to use the above to find out if a texture is too large, as opposed to glGet(GL_MAX_TEXTURE_SIZE);

[This message has been edited by ffish (edited 04-24-2001).]

i think if the texture don’t fit into memory all texture-vars like width, height etc. are set to 0, so that you can decide which var to use for errorcheck !?!

No, I checked before. Also, my width, height, depth parameters are declared const, so they’re immutable. The only one that I can’t be sure of is the image data itself, maybe that is set to null?

I did a simple test that prints pixels[0] but I’m compiling under Visual C++ and the data files are in (Li/U)nix format so I don’t know what value the “correct” one would be - in any case it doesn’t print “0”, it prints nothing, or maybe “\0” - but I don’t know if that is the data value at that point in the file.

Thanks anyway

[This message has been edited by ffish (edited 04-24-2001).]

I guess it is the same mechanism as for GL_PROXY_TEXTURE_2D. From the red book:

"A special place holder, or proxy, for a texture image allows the program to query more accurately
whether OpenGL can accommodate a texture of a desired internal format. To use the proxy to query
OpenGL, call glTexImage2D() with a target parameter of GL_PROXY_TEXTURE_2D and the
given level, internalFormat, width, height, border, format, and type. (For one-dimensional textures,
use corresponding 1D routines and symbolic constants.) For a proxy, you should pass NULL as the
pointer for the pixels array.

To find out whether there are enough resources available for your texture, after the texture proxy has
been created, query the texture state variables with glGetTexLevelParameter*(). If there aren’t
enough resources to accommodate the texture proxy, the texture state variables for width, height,
border width, and component resolutions are set to 0."

Oh, thanks Mango. I should have looked harder I found the part in the red book on texture proxies now.