Creating my own custom mipmaps

Started by
2 comments, last by Hybrid666 16 years, 11 months ago
Hi, I want the option in my texture loader to load custom mipmap textures rather than letting OpenGL build them for me (glGenerateMipmapEXT or whatever) So if i have an image, and N mipmap images (created in photoshop or whatever), how do I load that as a texture in OpenGL? Also, assuming my first question is possible, do subsequent mipmaps need to be half the width/height of the next larger one, and can i control the distances from the viewer at which the mipmaps are used in the renderer? Thanks in advance, Hybrid
Advertisement
Like the first mipmap level, you load every mipmap level with glTexImage. And yes, lower mipmap levels must be half the size of upper mipmap levels. Be aware of the rules regarding odd sizes; you must round the size downwards of the previous size was an odd number.
Hi,

Its all fine and dandy that you can figure out the texture width and height
but you also need the textures size if you are using DDS textures.
for this you will need ATI_Compress library to read/write/convert to
DDS textures.

link: http://ati.amd.com/developer/compress.html

look into this minification "GL_LINEAR_MIPMAP_LINEAR"

also the function "glCompressedTexImage2DARB"

If you are not using DDS texture you should seriously think about it.

I hope this helps


Nicholas ChristopherArchitecture Software Developer, 3D Modelerhttp://www.arconovum.com
Thanks for the help guys that's sorted me out! Can't believe I'd never relaised what the "level" parameter was for!

And regarding DDS textures.. I'll take a look into it ;)

Thanks again,
Hybrid

This topic is closed to new replies.

Advertisement