VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/state/cr_buffer.h@ 18847

Last change on this file since 18847 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved.
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#ifndef CR_STATE_BUFFER_H
8#define CR_STATE_BUFFER_H
9
10#include "state/cr_statetypes.h"
11
12#include <iprt/cdefs.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef struct {
19 CRbitvalue dirty[CR_MAX_BITARRAY];
20 CRbitvalue enable[CR_MAX_BITARRAY];
21 CRbitvalue alphaFunc[CR_MAX_BITARRAY];
22 CRbitvalue depthFunc[CR_MAX_BITARRAY];
23 CRbitvalue blendFunc[CR_MAX_BITARRAY];
24 CRbitvalue logicOp[CR_MAX_BITARRAY];
25 CRbitvalue indexLogicOp[CR_MAX_BITARRAY];
26 CRbitvalue drawBuffer[CR_MAX_BITARRAY];
27 CRbitvalue readBuffer[CR_MAX_BITARRAY];
28 CRbitvalue indexMask[CR_MAX_BITARRAY];
29 CRbitvalue colorWriteMask[CR_MAX_BITARRAY];
30 CRbitvalue clearColor[CR_MAX_BITARRAY];
31 CRbitvalue clearIndex[CR_MAX_BITARRAY];
32 CRbitvalue clearDepth[CR_MAX_BITARRAY];
33 CRbitvalue clearAccum[CR_MAX_BITARRAY];
34 CRbitvalue depthMask[CR_MAX_BITARRAY];
35#ifdef CR_EXT_blend_color
36 CRbitvalue blendColor[CR_MAX_BITARRAY];
37#endif
38#if defined(CR_EXT_blend_minmax) || defined(CR_EXT_blend_subtract) || defined(CR_EXT_blend_logic_op)
39 CRbitvalue blendEquation[CR_MAX_BITARRAY];
40#endif
41#if defined(CR_EXT_blend_func_separate)
42 CRbitvalue blendFuncSeparate[CR_MAX_BITARRAY];
43#endif
44} CRBufferBits;
45
46typedef struct {
47 GLboolean depthTest;
48 GLboolean blend;
49 GLboolean alphaTest;
50 GLboolean logicOp;
51 GLboolean indexLogicOp;
52 GLboolean dither;
53 GLboolean depthMask;
54
55 GLenum alphaTestFunc;
56 GLfloat alphaTestRef;
57 GLenum depthFunc;
58 GLenum blendSrcRGB;
59 GLenum blendDstRGB;
60 GLenum blendSrcA;
61 GLenum blendDstA;
62 GLenum logicOpMode;
63 GLenum drawBuffer;
64 GLenum readBuffer;
65 GLint indexWriteMask;
66 GLcolorb colorWriteMask;
67 GLcolorf colorClearValue;
68 GLfloat indexClearValue;
69 GLdefault depthClearValue;
70 GLcolorf accumClearValue;
71#ifdef CR_EXT_blend_color
72 GLcolorf blendColor;
73#endif
74#if defined(CR_EXT_blend_minmax) || defined(CR_EXT_blend_subtract)
75 GLenum blendEquation;
76#endif
77} CRBufferState;
78
79DECLEXPORT(void) crStateBufferInit(CRContext *ctx);
80
81DECLEXPORT(void) crStateBufferDiff(CRBufferBits *bb, CRbitvalue *bitID,
82 CRContext *fromCtx, CRContext *toCtx);
83DECLEXPORT(void) crStateBufferSwitch(CRBufferBits *bb, CRbitvalue *bitID,
84 CRContext *fromCtx, CRContext *toCtx);
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* CR_STATE_BUFFER_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette