glTexImage3DEXT Error !!!

Started by
-1 comments, last by funkeejeffounet 19 years ago
Hi, I am loading some big textures in my code and sometime they do cannot be binded(I get a fatal Error). So I've been making some querries(GL_PROXY_TEXTURE_3D) to test if my texture can be binded. What is weird is that glGetTexLevelparameter gives me positives answers but when actually using glTexParmater with my pointer to the data, the code generates an Error. Also, how can we have more specific specs about the openGL implementation of 3D textures? I would like to know what sizes(width, height, depth) are ok in 3D space (not a 4096 * 4096 answer)? Same thing but with borders this time? And most important, what are the tolerated sizes for NPOT 3D textures? I have a GF6600 256MB, so I can't understant why I am having errors when loading a 512*64*64 texture using borders(without borders it is OK though). Here is the code where proxy queries do fine, but glTexParameter gets funky: glTexParameteri(GL_PROXY_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_PROXY_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_PROXY_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_PROXY_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); glTexParameteri(GL_PROXY_TEXTURE_3D, GL_TEXTURE_WRAP_R_EXT, GL_REPEAT); glTexImage3DEXT(GL_PROXY_TEXTURE_3D, 0, 1, width+2, height+2, depth+2, 1, GL_RED, GL_UNSIGNED_BYTE, NULL); for (i=0; i<5; i++) params = -1; glGetTexLevelParameteriv(GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, params); glGetTexLevelParameteriv(GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_HEIGHT, params + 1); glGetTexLevelParameteriv(GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_DEPTH, params + 2); glGetTexLevelParameteriv(GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_BORDER, params + 3); glGetTexLevelParameteriv(GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_INTERNAL_FORMAT, params + 4); for (i=0; i<5; i++) printf("%d\n", params); //Returned values are OK glGenTextures(1, &main_texture); glBindTexture(GL_TEXTURE_3D, main_texture); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R_EXT, GL_REPEAT); glTexImage3DEXT(GL_TEXTURE_3D, 0, 1, width+2, height+2, depth+2, 1, GL_RED, GL_UNSIGNED_BYTE, texture3D); //Code hangs......... Bonus : Is there a utility to know how much of the GPU RAM is unused, and that gives up real time hardware specs like this? Thanks in advance, Jeff.

This topic is closed to new replies.

Advertisement