diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
commit | f8fe689a81f906d1b91bb3220acde2a4ecb14c5b (patch) | |
tree | 26484e9d7e2c67806c2d1760196ff01aaa858e8c /src/VBox/GuestHost/OpenGL/include/state/cr_occlude.h | |
parent | Initial commit. (diff) | |
download | virtualbox-upstream.tar.xz virtualbox-upstream.zip |
Adding upstream version 6.0.4-dfsg.upstream/6.0.4-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/GuestHost/OpenGL/include/state/cr_occlude.h')
-rw-r--r-- | src/VBox/GuestHost/OpenGL/include/state/cr_occlude.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/VBox/GuestHost/OpenGL/include/state/cr_occlude.h b/src/VBox/GuestHost/OpenGL/include/state/cr_occlude.h new file mode 100644 index 00000000..9791ec6a --- /dev/null +++ b/src/VBox/GuestHost/OpenGL/include/state/cr_occlude.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2001, Stanford University + * All rights reserved. + * + * See the file LICENSE.txt for information on redistributing this software. + */ + +#ifndef CR_OCCLUSION_H +#define CR_OCCLUSION_H + +#include "cr_hash.h" +#include "state/cr_statetypes.h" + +#include <iprt/cdefs.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + CRbitvalue dirty[CR_MAX_BITARRAY]; +} CROcclusionBits; + + +/* + * Occlusion query object. + */ +typedef struct { + GLenum target; + GLuint name; + GLuint refCount; + GLuint passedCounter; + GLboolean active; + CRbitvalue dirty[CR_MAX_BITARRAY]; /* dirty data or state */ + GLintptrARB dirtyStart, dirtyLength; /* dirty region */ +} CROcclusionObject; + + +typedef struct { + CRHashTable *objects; + GLuint currentQueryObject; +} CROcclusionState; + + +DECLEXPORT(void) crStateOcclusionInit(CRContext *ctx); + +DECLEXPORT(void) crStateOcclusionDestroy(CRContext *ctx); + +DECLEXPORT(void) crStateOcclusionDiff(CROcclusionBits *bb, CRbitvalue *bitID, + CRContext *fromCtx, CRContext *toCtx); +DECLEXPORT(void) crStateOcclusionSwitch(CROcclusionBits *bb, CRbitvalue *bitID, + CRContext *fromCtx, CRContext *toCtx); + + +#ifdef __cplusplus +} +#endif + +#endif /* CR_OCCLUSION_H */ |