~ubuntu-branches/ubuntu/raring/mesa/raring-proposed

« back to all changes in this revision

Viewing changes to src/mesa/main/clip.c

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2011-06-19 21:26:00 UTC
  • mfrom: (1.6.1 upstream) (3.3.18 sid)
  • mto: (3.3.20 sid)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: james.westby@ubuntu.com-20110619212600-rleaapdmnbtstekb
Tags: 7.11~0-2
Thank you sbuild for giving a green light when that's not actually the
case. Fix missing Pre-Depends for the libegl1-mesa-drivers package
(multiarch-support).

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "math/m_matrix.h"
33
33
 
34
34
 
35
 
 
36
 
/**********************************************************************/
37
 
/*                     Get/Set User clip-planes.                      */
38
 
/**********************************************************************/
39
 
 
 
35
/**
 
36
 * Update derived clip plane state.
 
37
 */
 
38
void
 
39
_mesa_update_clip_plane(struct gl_context *ctx, GLuint plane)
 
40
{
 
41
   if (_math_matrix_is_dirty(ctx->ProjectionMatrixStack.Top))
 
42
      _math_matrix_analyse( ctx->ProjectionMatrixStack.Top );
 
43
 
 
44
   /* Clip-Space Plane = Eye-Space Plane * Projection Matrix */
 
45
   _mesa_transform_vector(ctx->Transform._ClipUserPlane[plane],
 
46
                          ctx->Transform.EyeUserPlane[plane],
 
47
                          ctx->ProjectionMatrixStack.Top->inv);
 
48
}
40
49
 
41
50
 
42
51
void GLAPIENTRY
78
87
   FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
79
88
   COPY_4FV(ctx->Transform.EyeUserPlane[p], equation);
80
89
 
81
 
   /* Update derived state.  This state also depends on the projection
82
 
    * matrix, and is recalculated on changes to the projection matrix by
83
 
    * code in _mesa_update_state().
84
 
    */
85
90
   if (ctx->Transform.ClipPlanesEnabled & (1 << p)) {
86
 
      if (_math_matrix_is_dirty(ctx->ProjectionMatrixStack.Top))
87
 
         _math_matrix_analyse( ctx->ProjectionMatrixStack.Top );
88
 
 
89
 
      _mesa_transform_vector( ctx->Transform._ClipUserPlane[p],
90
 
                           ctx->Transform.EyeUserPlane[p],
91
 
                           ctx->ProjectionMatrixStack.Top->inv );
 
91
      _mesa_update_clip_plane(ctx, p);
92
92
   }
93
93
 
94
94
   if (ctx->Driver.ClipPlane)