aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-04-23 14:16:46 +0000
committerBrian Paul <[email protected]>2004-04-23 14:16:46 +0000
commit6d460af6af77a0d5a5b568bcd6094b98e249ba93 (patch)
tree08656028582b357d5c9730c521cc3e1770604c50 /src/mesa/main/drawpix.c
parent384800fe12e368f3489111de4572dbc8846a7dea (diff)
Added ctx->Vertex/FragmentProgram._Enable flags. Set when vertex/fragment
program is enabled AND the currently bound program is valid. Check _Enable instead of Enable to prevent things from blowing up when someone calls glEnable(GL_VERTEX_PROGRAM_ARB) without actually defining a program.
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index fc7dd32b06b..6f7cae9ef55 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -45,8 +45,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (ctx->FragmentProgram.Enabled
- && !ctx->FragmentProgram.Current->Instructions) {
+ if (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glDrawPixels (invalid fragment program)");
return;
@@ -103,8 +102,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GLint destx, desty;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (ctx->FragmentProgram.Enabled
- && !ctx->FragmentProgram.Current->Instructions) {
+ if (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyPixels (invalid fragment program)");
return;
@@ -184,8 +182,7 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (ctx->FragmentProgram.Enabled
- && !ctx->FragmentProgram.Current->Instructions) {
+ if (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBitmap (invalid fragment program)");
return;