summaryrefslogtreecommitdiffstats
path: root/src/VBox/GuestHost/OpenGL/include/state/cr_pixel.h
blob: 1afed66e277faf54093b970b3cd61215f59571cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* Copyright (c) 2001, Stanford University
 * All rights reserved.
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#ifndef CR_STATE_PIXEL_H
#define CR_STATE_PIXEL_H

#include "state/cr_statetypes.h"
#include "state/cr_limits.h"
#include "cr_bits.h"

#include <iprt/cdefs.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
	CRbitvalue dirty[CR_MAX_BITARRAY];
	CRbitvalue transfer[CR_MAX_BITARRAY];
	CRbitvalue zoom[CR_MAX_BITARRAY];
	CRbitvalue maps[CR_MAX_BITARRAY];
} CRPixelBits;

typedef struct {
	GLboolean	mapColor;
	GLboolean	mapStencil;
	GLint			indexShift;
	GLint			indexOffset;
	GLcolorf	scale;
	GLfloat		depthScale;
	GLcolorf	bias;
	GLfloat		depthBias;
	GLfloat		xZoom;
	GLfloat		yZoom;

	GLint			mapItoI[CR_MAX_PIXEL_MAP_TABLE];
	GLint			mapStoS[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapItoR[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapItoG[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapItoB[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapItoA[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapRtoR[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapGtoG[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapBtoB[CR_MAX_PIXEL_MAP_TABLE];
	GLfloat		mapAtoA[CR_MAX_PIXEL_MAP_TABLE];

	GLint		mapItoIsize;
	GLint		mapStoSsize;
	GLint		mapItoRsize;
	GLint		mapItoGsize;
	GLint		mapItoBsize;
	GLint		mapItoAsize;
	GLint		mapRtoRsize;
	GLint		mapGtoGsize;
	GLint		mapBtoBsize;
	GLint		mapAtoAsize;
} CRPixelState;

DECLEXPORT(void) crStatePixelInit( CRContext *ctx );

DECLEXPORT(void) crStatePixelDiff(CRPixelBits *bb, CRbitvalue *bitID,
                                  CRContext *fromCtx, CRContext *toCtx);
DECLEXPORT(void) crStatePixelSwitch(CRPixelBits *bb, CRbitvalue *bitID, 
                                    CRContext *fromCtx, CRContext *toCtx);

#ifdef __cplusplus
}
#endif


#endif /* CR_STATE_PIXEL_H */