diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-10-22 12:10:30 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-10-22 12:10:30 -0600 |
commit | 1b4852345954af9b582b03a91a3d8399b8fb0e92 (patch) | |
tree | ac81b602940c3b854bf1a0b511cc3218da3a9c7a /src/mesa/state_tracker/st_atom_rasterizer.c | |
parent | 22e5c4f0f09cff64039b171c5cee6def07395e1f (diff) | |
download | external_mesa3d-1b4852345954af9b582b03a91a3d8399b8fb0e92.zip external_mesa3d-1b4852345954af9b582b03a91a3d8399b8fb0e92.tar.gz external_mesa3d-1b4852345954af9b582b03a91a3d8399b8fb0e92.tar.bz2 |
add support for sprite texcoord modes
Diffstat (limited to 'src/mesa/state_tracker/st_atom_rasterizer.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index 9fbd7dc..9f857e2 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -74,6 +74,7 @@ static void update_raster_state( struct st_context *st ) GLcontext *ctx = st->ctx; struct pipe_rasterizer_state raster; const struct cso_rasterizer *cso; + uint i; memset(&raster, 0, sizeof(raster)); @@ -189,6 +190,17 @@ static void update_raster_state( struct st_context *st ) raster.point_size = ctx->Point.Size; raster.point_smooth = ctx->Point.SmoothFlag; raster.point_sprite = ctx->Point.PointSprite; + for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { + if (ctx->Point.CoordReplace[i]) { + if (ctx->Point.SpriteOrigin == GL_UPPER_LEFT) + raster.sprite_coord_mode[i] = PIPE_SPRITE_COORD_UPPER_LEFT; + else + raster.sprite_coord_mode[i] = PIPE_SPRITE_COORD_LOWER_LEFT; + } + else { + raster.sprite_coord_mode[i] = PIPE_SPRITE_COORD_NONE; + } + } /* _NEW_LINE */ |