View Full Version : GluBuildMipMaps() creates a border on ATI cards?

03-09-2006, 01:03 PM
This projected texture is drawn with a border on some of my users' ATI cards. I am clamping the texture, and the outer edges of the image itself are completely white. My guess is ATI's implementation of gluBuildMipMaps() samples a "null" pixel along the outer edge of the texture? The border parameter in glTexImage is set to 0, of course.


03-09-2006, 02:22 PM
Have you set the wrapping mode to GL_CLAMP_TO_EDGE? Default wrapping mode, GL_CLAMP, clamps the texture coordinates at [0, 1], which is on the edge between the texture and the border. Since you didn't specify any border data, you get the default border color which is black. So the edges of the texture is 50% black and 50% texture with the default wrapping mode and default border color.

03-09-2006, 04:19 PM
for projecting texture u should use CLAMP_TO_BORDER + not clamp_to_edge ( be aware noty all hardware supports it)
just make the border color some non visable color.
if u use clamp_to_edge then u have to create your own border anyways by not rendering to the outside 1 pixel of the texture (or else u have visual artifacts)

03-09-2006, 04:53 PM
It looks like setting GL_TEXTURE_BORDER_COLOR to [1,1,1,1] would be the simplest way out. Any comments on this?

03-10-2006, 04:47 AM
I love the 'Who gave you permission to link to this ? Not me. noelcower.com' instead of the picture.

This is so friendly :D

03-10-2006, 08:30 AM
You'd think he would want me to solve the problem, since he was the one complaining about it.

03-10-2006, 08:41 AM
When you feel like paying for my bandwidth then you can make assumptions.

I try to help you and then you post my stuff on another forum without mirroring it yourself. Really, halo, you should know better. And I don't care about you solving the problem, since I have no reason to license your engine - I just thought I would be nice and try to help you root out problems with your code.

03-11-2006, 05:40 PM
Jesus, we transfer a gig a day. Lighten up.