Пример #1
0
void GL_APIENTRY
_mesa_PointParameterxv(GLenum pname, const GLfixed *params)
{
   unsigned int i;
   unsigned int n_params = 3;
   GLfloat converted_params[3];

   switch(pname) {
   case GL_POINT_SIZE_MIN:
   case GL_POINT_SIZE_MAX:
   case GL_POINT_FADE_THRESHOLD_SIZE:
      n_params = 1;
      break;
   case GL_POINT_DISTANCE_ATTENUATION:
      n_params = 3;
      break;
   default:
      _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM,
                  "glPointParameterxv(pname=0x%x)", pname);
      return;
   }

   for (i = 0; i < n_params; i++) {
      converted_params[i] = (GLfloat) (params[i] / 65536.0f);
   }

   _mesa_PointParameterfv(pname, converted_params);
}
void GLAPIENTRY
_mesa_PointParameterf( GLenum pname, GLfloat param)
{
   GLfloat p[3];
   p[0] = param;
   p[1] = p[2] = 0.0F;
   _mesa_PointParameterfv(pname, p);
}
void GLAPIENTRY
_mesa_PointParameteriv( GLenum pname, const GLint *params )
{
   GLfloat p[3];
   p[0] = (GLfloat) params[0];
   if (pname == GL_DISTANCE_ATTENUATION_EXT) {
      p[1] = (GLfloat) params[1];
      p[2] = (GLfloat) params[2];
   }
   _mesa_PointParameterfv(pname, p);
}
Пример #4
0
void GLAPIENTRY
_mesa_PointParameterf( GLenum pname, GLfloat param)
{
   _mesa_PointParameterfv(pname, &param);
}
Пример #5
0
void GLAPIENTRY
_mesa_PointParameteri( GLenum pname, GLint param )
{
   const GLfloat value = (GLfloat) param;
   _mesa_PointParameterfv(pname, &value);
}