Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=4996          
     
           Summary: Restoring texture attribute group breaks texgen eye
                    plane
           Product: Mesa
           Version: 6.4
          Platform: PC
               URL: http://memfrob.de/~memfrob/texgen_test.c
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Mesa core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Mesa does not correctly restore the plane equations for eye linear texture
coordinate generation, when saving/restoring the texture attribute group.

Looking through the mesa-6.4 source, i noticed the following code in
pop_texture_group (src/mesa/main/attrib.c), which seems to be the
culprit:

  _mesa_TexGenfv(GL_S, GL_EYE_PLANE, unit->EyePlaneS);
  _mesa_TexGenfv(GL_T, GL_EYE_PLANE, unit->EyePlaneT);
  _mesa_TexGenfv(GL_R, GL_EYE_PLANE, unit->EyePlaneR);
  _mesa_TexGenfv(GL_Q, GL_EYE_PLANE, unit->EyePlaneQ);


As the eye plane is stored in eye space, this restoration pattern
again transforms the to-be-restored equation with the modelview matrix
active while glPopAttrib is called, and thereby corrupting the
equation.


A simple glut application, that demonstrates the mentioned behaviour
can be downloaded at

  http://memfrob.de/~memfrob/texgen_test.c

A sample screenshot is also available

  http://memfrob.de/~memfrob/texgen_test_result.png


The application simply draws three textured cubes, with active eye
linear texture coordinate generation.  Before the second cube is
drawn, the texture attribute group is saved, and then restored before
the third cube is drawn.          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to