From: Brian Paul Date: Fri, 7 Jan 2000 07:42:33 +0000 (+0000) Subject: added missing glHintPGI() function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c3533c5c8070fcca25247945cebedea60616082;p=mesa.git added missing glHintPGI() function --- diff --git a/include/GL/gl.h b/include/GL/gl.h index 5da2a230ef8..3749700c912 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -1,4 +1,4 @@ -/* $Id: gl.h,v 1.25 2000/01/07 05:35:37 brianp Exp $ */ +/* $Id: gl.h,v 1.26 2000/01/07 07:43:41 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -2053,6 +2053,8 @@ GLAPI void GLAPIENTRY glPointParameterfvEXT( GLenum pname, const GLfloat *params #define GL_BACK_NORMALS_HINT_PGI 107043 #define GL_NATIVE_GRAPHICS_HANDLE_PGI 107010 +GLAPI void APIENTRY glHintPGI(GLenum target, GLint mode); + #endif /* GL_PGI_misc_hints */ diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c index 66040961350..b1b9ce429a5 100644 --- a/src/mesa/main/dispatch.c +++ b/src/mesa/main/dispatch.c @@ -1,4 +1,4 @@ -/* $Id: dispatch.c,v 1.7 2000/01/07 07:16:34 brianp Exp $ */ +/* $Id: dispatch.c,v 1.8 2000/01/07 07:42:33 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -509,6 +509,9 @@ _mesa_init_exec_table(struct _glapi_table *exec) exec->PointParameterfEXT = _mesa_PointParameterfEXT; exec->PointParameterfvEXT = _mesa_PointParameterfvEXT; + /* 77. GL_PGI_misc_hints */ + exec->HintPGI = _mesa_HintPGI; + /* GL_EXT_polygon_offset */ exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT; diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 2f9f4ed2a3b..cfbcb003a7f 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1,10 +1,10 @@ -/* $Id: dlist.c,v 1.22 1999/12/15 12:55:54 brianp Exp $ */ +/* $Id: dlist.c,v 1.23 2000/01/07 07:42:34 brianp Exp $ */ /* * Mesa 3-D graphics library * Version: 3.3 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2000 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"), @@ -175,6 +175,7 @@ typedef enum { OPCODE_FRONT_FACE, OPCODE_FRUSTUM, OPCODE_HINT, + OPCODE_HINT_PGI, OPCODE_INDEX_MASK, OPCODE_INIT_NAMES, OPCODE_LIGHT, @@ -534,6 +535,7 @@ void gl_init_lists( void ) InstSize[OPCODE_FRONT_FACE] = 2; InstSize[OPCODE_FRUSTUM] = 7; InstSize[OPCODE_HINT] = 3; + InstSize[OPCODE_HINT_PGI] = 3; InstSize[OPCODE_INDEX_MASK] = 2; InstSize[OPCODE_INIT_NAMES] = 1; InstSize[OPCODE_LIGHT] = 7; @@ -1446,6 +1448,22 @@ static void save_Hint( GLenum target, GLenum mode ) } +/* GL_PGI_misc_hints*/ +static void save_HintPGI( GLenum target, GLint mode ) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + FLUSH_VB(ctx, "dlist"); + 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_IndexMask( GLuint mask ) { @@ -3424,6 +3442,9 @@ static void execute_list( GLcontext *ctx, GLuint list ) 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_INDEX_MASK: (*ctx->Exec.IndexMask)( n[1].ui ); break; @@ -4430,6 +4451,9 @@ _mesa_init_dlist_table( struct _glapi_table *table ) table->PointParameterfEXT = save_PointParameterfEXT; table->PointParameterfvEXT = save_PointParameterfvEXT; + /* GL_PGI_misc_hints */ + table->HintPGI = save_HintPGI; + /* GL_EXT_polygon_offset */ table->PolygonOffsetEXT = save_PolygonOffsetEXT;