glGetTexLevelParameteriv not return compressed texture size

every time I use glGetTexLevelParameteriv() I get a texture size of 0 … here’s a snippet

glBindTexture(GL_TEXTURE_2D, texture[3]);
glHint(GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST);
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);

char info[1024];
int *size=0;
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, size);
sprintf(info, “%u”, size);
MessageBox(NULL, info, “GL Info”, MB_OK);

Am I being dumb here? The spec says …

  • Call GetTexLevelParameteriv with a <value> of
    TEXTURE_COMPRESSED_IMAGE_SIZE_ARB to determine the size (in ubytes)
    of the compressed image that will be returned by the GL. Allocate a
    buffer of at least this size.

Cheers

[This message has been edited by Shag (edited 03-03-2002).]

Nevermind … I’ve got it working