Minor tweaks to help out at a driver level.
[mesa.git] / src / mesa / main / get.c
index b01b581ef367bd9f8b2359c9b52aae61f20dfa38..287eae75bef6fc68c232d1338de1fa9bbed127f9 100644 (file)
@@ -5,9 +5,9 @@
 
 /*
  * Mesa 3-D graphics library
- * Version:  5.1
+ * Version:  6.0
  *
- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2004  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"),
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+/*
+ * Regarding GL_NV_light_max_exponent:
+ *
+ * Portions of this software may use or implement intellectual
+ * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims
+ * any and all warranties with respect to such intellectual property,
+ * including any use thereof or modifications thereto.
+ */
 
 #include "glheader.h"
 #include "colormac.h"
@@ -295,7 +303,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
          break;
       case GL_CURRENT_INDEX:
         FLUSH_CURRENT(ctx, 0);
-         *params = INT_TO_BOOL(ctx->Current.Index);
+         *params = FLOAT_TO_BOOL(ctx->Current.Index);
          break;
       case GL_CURRENT_NORMAL:
         FLUSH_CURRENT(ctx, 0);
@@ -499,7 +507,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
         *params = INT_TO_BOOL(ctx->List.ListBase);
         break;
       case GL_LIST_INDEX:
-        *params = INT_TO_BOOL( ctx->CurrentListNum );
+        *params = INT_TO_BOOL( ctx->ListState.CurrentListNum );
         break;
       case GL_LIST_MODE:
          if (!ctx->CompileFlag)
@@ -2041,7 +2049,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
         *params = (GLdouble) ctx->List.ListBase;
         break;
       case GL_LIST_INDEX:
-        *params = (GLdouble) ctx->CurrentListNum;
+        *params = (GLdouble) ctx->ListState.CurrentListNum;
         break;
       case GL_LIST_MODE:
          if (!ctx->CompileFlag)
@@ -3392,7 +3400,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
         params[0] = ctx->Current.RasterDistance;
         break;
       case GL_CURRENT_RASTER_INDEX:
-        *params = (GLfloat) ctx->Current.RasterIndex;
+        *params = ctx->Current.RasterIndex;
         break;
       case GL_CURRENT_RASTER_POSITION:
         params[0] = ctx->Current.RasterPos[0];
@@ -3578,7 +3586,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
         *params = (GLfloat) ctx->List.ListBase;
         break;
       case GL_LIST_INDEX:
-        *params = (GLfloat) ctx->CurrentListNum;
+        *params = (GLfloat) ctx->ListState.CurrentListNum;
         break;
       case GL_LIST_MODE:
          if (!ctx->CompileFlag)
@@ -5092,7 +5100,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
         *params = (GLint) ctx->List.ListBase;
         break;
       case GL_LIST_INDEX:
-        *params = (GLint) ctx->CurrentListNum;
+        *params = (GLint) ctx->ListState.CurrentListNum;
         break;
       case GL_LIST_MODE:
          if (!ctx->CompileFlag)
@@ -6380,7 +6388,7 @@ _mesa_GetString( GLenum name )
    static const char *version_1_2 = "1.2 Mesa " MESA_VERSION_STRING;
    static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING;
    static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING;
-   static const char *version_1_5 = "1.4 Mesa " MESA_VERSION_STRING;
+   static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING;
 
    ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
 
@@ -6423,7 +6431,6 @@ _mesa_GetString( GLenum name )
                    ctx->Extensions.EXT_texture_lod_bias &&
                    ctx->Extensions.SGIS_generate_mipmap) {
                   if (ctx->Extensions.ARB_occlusion_query &&
-                      ctx->Extensions.ARB_point_sprite &&
                       ctx->Extensions.ARB_vertex_buffer_object &&
                       ctx->Extensions.ARB_texture_non_power_of_two &&
                       ctx->Extensions.EXT_shadow_funcs) {