projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04207ab
)
check for invalid vertex/fragment program in glBegin
author
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 26 Feb 2004 22:09:28 +0000
(22:09 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 26 Feb 2004 22:09:28 +0000
(22:09 +0000)
src/mesa/tnl/t_vtx_api.c
patch
|
blob
|
history
diff --git
a/src/mesa/tnl/t_vtx_api.c
b/src/mesa/tnl/t_vtx_api.c
index b69a1a612e1663c90bfa5ea92c011d69884b3cde..a9a1c5bd5f832c8e6ca19dff79db38e0a22737b7 100644
(file)
--- a/
src/mesa/tnl/t_vtx_api.c
+++ b/
src/mesa/tnl/t_vtx_api.c
@@
-992,6
+992,15
@@
static void GLAPIENTRY _tnl_Begin( GLenum mode )
{
GET_CURRENT_CONTEXT( ctx );
+ if ((ctx->VertexProgram.Enabled
+ && !ctx->VertexProgram.Current->Instructions) ||
+ (ctx->FragmentProgram.Enabled
+ && !ctx->FragmentProgram.Current->Instructions)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBegin (invalid vertex/fragment program)");
+ return;
+ }
+
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1) {
TNLcontext *tnl = TNL_CONTEXT(ctx);
int i;