summaryrefslogtreecommitdiff
path: root/src/mesa/main/mtypes.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-08-27 13:56:08 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-08-27 13:56:08 +0000
commit23ffc3a85d6172f8a98d17d7f23610bab808d84e (patch)
tree07211e0ccdc4f3418d8e434b39c43d80894e1077 /src/mesa/main/mtypes.h
parentca1ac986a1d6d3f292e3d20540de884ad08d9816 (diff)
Rearrange the code related to GL_ARB_occlusion_object to generalize query
objects for future types of queries.
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r--src/mesa/main/mtypes.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2ec3868bef..17ef921738 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1853,7 +1853,7 @@ struct gl_vertex_program_state
};
-/*
+/**
* State for GL_ARB/NV_fragment_program
*/
struct gl_fragment_program_state
@@ -1874,8 +1874,9 @@ struct gl_fragment_program_state
#endif
};
-/*
- * State for GL_fragment_shader
+
+/**
+ * State for GL_ATI_fragment_shader
*/
struct gl_ati_fragment_shader_state
{
@@ -1886,17 +1887,24 @@ struct gl_ati_fragment_shader_state
struct ati_fragment_shader *Current;
};
-/*
- * State for GL_ARB_occlusion_query
- */
-struct gl_occlusion_state
+
+struct gl_query_object
+{
+ GLenum Target;
+ GLuint Id;
+ GLuint Result; /* the counter */
+ GLboolean Active; /* inside Begin/EndQuery */
+ GLboolean Ready; /* result is ready */
+};
+
+
+struct gl_query_state
{
- GLboolean Active;
- GLuint CurrentQueryObject;
- GLuint PassedCounter;
struct _mesa_HashTable *QueryObjects;
+ struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */
};
+
/**
* gl2 unique interface identifier.
* Each gl2 interface has its own interface id used for object queries.
@@ -2802,7 +2810,7 @@ struct __GLcontextRec
GLboolean _MaintainTexEnvProgram;
GLboolean _MaintainTnlProgram;
- struct gl_occlusion_state Occlusion; /**< GL_ARB_occlusion_query */
+ struct gl_query_state Query; /**< GL_ARB_occlusion_query */
struct gl_shader_objects_state ShaderObjects; /* GL_ARB_shader_objects */
/*@}*/