Mipmap Borders

Although the RedBook seems to be very vague about this, the OpenGL SuperBible seems to state that mipmaps may have a border of 0,1 or 2 pixels on each side, IN ADDITION to the 2^x pixel height and width.

Assume that I want all my mipmaps to use a border width of 1 pixel (‘borrowed’ from the adjacent texture so that filtering is seamless across tiled textures)…

With the 3dfx texture limit of 256 pixels on a side, should I be creating textures with 254 pixels on a side and 1 pixel on each side for a border for a total of 256x256, or should I create the texture at 256 pixels on a side and then add the one pixel border for a total texture size of 258x258?

Also, anyone know how to specify non-zero border widths using gluBuild2DMipmaps() or gluBuild2DMipmapLevels()?

Thanks in advance.

I am too lazy too read in the book tonight, but in the redbook it is written If I remember well in the texture mapping section that the border is not taken in account when calculating the size of the limit.

but I’ll give you the best of all answers, just try it. If the texture get messed up then you need to take it in account!!!


Thanks for your reply. I’ll try it out, and if anyone is interested, I can post the results here.



I would be interested in what you find out. I am attempting to learn OpenGL while wrestling with the same problem. A post on the Beginners board said that many hardware implementations don’t support border pixels either.

Here’s the post: http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/000400.html