Skip to content
  • Nicolai Hähnle's avatar
    Various fixes by Brian Paul. · ad03bd4d
    Nicolai Hähnle authored
    Quote from his description:
    In fp-fragment-position.c the 4th fragment program uses
    fragment.position to index a 2D texture.  Since all the fragment
    positions are integers > 1 the default GL_REPEAT texture wrap mode
    converts all the texcoords to zero.  Actually, though, that's not true.
      Because of the way texcoords are processed, the fractional part of the
    coords is not always zero but some epsilon value.  That caused us to
    sample with different texcoords than the test expects.
    
    I think it's more useful to scale the fragment position to put it into
    the nominal [0,1] range to get a color that varies per pixel.
    
    My patch does that, and adds some assorted comments to the code.
    
    ---
    
    In fp-list-mask.c and texrect-many.c and texdepth.c I added GLUT_ALPHA
    to glutInitDisplayMode().  We had failures because GLUT was sometimes
    choosing visuals without an alpha channel.
    
    ---
    <
    The logic in vp-bad-program.c was incorrect.  When glProgramString() is
    called with an invalid program, we raise an error, but the previous
    program (if any) stays in effect.  So the subsequent glBegin() would
    never raise an error.  The proper way to check for glBegin raising an
    error with an invalid program is to simply bind a non-existant program.
    
    I made the same fix in glean a while ago.
    
    There's still some other failures I need to look into (and I'm not sure
    where the faults are) but I need to move onto some other things now.
    ad03bd4d