GL_SGIS_generate_mipmap + glTexSubImage2D

Started by
2 comments, last by V-man 15 years, 6 months ago
I am having trouble getting automatic mipmap generation working when using glTexSubImage2D; I initially get nice mipmaps when allocting but when I replace data with glTexSubImage2D the levels from 1 to N are lost. The SGI extension spec looks ancient so I was hoping someone here has experience with automatic mipmap geneation when data is re-downloaded multiple times?
Advertisement
This feature went into core in GL 1.4 so it is no longer an SGI extension. Sounds like what you have is a driver bug.
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);
I am using the lastest NVIDIA driver (178.24) on Vista 64 bit - I am able to test this on a Linux distribution later this week; but I am kind of also asking since the *spec* at least the SGI extension is very unclear on what exactly will trigger mipmap generation if new data is downloaded (doesnt even mention downloading new data, just something about touching *edge pixels*)


The OpenGL 3.0 Specification refers to the SGI extension on page 431 but again doesnt clarify which API calls should be made for the mipmaps to be generated.
The old extension stated that whenever level 0 changes, the mipmaps would be regenerated.
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);

This topic is closed to new replies.

Advertisement