summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-03-02 15:21:51 +0000
committerBrian Paul <[email protected]>2004-03-02 15:21:51 +0000
commit411b8faac47317e73ab9c285a85631a340a4ad53 (patch)
tree36232a5ecb02bdb22278976ddac6934d421bd107 /src/mesa/main
parentfa21787b52d85a7aeaf5de64a39e019f39fcfa07 (diff)
added missing error check in _mesa_BeginQueryARB (Cedric Gautier). minor clean-ups.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/occlude.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mesa/main/occlude.c b/src/mesa/main/occlude.c
index c8fa1dfacd8..d329f11f098 100644
--- a/src/mesa/main/occlude.c
+++ b/src/mesa/main/occlude.c
@@ -1,8 +1,8 @@
/*
* 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"),
@@ -35,14 +35,6 @@
#include "occlude.h"
#include "mtypes.h"
-#ifndef GL_SAMPLES_PASSED_ARB
-#define GL_SAMPLES_PASSED_ARB 0x8914
-#define GL_QUERY_COUNTER_BITS_ARB 0x8864
-#define GL_CURRENT_QUERY_ARB 0x8865
-#define GL_QUERY_RESULT_ARB 0x8866
-#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
-#endif
-
struct occlusion_query
{
@@ -188,6 +180,11 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
return;
}
+ if (id == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginQueryARB(id==0)");
+ return;
+ }
+
if (ctx->Occlusion.CurrentQueryObject) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBeginQueryARB(target)");
return;