Hi everyone,
I have the following code which calls glTexImage3D with different texture size until 1285 error.
[b]
GLint maxSize = 0;
glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &maxSize);
GLuint texId;
glGenTextures(1, &texId);
glBindTexture(GL_TEXTURE_3D, texId);
printf("******************* glTexImage3D test *******************
");
printf("GL_MAX_3D_TEXTURE_SIZE: %d
", maxSize);
GLint xDim = maxSize;
GLint yDim = maxSize;
GLint zDim = maxSize;
int memory;
GLenum error = 1;
while(error)
{
memory = int(((double)xDim * (double)yDim * (double)zDim * 1.)/(1024*1024));
printf("Trying %d %d %d, Memory: %dM
", xDim, yDim, zDim, memory);
glTexImage3D(GL_TEXTURE_3D, 0, GL_ALPHA, xDim, yDim, zDim, 0, GL_ALPHA, GL_UNSIGNED_BYTE, NULL);
error = glGetError();
if (error)
printf("error %d
", error);
zDim -= 1;
}
[/b]
Results on winXP64 4Go and geForce GTX 580(1.5Go)
32bit exe:
…
Trying 2048 2048 1261, Memory: 5044M => error 1285
Trying 2048 2048 1260, Memory: 5040M => no error
64bit exe:
…
Trying 2048 2048 1518, Memory: 6072M => error 1285
Trying 2048 2048 1517, Memory: 6068M => no error
Results on winSeven64 12Go and Quadro FX 4000 (2Go)
32bit exe:
…
Trying 2048 2048 1420, Memory: 5680M => error 1285
Trying 2048 2048 1419, Memory: 5676M => no error
64bit exe:
Trying 2048 2048 2048, Memory: 8192M => no error
I don’t understand the results. Can someone explain the results to me please ?