if (ctx->RenderMode != GL_RENDER)
return GL_FALSE;
- if (!ctx->Hint.AllowDrawMem)
- return GL_TRUE; /* you'll take it and like it */
-
if (ctx->Stencil.Enabled ||
ctx->Color.MultiDrawBuffer ||
((ctx->Color.BlendEnabled) && (ctx->Color.BlendEquation!=GL_FUNC_ADD_EXT)) ||
-/* $Id: context.c,v 1.118 2001/01/24 00:04:58 brianp Exp $ */
+/* $Id: context.c,v 1.119 2001/01/24 04:56:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
ctx->Hint.LineSmooth = GL_DONT_CARE;
ctx->Hint.PolygonSmooth = GL_DONT_CARE;
ctx->Hint.Fog = GL_DONT_CARE;
- ctx->Hint.AllowDrawWin = GL_TRUE;
- ctx->Hint.AllowDrawFrg = GL_TRUE;
- ctx->Hint.AllowDrawMem = GL_TRUE;
- ctx->Hint.StrictLighting = GL_TRUE;
ctx->Hint.ClipVolumeClipping = GL_DONT_CARE;
ctx->Hint.TextureCompression = GL_DONT_CARE;
-/* $Id: dlist.c,v 1.62 2001/01/23 23:39:36 brianp Exp $ */
+/* $Id: dlist.c,v 1.63 2001/01/24 04:56:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
OPCODE_FRONT_FACE,
OPCODE_FRUSTUM,
OPCODE_HINT,
- OPCODE_HINT_PGI,
OPCODE_HISTOGRAM,
OPCODE_INDEX_MASK,
OPCODE_INIT_NAMES,
InstSize[OPCODE_FRONT_FACE] = 2;
InstSize[OPCODE_FRUSTUM] = 7;
InstSize[OPCODE_HINT] = 3;
- InstSize[OPCODE_HINT_PGI] = 3;
InstSize[OPCODE_HISTOGRAM] = 5;
InstSize[OPCODE_INDEX_MASK] = 2;
InstSize[OPCODE_INIT_NAMES] = 1;
}
-/* GL_PGI_misc_hints*/
-static void save_HintPGI( GLenum target, GLint mode )
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_HINT_PGI, 2 );
- if (n) {
- n[1].e = target;
- n[2].i = mode;
- }
- if (ctx->ExecuteFlag) {
- (*ctx->Exec->HintPGI)( target, mode );
- }
-}
-
-
static void
save_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
{
case OPCODE_HINT:
(*ctx->Exec->Hint)( n[1].e, n[2].e );
break;
- case OPCODE_HINT_PGI:
- (*ctx->Exec->HintPGI)( n[1].e, n[2].i );
- break;
case OPCODE_HISTOGRAM:
(*ctx->Exec->Histogram)( n[1].e, n[2].i, n[3].e, n[4].b );
break;
table->PointParameterfEXT = save_PointParameterfEXT;
table->PointParameterfvEXT = save_PointParameterfvEXT;
- /* 77. GL_PGI_misc_hints */
- table->HintPGI = save_HintPGI;
-
/* 78. GL_EXT_paletted_texture */
#if 0
table->ColorTableEXT = save_ColorTable;
-/* $Id: extensions.c,v 1.44 2001/01/06 22:46:13 gareth Exp $ */
+/* $Id: extensions.c,v 1.45 2001/01/24 04:56:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
{ OFF, "GL_MESA_sprite_point", F(MESA_sprite_point) },
{ OFF, "GL_NV_blend_square", F(NV_blend_square) },
{ ON, "GL_NV_texgen_reflection", F(NV_texgen_reflection) },
- { ON, "GL_PGI_misc_hints", F(PGI_misc_hints) },
{ ON, "GL_SGI_color_matrix", F(SGI_color_matrix) },
{ ON, "GL_SGI_color_table", F(SGI_color_table) },
{ ON, "GL_SGIS_pixel_texture", F(SGIS_pixel_texture) },
-/* $Id: get.c,v 1.51 2001/01/24 00:04:58 brianp Exp $ */
+/* $Id: get.c,v 1.52 2001/01/24 04:56:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
break;
- /* GL_PGI_misc_hints */
- case GL_STRICT_DEPTHFUNC_HINT_PGI:
- *params = ENUM_TO_BOOL(GL_NICEST);
- break;
- case GL_STRICT_LIGHTING_HINT_PGI:
- *params = ENUM_TO_BOOL(ctx->Hint.StrictLighting);
- break;
- case GL_STRICT_SCISSOR_HINT_PGI:
- case GL_FULL_STIPPLE_HINT_PGI:
- *params = ENUM_TO_BOOL(GL_TRUE);
- break;
- case GL_CONSERVE_MEMORY_HINT_PGI:
- *params = ENUM_TO_BOOL(GL_FALSE);
- break;
- case GL_ALWAYS_FAST_HINT_PGI:
- *params = (GLboolean) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
- ctx->Hint.AllowDrawMem == GL_FALSE);
- break;
- case GL_ALWAYS_SOFT_HINT_PGI:
- *params = (GLboolean) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
- ctx->Hint.AllowDrawMem == GL_TRUE);
- break;
- case GL_ALLOW_DRAW_OBJ_HINT_PGI:
- *params = (GLboolean) GL_TRUE;
- break;
- case GL_ALLOW_DRAW_WIN_HINT_PGI:
- *params = (GLboolean) ctx->Hint.AllowDrawWin;
- break;
- case GL_ALLOW_DRAW_FRG_HINT_PGI:
- *params = (GLboolean) ctx->Hint.AllowDrawFrg;
- break;
- case GL_ALLOW_DRAW_MEM_HINT_PGI:
- *params = (GLboolean) ctx->Hint.AllowDrawMem;
- break;
- case GL_CLIP_NEAR_HINT_PGI:
- case GL_CLIP_FAR_HINT_PGI:
- *params = ENUM_TO_BOOL(GL_TRUE);
- break;
- case GL_WIDE_LINE_HINT_PGI:
- *params = ENUM_TO_BOOL(GL_DONT_CARE);
- break;
- case GL_BACK_NORMALS_HINT_PGI:
- *params = ENUM_TO_BOOL(GL_TRUE);
- break;
- case GL_NATIVE_GRAPHICS_HANDLE_PGI:
- *params = 0;
- break;
-
/* GL_EXT_compiled_vertex_array */
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
*params = ctx->Array.LockFirst ? GL_TRUE : GL_FALSE;
gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
break;
- /* GL_PGI_misc_hints */
- case GL_STRICT_DEPTHFUNC_HINT_PGI:
- *params = ENUM_TO_DOUBLE(GL_NICEST);
- break;
- case GL_STRICT_LIGHTING_HINT_PGI:
- *params = ENUM_TO_DOUBLE(ctx->Hint.StrictLighting);
- break;
- case GL_STRICT_SCISSOR_HINT_PGI:
- case GL_FULL_STIPPLE_HINT_PGI:
- *params = ENUM_TO_DOUBLE(GL_TRUE);
- break;
- case GL_CONSERVE_MEMORY_HINT_PGI:
- *params = ENUM_TO_DOUBLE(GL_FALSE);
- break;
- case GL_ALWAYS_FAST_HINT_PGI:
- *params = (GLdouble) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
- ctx->Hint.AllowDrawMem == GL_FALSE);
- break;
- case GL_ALWAYS_SOFT_HINT_PGI:
- *params = (GLdouble) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
- ctx->Hint.AllowDrawMem == GL_TRUE);
- break;
- case GL_ALLOW_DRAW_OBJ_HINT_PGI:
- *params = (GLdouble) GL_TRUE;
- break;
- case GL_ALLOW_DRAW_WIN_HINT_PGI:
- *params = (GLdouble) ctx->Hint.AllowDrawWin;
- break;
- case GL_ALLOW_DRAW_FRG_HINT_PGI:
- *params = (GLdouble) ctx->Hint.AllowDrawFrg;
- break;
- case GL_ALLOW_DRAW_MEM_HINT_PGI:
- *params = (GLdouble) ctx->Hint.AllowDrawMem;
- break;
- case GL_CLIP_NEAR_HINT_PGI:
- case GL_CLIP_FAR_HINT_PGI:
- *params = ENUM_TO_DOUBLE(GL_TRUE);
- break;
- case GL_WIDE_LINE_HINT_PGI:
- *params = ENUM_TO_DOUBLE(GL_DONT_CARE);
- break;
- case GL_BACK_NORMALS_HINT_PGI:
- *params = ENUM_TO_DOUBLE(GL_TRUE);
- break;
- case GL_NATIVE_GRAPHICS_HANDLE_PGI:
- *params = 0;
- break;
-
/* GL_EXT_compiled_vertex_array */
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
*params = (GLdouble) ctx->Array.LockFirst;
gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
break;
- /* GL_PGI_misc_hints */
- case GL_STRICT_DEPTHFUNC_HINT_PGI:
- *params = ENUM_TO_FLOAT(GL_NICEST);
- break;
- case GL_STRICT_LIGHTING_HINT_PGI:
- *params = ENUM_TO_FLOAT(ctx->Hint.StrictLighting);
- break;
- case GL_STRICT_SCISSOR_HINT_PGI:
- case GL_FULL_STIPPLE_HINT_PGI:
- *params = ENUM_TO_FLOAT(GL_TRUE);
- break;
- case GL_CONSERVE_MEMORY_HINT_PGI:
- *params = ENUM_TO_FLOAT(GL_FALSE);
- break;
- case GL_ALWAYS_FAST_HINT_PGI:
- *params = (GLfloat) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
- ctx->Hint.AllowDrawMem == GL_FALSE);
- break;
- case GL_ALWAYS_SOFT_HINT_PGI:
- *params = (GLfloat) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
- ctx->Hint.AllowDrawMem == GL_TRUE);
- break;
- case GL_ALLOW_DRAW_OBJ_HINT_PGI:
- *params = (GLfloat) GL_TRUE;
- break;
- case GL_ALLOW_DRAW_WIN_HINT_PGI:
- *params = (GLfloat) ctx->Hint.AllowDrawWin;
- break;
- case GL_ALLOW_DRAW_FRG_HINT_PGI:
- *params = (GLfloat) ctx->Hint.AllowDrawFrg;
- break;
- case GL_ALLOW_DRAW_MEM_HINT_PGI:
- *params = (GLfloat) ctx->Hint.AllowDrawMem;
- break;
- case GL_CLIP_NEAR_HINT_PGI:
- case GL_CLIP_FAR_HINT_PGI:
- *params = ENUM_TO_FLOAT(GL_TRUE);
- break;
- case GL_WIDE_LINE_HINT_PGI:
- *params = ENUM_TO_FLOAT(GL_DONT_CARE);
- break;
- case GL_BACK_NORMALS_HINT_PGI:
- *params = ENUM_TO_FLOAT(GL_TRUE);
- break;
- case GL_NATIVE_GRAPHICS_HANDLE_PGI:
- *params = 0;
- break;
-
/* GL_EXT_compiled_vertex_array */
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
*params = (GLfloat) ctx->Array.LockFirst;
gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
break;
- /* GL_PGI_misc_hints */
- case GL_STRICT_DEPTHFUNC_HINT_PGI:
- *params = (GL_NICEST);
- break;
- case GL_STRICT_LIGHTING_HINT_PGI:
- *params = (ctx->Hint.StrictLighting);
- break;
- case GL_STRICT_SCISSOR_HINT_PGI:
- case GL_FULL_STIPPLE_HINT_PGI:
- *params = GL_TRUE;
- break;
- case GL_CONSERVE_MEMORY_HINT_PGI:
- *params = GL_FALSE;
- break;
- case GL_ALWAYS_FAST_HINT_PGI:
- *params = (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
- ctx->Hint.AllowDrawMem == GL_FALSE);
- break;
- case GL_ALWAYS_SOFT_HINT_PGI:
- *params = (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
- ctx->Hint.AllowDrawMem == GL_TRUE);
- break;
- case GL_ALLOW_DRAW_OBJ_HINT_PGI:
- *params = GL_TRUE;
- break;
- case GL_ALLOW_DRAW_WIN_HINT_PGI:
- *params = ctx->Hint.AllowDrawWin;
- break;
- case GL_ALLOW_DRAW_FRG_HINT_PGI:
- *params = ctx->Hint.AllowDrawFrg;
- break;
- case GL_ALLOW_DRAW_MEM_HINT_PGI:
- *params = ctx->Hint.AllowDrawMem;
- break;
- case GL_CLIP_NEAR_HINT_PGI:
- case GL_CLIP_FAR_HINT_PGI:
- *params = GL_TRUE;
- break;
- case GL_WIDE_LINE_HINT_PGI:
- *params = GL_DONT_CARE;
- break;
- case GL_BACK_NORMALS_HINT_PGI:
- *params = GL_TRUE;
- break;
- case GL_NATIVE_GRAPHICS_HANDLE_PGI:
- *params = 0;
- break;
-
/* GL_EXT_compiled_vertex_array */
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
*params = ctx->Array.LockFirst;
-/* $Id: hint.c,v 1.6 2000/12/26 05:09:28 keithw Exp $ */
+/* $Id: hint.c,v 1.7 2001/01/24 04:56:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 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"),
FLUSH_VERTICES(ctx, _NEW_HINT);
ctx->Hint.PolygonSmooth = mode;
break;
- case GL_PREFER_DOUBLEBUFFER_HINT_PGI:
- case GL_STRICT_DEPTHFUNC_HINT_PGI:
- break;
- case GL_STRICT_LIGHTING_HINT_PGI:
- if (ctx->Hint.StrictLighting == mode)
- return GL_TRUE;
- FLUSH_VERTICES(ctx, _NEW_HINT);
- ctx->Hint.StrictLighting = mode;
- break;
- case GL_STRICT_SCISSOR_HINT_PGI:
- case GL_FULL_STIPPLE_HINT_PGI:
- case GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI:
- case GL_NATIVE_GRAPHICS_END_HINT_PGI:
- case GL_CONSERVE_MEMORY_HINT_PGI:
- case GL_RECLAIM_MEMORY_HINT_PGI:
- break;
- case GL_ALWAYS_FAST_HINT_PGI:
- FLUSH_VERTICES(ctx, _NEW_HINT);
- if (mode) {
- ctx->Hint.AllowDrawWin = GL_TRUE;
- ctx->Hint.AllowDrawFrg = GL_FALSE;
- ctx->Hint.AllowDrawMem = GL_FALSE;
- } else {
- ctx->Hint.AllowDrawWin = GL_TRUE;
- ctx->Hint.AllowDrawFrg = GL_TRUE;
- ctx->Hint.AllowDrawMem = GL_TRUE;
- }
- break;
- case GL_ALWAYS_SOFT_HINT_PGI:
- FLUSH_VERTICES(ctx, _NEW_HINT);
- ctx->Hint.AllowDrawWin = GL_TRUE;
- ctx->Hint.AllowDrawFrg = GL_TRUE;
- ctx->Hint.AllowDrawMem = GL_TRUE;
- break;
- case GL_ALLOW_DRAW_OBJ_HINT_PGI:
- break;
- case GL_ALLOW_DRAW_WIN_HINT_PGI:
- if (ctx->Hint.AllowDrawWin == mode)
- return GL_TRUE;
- FLUSH_VERTICES(ctx, _NEW_HINT);
- ctx->Hint.AllowDrawWin = mode;
- break;
- case GL_ALLOW_DRAW_FRG_HINT_PGI:
- if (ctx->Hint.AllowDrawFrg == mode)
- return GL_TRUE;
- FLUSH_VERTICES(ctx, _NEW_HINT);
- ctx->Hint.AllowDrawFrg = mode;
- break;
- case GL_ALLOW_DRAW_MEM_HINT_PGI:
- if (ctx->Hint.AllowDrawMem == mode)
- return GL_TRUE;
- FLUSH_VERTICES(ctx, _NEW_HINT);
- ctx->Hint.AllowDrawMem = mode;
- break;
- case GL_CLIP_NEAR_HINT_PGI:
- case GL_CLIP_FAR_HINT_PGI:
- case GL_WIDE_LINE_HINT_PGI:
- case GL_BACK_NORMALS_HINT_PGI:
- case GL_NATIVE_GRAPHICS_HANDLE_PGI:
- break;
/* GL_EXT_clip_volume_hint */
case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
return GL_TRUE;
}
-
-
-void
-_mesa_HintPGI( GLenum target, GLint mode )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (MESA_VERBOSE & VERBOSE_API)
- fprintf(stderr, "glHintPGI %s %d\n", gl_lookup_enum_by_nr(target), mode);
-
- if (mode != GL_NICEST && mode != GL_FASTEST && mode != GL_DONT_CARE) {
- gl_error(ctx, GL_INVALID_ENUM, "glHintPGI(mode)");
- return;
- }
-
- switch (target) {
- case GL_PREFER_DOUBLEBUFFER_HINT_PGI:
- case GL_STRICT_DEPTHFUNC_HINT_PGI:
- case GL_STRICT_LIGHTING_HINT_PGI:
- case GL_STRICT_SCISSOR_HINT_PGI:
- case GL_FULL_STIPPLE_HINT_PGI:
- case GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI:
- case GL_NATIVE_GRAPHICS_END_HINT_PGI:
- case GL_CONSERVE_MEMORY_HINT_PGI:
- case GL_RECLAIM_MEMORY_HINT_PGI:
- case GL_ALWAYS_FAST_HINT_PGI:
- case GL_ALWAYS_SOFT_HINT_PGI:
- case GL_ALLOW_DRAW_OBJ_HINT_PGI:
- case GL_ALLOW_DRAW_WIN_HINT_PGI:
- case GL_ALLOW_DRAW_FRG_HINT_PGI:
- case GL_ALLOW_DRAW_MEM_HINT_PGI:
- case GL_CLIP_NEAR_HINT_PGI:
- case GL_CLIP_FAR_HINT_PGI:
- case GL_WIDE_LINE_HINT_PGI:
- case GL_BACK_NORMALS_HINT_PGI:
- case GL_NATIVE_GRAPHICS_HANDLE_PGI:
- (void) _mesa_try_Hint(ctx, target, (GLenum) mode);
- break;
- default:
- gl_error( ctx, GL_INVALID_ENUM, "glHintPGI(target)" );
- return;
- }
-}
-
-
-/* $Id: hint.h,v 1.2 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: hint.h,v 1.3 2001/01/24 04:56:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 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"),
extern void
_mesa_Hint( GLenum target, GLenum mode );
-extern void
-_mesa_HintPGI( GLenum target, GLint mode );
-
#endif
-/* $Id: mtypes.h,v 1.15 2001/01/24 00:04:58 brianp Exp $ */
+/* $Id: mtypes.h,v 1.16 2001/01/24 04:56:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
GLenum PolygonSmooth;
GLenum Fog;
- /* GL_PGI_misc_hints */
- GLenum AllowDrawWin;
- GLenum AllowDrawFrg;
- GLenum AllowDrawMem;
- GLenum StrictLighting;
-
/* GL_EXT_clip_volume_hint */
GLenum ClipVolumeClipping;
GLboolean MESA_sprite_point;
GLboolean NV_blend_square;
GLboolean NV_texgen_reflection;
- GLboolean PGI_misc_hints;
GLboolean SGI_color_matrix;
GLboolean SGI_color_table;
GLboolean SGIS_pixel_texture;
-/* $Id: state.c,v 1.54 2001/01/08 17:42:13 keithw Exp $ */
+/* $Id: state.c,v 1.55 2001/01/24 04:56:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
exec->PointParameterfEXT = _mesa_PointParameterfEXT;
exec->PointParameterfvEXT = _mesa_PointParameterfvEXT;
- /* 77. GL_PGI_misc_hints */
- exec->HintPGI = _mesa_HintPGI;
-
/* 78. GL_EXT_paletted_texture */
#if 0
exec->ColorTableEXT = _mesa_ColorTableEXT;