st_atom_clip.c File Reference

Include dependency graph for st_atom_clip.c:

Go to the source code of this file.

Functions

static void update_clip (struct st_context *st)

Variables

struct st_tracked_state st_update_clip


Function Documentation

static void update_clip ( struct st_context st  )  [static]

Definition at line 41 of file st_atom_clip.c.

References st_context::clip, st_context::ctx, pipe_clip_state::nr, st_context::pipe, PIPE_MAX_CLIP_PLANES, pipe_context::set_clip_state, st_context::state, and pipe_clip_state::ucp.

00042 {
00043    struct pipe_clip_state clip;
00044    GLuint i;
00045 
00046    memset(&clip, 0, sizeof(clip));
00047 
00048    for (i = 0; i < PIPE_MAX_CLIP_PLANES; i++) {
00049       if (st->ctx->Transform.ClipPlanesEnabled & (1 << i)) {
00050          memcpy(clip.ucp[clip.nr], 
00051                 st->ctx->Transform._ClipUserPlane[i], 
00052                 sizeof(clip.ucp[0]));
00053          clip.nr++;
00054       }
00055    }
00056       
00057    if (memcmp(&clip, &st->state.clip, sizeof(clip)) != 0) {
00058       st->state.clip = clip;
00059       st->pipe->set_clip_state(st->pipe, &clip);
00060    }
00061 }


Variable Documentation

struct st_tracked_state st_update_clip

Initial value:

 {
   "st_update_clip",                                    
   {                                                    
      (_NEW_TRANSFORM),                                 
      0,                                                
   },
   update_clip                                          
}

Definition at line 64 of file st_atom_clip.c.


Generated on Tue Sep 29 06:25:51 2009 for Gallium3D by  doxygen 1.5.4