tags:

views:

147

answers:

1

I'm currently using the automatic mipmap generation (C# + OpenTK):

GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);

The texture I'm using is tiled into blocks of 16px². So my questions would be:

  • Is it possible to use a mipmap which doesn't get downsized to 1x1?
  • What would be the best way to create a mipmap which doesn't "blur" the blocks into another?
+2  A: 

You mean, using a mipmap chain that doesn't get up to 1x1? You can limit which levels can be used with glTexParameter, see the GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL parameters.

I don't understand your second question, if you mean using your own generated mipmaps, see the level parameter of glTexImage2D, with it you can upload your own mipmaps, filtered in any way.

Matias Valdenegro
Thanks, that pointed it out. In retrospect, my second question was a little stupid. I'll try to avoid asking multiple questions at once :)
copyboy
@copyboy: not that stupid. There is literature on the subject. It revolves around doing power-of-two subsets, and leaving space between the atlas sub-textures (also important for proper mip-mapping)
Bahbar