Compressed textures with devil

Started by
1 comment, last by Physics 15 years, 7 months ago
how i can generate compressed textures (mimpmaped) with DevIL? i read DevIL user guide and enabled ILUT parameters but it dos not work, my graphic card support compressed textures ( is NV_Geforce 8500)
Advertisement
Are you talking about DXT compressed textures?
I hadn't exactly figured it out but it goes something like this

ilInit();ilGenImages(1, &imageID);ilBindImage(imageID);hfile=fopen(pfilePath, "rb");if(hfile==0){   ERROR;}fclose(hfile);ilLoadImage((schar *const)pfilePath);


then I'm not sure. I experimented with
ilGetInteger(IL_IMAGE_BITS_PER_PIXEL)
Width=ilGetInteger(IL_IMAGE_WIDTH);
Height=ilGetInteger(IL_IMAGE_HEIGHT);
Depth=ilGetInteger(IL_IMAGE_DEPTH);
ilvalue=ilGetInteger(IL_IMAGE_CUBEFLAGS);

Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Are you enabling ILUT_GL_USE_S3TC and ILUT_GL_GEN_S3TC?

This topic is closed to new replies.

Advertisement