MipMap in Torque?
by Bendik Stang · in Torque Game Engine · 10/02/2002 (4:30 am) · 2 replies
I found no other topics on MipMap so I figured it was best to create one.
I'm using the fantastic fxRednerObject by Melv.
I have a texture handle, and I would like to enable minimation mipmaping.
I tried this with:
but since there is only one texture, it disables GL_TEXTURE_2D
I pressume that I will have to create some smaller textures on the fly, and that there is a code for this somewhere. Does anyone know where it is, and how to use it?
-Bendik
I'm using the fantastic fxRednerObject by Melv.
I have a texture handle, and I would like to enable minimation mipmaping.
I tried this with:
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
but since there is only one texture, it disables GL_TEXTURE_2D
I pressume that I will have to create some smaller textures on the fly, and that there is a code for this somewhere. Does anyone know where it is, and how to use it?
-Bendik
#2
Here is an update to anyone thas might be looking for an answer to this:
When loading the texture using:
To control the various types of minimation mipmaps you can set:
GL_NEAREST_MIPMAP_NEAREST
GL_LINEAR_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_LINEAR
I think that GL_LINEAR_MIPMAP_LINEAR gives the best result
These two options should disable mipmapping.
GL_LINEAR
GL_NEAREST
10/03/2002 (2:24 am)
Thanks Melv.Here is an update to anyone thas might be looking for an answer to this:
When loading the texture using:
if (*mTextureName) mTextureHandle = TextureHandle(mTextureName, MeshTexture, true);The texture is automatically mipmapped. If you use BitmapTexture instead of MeshTexture then the texture will not be mipmapped.
To control the various types of minimation mipmaps you can set:
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);With these options:
GL_NEAREST_MIPMAP_NEAREST
GL_LINEAR_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_LINEAR
I think that GL_LINEAR_MIPMAP_LINEAR gives the best result
These two options should disable mipmapping.
GL_LINEAR
GL_NEAREST
Associate Melv May
I posted a little help about this on your L-System link. See if that helps but if not then ask away. 8)
Cheers,
- Melv.