mesa: refactor: move glReadPixels code into new readpix.c file
[mesa.git] / src / mesa / main / points.c
index c6b032460e81f5fe54189b8a9fd9986430850ea2..fbedbcb22c497756a6e607f76c0d08070c73bb38 100644 (file)
@@ -5,9 +5,9 @@
 
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.1
+ * Version:  7.0
  *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -65,45 +65,32 @@ _mesa_PointSize( GLfloat size )
 
 #if _HAVE_FULL_GL
 
-/*
- * Added by GL_NV_point_sprite
- */
+
 void GLAPIENTRY
-_mesa_PointParameteriNV( GLenum pname, GLint param )
+_mesa_PointParameteri( GLenum pname, GLint param )
 {
    const GLfloat value = (GLfloat) param;
-   _mesa_PointParameterfvEXT(pname, &value);
+   _mesa_PointParameterfv(pname, &value);
 }
 
 
-/*
- * Added by GL_NV_point_sprite
- */
 void GLAPIENTRY
-_mesa_PointParameterivNV( GLenum pname, const GLint *params )
+_mesa_PointParameteriv( GLenum pname, const GLint *params )
 {
    const GLfloat value = (GLfloat) params[0];
-   _mesa_PointParameterfvEXT(pname, &value);
+   _mesa_PointParameterfv(pname, &value);
 }
 
 
-
-/*
- * Same for both GL_EXT_point_parameters and GL_ARB_point_parameters.
- */
 void GLAPIENTRY
-_mesa_PointParameterfEXT( GLenum pname, GLfloat param)
+_mesa_PointParameterf( GLenum pname, GLfloat param)
 {
-   _mesa_PointParameterfvEXT(pname, &param);
+   _mesa_PointParameterfv(pname, &param);
 }
 
 
-
-/*
- * Same for both GL_EXT_point_parameters and GL_ARB_point_parameters.
- */
 void GLAPIENTRY
-_mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
+_mesa_PointParameterfv( GLenum pname, const GLfloat *params)
 {
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -115,6 +102,9 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
               return;
            FLUSH_VERTICES(ctx, _NEW_POINT);
             COPY_3V(ctx->Point.Params, params);
+            ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
+                                      ctx->Point.Params[1] != 0.0 ||
+                                      ctx->Point.Params[2] != 0.0);
          }
          else {
             _mesa_error(ctx, GL_INVALID_ENUM,
@@ -231,26 +221,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.
  *
@@ -266,7 +236,6 @@ _mesa_init_point(GLcontext *ctx)
 
    ctx->Point.SmoothFlag = GL_FALSE;
    ctx->Point.Size = 1.0;
-   ctx->Point._Size = 1.0;
    ctx->Point.Params[0] = 1.0;
    ctx->Point.Params[1] = 0.0;
    ctx->Point.Params[2] = 0.0;