/*
* 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"
* otherwise gets the specified parameter from the current context, converting
* it value into GLboolean.
*/
-void
+void GLAPIENTRY
_mesa_GetBooleanv( GLenum pname, GLboolean *params )
{
GET_CURRENT_CONTEXT(ctx);
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);
*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)
* otherwise gets the specified parameter from the current context, converting
* it value into GLdouble.
*/
-void
+void GLAPIENTRY
_mesa_GetDoublev( GLenum pname, GLdouble *params )
{
GET_CURRENT_CONTEXT(ctx);
*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)
* otherwise gets the specified parameter from the current context, converting
* it value into GLfloat.
*/
-void
+void GLAPIENTRY
_mesa_GetFloatv( GLenum pname, GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
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];
*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)
* otherwise gets the specified parameter from the current context, converting
* it value into GLinteger.
*/
-void
+void GLAPIENTRY
_mesa_GetIntegerv( GLenum pname, GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
*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)
* Tries to get the specified pointer via dd_function_table::GetPointerv,
* otherwise gets the specified pointer from the current context.
*/
-void
+void GLAPIENTRY
_mesa_GetPointerv( GLenum pname, GLvoid **params )
{
GET_CURRENT_CONTEXT(ctx);
switch (pname) {
case GL_VERTEX_ARRAY_POINTER:
- *params = ctx->Array.Vertex.Ptr;
+ *params = (GLvoid *) ctx->Array.Vertex.Ptr;
break;
case GL_NORMAL_ARRAY_POINTER:
- *params = ctx->Array.Normal.Ptr;
+ *params = (GLvoid *) ctx->Array.Normal.Ptr;
break;
case GL_COLOR_ARRAY_POINTER:
- *params = ctx->Array.Color.Ptr;
+ *params = (GLvoid *) ctx->Array.Color.Ptr;
break;
case GL_SECONDARY_COLOR_ARRAY_POINTER_EXT:
- *params = ctx->Array.SecondaryColor.Ptr;
+ *params = (GLvoid *) ctx->Array.SecondaryColor.Ptr;
break;
case GL_FOG_COORDINATE_ARRAY_POINTER_EXT:
- *params = ctx->Array.FogCoord.Ptr;
+ *params = (GLvoid *) ctx->Array.FogCoord.Ptr;
break;
case GL_INDEX_ARRAY_POINTER:
- *params = ctx->Array.Index.Ptr;
+ *params = (GLvoid *) ctx->Array.Index.Ptr;
break;
case GL_TEXTURE_COORD_ARRAY_POINTER:
- *params = ctx->Array.TexCoord[clientUnit].Ptr;
+ *params = (GLvoid *) ctx->Array.TexCoord[clientUnit].Ptr;
break;
case GL_EDGE_FLAG_ARRAY_POINTER:
- *params = ctx->Array.EdgeFlag.Ptr;
+ *params = (GLvoid *) ctx->Array.EdgeFlag.Ptr;
break;
case GL_FEEDBACK_BUFFER_POINTER:
*params = ctx->Feedback.Buffer;
* Tries to get the string from dd_function_table::GetString, otherwise returns
* the hardcoded strings.
*/
-const GLubyte *
+const GLubyte * GLAPIENTRY
_mesa_GetString( GLenum name )
{
GET_CURRENT_CONTEXT(ctx);
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) {
*
* Returns __GLcontextRec::ErrorValue.
*/
-GLenum
+GLenum GLAPIENTRY
_mesa_GetError( void )
{
GET_CURRENT_CONTEXT(ctx);