So, I was playing 'foobillard' today and noticed that the table was
drawn differently on my 965gm laptop compared with the i830 laptop
sitting next to it.

The difference is generated from a texture:

        glGenTextures(1,&tabletexbind);
        
load_png("tabletex_fB_256x256.png",&tabletexw,&tabletexh,&depth,&tabletexdata);
        glBindTexture(GL_TEXTURE_2D,tabletexbind);
        gluBuild2DMipmaps(GL_TEXTURE_2D, 1, tabletexw, tabletexh, GL_LUMINANCE,
                          GL_UNSIGNED_BYTE, tabletexdata);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 
options_tex_min_filter);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, 
options_tex_mag_filter);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);

It seems unlikely to me that GL_CLAMP was really desired, I think that's
supposed to blend the edge pixel with the border color, and the program
doesn't bother to set a border color. Setting it to GL_CLAMP_TO_EDGE
'fixes' the problem, making the program look identical on 965gm and
i830.

Neither the i830 nor 965gm actually support GL_CLAMP natively (yay for
d3d-only hardware). The different appearance is caused by the 965 driver
mapping GL_CLAMP to GL_CLAMP_TO_BORDER while the i830 maps it to
GL_CLAMP_TO_EDGE. The 965 driver has a comment saying that glconform
prefers GL_CLAMP_TO_BORDER, while the i830 has a comment saying that the
Windows GL driver uses GL_CLAMP_TO_EDGE.

Several other drivers (savage, sis, unichrome) map GL_CLAMP to
GL_CLAMP_TO_EDGE.

What should I do now?

 1) Fix the 965 driver to make GL_CLAMP work correctly (icky, and will
be slower).
 2) Use GL_CLAMP_TO_EDGE in the 965 driver.
 3) Use GL_CLAMP_TO_BORDER in the i830 driver.
 4) Nothing.

-- 
[EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to