From: Brian Paul Date: Wed, 18 Aug 2004 18:45:25 +0000 (+0000) Subject: check for either GL_NV_vertex_program or GL_ARB_vertex_program for some enables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=efb2ade520f47187ac70abe57185358017b63caa;p=mesa.git check for either GL_NV_vertex_program or GL_ARB_vertex_program for some enables --- diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 25bb7938c01..8d244e02e5b 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -5,9 +5,9 @@ /* * Mesa 3-D graphics library - * Version: 5.1 + * Version: 6.1 * - * 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"), @@ -48,13 +48,6 @@ return; \ } -#define CHECK_EXTENSION2(EXT1, EXT2, CAP) \ - if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \ - _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)", \ - state ? "Enable" : "Disable", CAP); \ - return; \ - } - static void client_state( GLcontext *ctx, GLenum cap, GLboolean state ) @@ -192,6 +185,14 @@ _mesa_DisableClientState( GLenum cap ) return; \ } +#define CHECK_EXTENSION2(EXT1, EXT2, CAP) \ + if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \ + _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", \ + state ? "Enable" : "Disable", CAP); \ + return; \ + } + + /** * Perform glEnable() and glDisable() calls. @@ -852,21 +853,21 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) #if FEATURE_NV_vertex_program case GL_VERTEX_PROGRAM_NV: - CHECK_EXTENSION(NV_vertex_program, cap); + CHECK_EXTENSION2(NV_vertex_program, ARB_vertex_program, cap); if (ctx->VertexProgram.Enabled == state) return; FLUSH_VERTICES(ctx, _NEW_PROGRAM); ctx->VertexProgram.Enabled = state; break; case GL_VERTEX_PROGRAM_POINT_SIZE_NV: - CHECK_EXTENSION(NV_vertex_program, cap); + CHECK_EXTENSION2(NV_vertex_program, ARB_vertex_program, cap); if (ctx->VertexProgram.PointSizeEnabled == state) return; FLUSH_VERTICES(ctx, _NEW_PROGRAM); ctx->VertexProgram.PointSizeEnabled = state; break; case GL_VERTEX_PROGRAM_TWO_SIDE_NV: - CHECK_EXTENSION(NV_vertex_program, cap); + CHECK_EXTENSION2(NV_vertex_program, ARB_vertex_program, cap); if (ctx->VertexProgram.TwoSideEnabled == state) return; FLUSH_VERTICES(ctx, _NEW_PROGRAM);