PDA

View Full Version : Mipmapping with Texture Compression



Neals Shnyder
04-29-2001, 01:31 AM
Hello there,

currently I pass my compressed texture to opengl through
glCompressedTexImage2DARB for 4 mipmapping depths, but if I enable
mipmapping through glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_LINEAR_MIPMAP_NEAREST ), I have only white faces that aren't textured. If
I set the min filter to GL_LINEAR or GL_NEAREST it works fine, except that I
don't have mipmaps. If I would use gluBuild2DMipmaps(...)m the mipmaps wouldn't be compressed, or am I wrong? Any other ideas how to create compressed mipmaps?

thx,
Nils

Michail Bespalov
04-29-2001, 03:12 AM
Hi
Don't forget to specify GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL.



If I would use gluBuild2DMipmaps(...)m the mipmaps wouldn't be compressed, or am I wrong?

Simply pass desired compressed format as internal format.

HFAFiend
04-29-2001, 09:27 AM
How do you set those (code? same way as you set the GL_LINEAR/GL_NEAREST?)

Neals Shnyder
05-02-2001, 09:55 AM
Well I tried that out now and it works, many thanks for that. I set it with glTexParameteriv(...)

Neals

Michail Bespalov
05-02-2001, 10:15 PM
Neals.
I forgot to say that these parameters are available only in the OpenGL 1.2 or if you have EXT_texture_lod (if I remeber right)extension,if you are using OpenGL 1.1 you have to supply all mipmaps levels.
Correct me if I'm wrong.