mesa: avoid extraneous _NEW_BUFFER state in _mesa_drawbuffers()
[mesa.git] / src / mesa / main / queryobj.h
index ada8cf835607585c4459a6c547ae213277e6989f..6cf3c76d74dafb5397e724099ea2b8f8c5ebc753 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5
+ * Version:  7.1
  *
- * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2007  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"),
  */
 
 
-#ifndef OCCLUDE_H
-#define OCCLUDE_H
+#ifndef QUERYOBJ_H
+#define QUERYOBJ_H
 
 
-extern struct gl_query_object *
-_mesa_new_query_object(GLcontext *ctx, GLuint id);
+#include "main/mtypes.h"
 
-extern void
-_mesa_init_query(GLcontext *ctx);
 
-extern void
-_mesa_free_query_data(GLcontext *ctx);
+#if FEATURE_queryobj
+
+#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl)      \
+   do {                                                  \
+      (driver)->NewQueryObject = impl ## NewQueryObject; \
+      (driver)->DeleteQuery    = impl ## DeleteQuery;    \
+      (driver)->BeginQuery     = impl ## BeginQuery;     \
+      (driver)->EndQuery       = impl ## EndQuery;       \
+      (driver)->WaitQuery      = impl ## WaitQuery;      \
+      (driver)->CheckQuery     = impl ## CheckQuery;     \
+   } while (0)
 
 extern void GLAPIENTRY
 _mesa_GenQueriesARB(GLsizei n, GLuint *ids);
@@ -45,12 +51,6 @@ _mesa_DeleteQueriesARB(GLsizei n, const GLuint *ids);
 extern GLboolean GLAPIENTRY
 _mesa_IsQueryARB(GLuint id);
 
-extern void GLAPIENTRY
-_mesa_BeginQueryARB(GLenum target, GLuint id);
-
-extern void GLAPIENTRY
-_mesa_EndQueryARB(GLenum target);
-
 extern void GLAPIENTRY
 _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params);
 
@@ -60,11 +60,33 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params);
 extern void GLAPIENTRY
 _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params);
 
-extern void GLAPIENTRY
-_mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params);
+extern void
+_mesa_init_query_object_functions(struct dd_function_table *driver);
 
-extern void GLAPIENTRY
-_mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params);
+extern void
+_mesa_init_queryobj_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_queryobj */
+
+#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) do { } while (0)
+
+static INLINE void
+_mesa_init_query_object_functions(struct dd_function_table *driver)
+{
+}
+
+static INLINE void
+_mesa_init_queryobj_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_queryobj */
+
+extern void
+_mesa_init_queryobj(GLcontext *ctx);
+
+extern void
+_mesa_free_queryobj_data(GLcontext *ctx);
 
 
-#endif /* OCCLUDE_H */
+#endif /* QUERYOBJ_H */