X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fpoints.c;h=fbedbcb22c497756a6e607f76c0d08070c73bb38;hb=d960a0621d65ae9977efe9bbb51dce9e1571b114;hp=c6b032460e81f5fe54189b8a9fd9986430850ea2;hpb=caf8010652f77e7687c0a3b7c267ba49d0a24d74;p=mesa.git diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index c6b032460e8..fbedbcb22c4 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -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, ¶m); + _mesa_PointParameterfv(pname, ¶m); } - -/* - * 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;