ctx->Point._Size fix
authorRune Peterson <rune@megahurts.dk>
Sun, 11 Feb 2007 01:19:43 +0000 (18:19 -0700)
committerBrian <brian@yutani.localnet.net>
Sun, 11 Feb 2007 01:19:43 +0000 (18:19 -0700)
src/mesa/main/points.c
src/mesa/main/points.h
src/mesa/main/state.c

index c6b032460e81f5fe54189b8a9fd9986430850ea2..9caa9ab3ab2194f1d172ba281db50af54fddaa10 100644 (file)
@@ -57,6 +57,13 @@ _mesa_PointSize( GLfloat size )
 
    FLUSH_VERTICES(ctx, _NEW_POINT);
    ctx->Point.Size = size;
+   ctx->Point._Size = CLAMP(ctx->Point.Size,
+                           ctx->Point.MinSize,
+                           ctx->Point.MaxSize);
+
+   ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
+                             ctx->Point.Params[1] != 0.0 ||
+                             ctx->Point.Params[2] != 0.0);
 
    if (ctx->Driver.PointSize)
       ctx->Driver.PointSize(ctx, size);
@@ -231,26 +238,6 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
 
 
 
-/**
- * Update derived point-related state.
- */
-void
-_mesa_update_point(GLcontext *ctx)
-{
-   /* clamp to user-specified limits now, clamp to ctx->Const.Min/Max
-    * limits during rasterization.
-    */
-   ctx->Point._Size = CLAMP(ctx->Point.Size,
-                           ctx->Point.MinSize,
-                           ctx->Point.MaxSize);
-
-   ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
-                             ctx->Point.Params[1] != 0.0 ||
-                             ctx->Point.Params[2] != 0.0);
-}
-
-
-
 /**
  * Initialize the context point state.
  *
index 56acd9ee57445822545c030669ee8059532f1c7d..951ff677db448cadbe525c5f45ca10d6cbb52973 100644 (file)
@@ -50,9 +50,6 @@ _mesa_PointParameterfEXT( GLenum pname, GLfloat param );
 extern void GLAPIENTRY
 _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params );
 
-extern void
-_mesa_update_point(GLcontext *ctx);
-
 extern void 
 _mesa_init_point( GLcontext * ctx );
 
index 55fb4552d2b7a8580d22533076f56e4347878142..f4f73a5089fae342715fa88060e70559eddb66f5 100644 (file)
@@ -1111,9 +1111,6 @@ _mesa_update_state_locked( GLcontext *ctx )
    if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT))
       _mesa_update_draw_buffer_bounds( ctx );
 
-   if (new_state & _NEW_POINT)
-      _mesa_update_point( ctx );
-
    if (new_state & _NEW_LIGHT)
       _mesa_update_lighting( ctx );