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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/* Copyright (c) 2001, Stanford University
* All rights reserved.
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#ifndef CR_STATE_EVALUATORS
#define CR_STATE_EVALUATORS
#include "state/cr_statetypes.h"
#include <iprt/cdefs.h>
#define GLEVAL_TOT 9
#define MAX_EVAL_ORDER 30
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
CRbitvalue eval1D[GLEVAL_TOT][CR_MAX_BITARRAY];
CRbitvalue eval2D[GLEVAL_TOT][CR_MAX_BITARRAY];
CRbitvalue enable[CR_MAX_BITARRAY];
CRbitvalue enable1D[GLEVAL_TOT][CR_MAX_BITARRAY];
CRbitvalue enable2D[GLEVAL_TOT][CR_MAX_BITARRAY];
CRbitvalue grid1D[CR_MAX_BITARRAY];
CRbitvalue grid2D[CR_MAX_BITARRAY];
CRbitvalue dirty[CR_MAX_BITARRAY];
#ifdef CR_NV_vertex_program
CRbitvalue enableAttrib1D[CR_MAX_VERTEX_ATTRIBS];
CRbitvalue enableAttrib2D[CR_MAX_VERTEX_ATTRIBS];
#endif
} CREvaluatorBits;
typedef struct {
GLfloat u1, u2;
GLfloat du;
GLint order;
GLfloat *coeff;
} CREvaluator1D;
typedef struct {
GLfloat u1, u2;
GLfloat v1, v2;
GLfloat du, dv;
GLint uorder;
GLint vorder;
GLfloat *coeff;
} CREvaluator2D;
typedef struct {
GLboolean enable1D[GLEVAL_TOT];
GLboolean enable2D[GLEVAL_TOT];
#ifdef CR_NV_vertex_program
GLboolean enableAttrib1D[CR_MAX_VERTEX_ATTRIBS];
GLboolean enableAttrib2D[CR_MAX_VERTEX_ATTRIBS];
#endif
GLboolean autoNormal;
CREvaluator1D eval1D[GLEVAL_TOT];
CREvaluator2D eval2D[GLEVAL_TOT];
#ifdef CR_NV_vertex_program
CREvaluator1D attribEval1D[CR_MAX_VERTEX_ATTRIBS];
CREvaluator2D attribEval2D[CR_MAX_VERTEX_ATTRIBS];
#endif
GLint un1D; /* GL_MAP1_GRID_SEGMENTS */
GLfloat u11D, u21D; /* GL_MAP1_GRID_DOMAIN */
GLint un2D; /* GL_MAP2_GRID_SEGMENTS (u) */
GLint vn2D; /* GL_MAP2_GRID_SEGMENTS (v) */
GLfloat u12D, u22D; /* GL_MAP2_GRID_DOMAIN (u) */
GLfloat v12D, v22D; /* GL_MAP2_GRID_DOMAIN (v) */
} CREvaluatorState;
extern const int gleval_sizes[];
DECLEXPORT(void) crStateEvaluatorInit (CRContext *ctx);
DECLEXPORT(void) crStateEvaluatorDestroy (CRContext *ctx);
DECLEXPORT(void) crStateEvaluatorDiff(CREvaluatorBits *e, CRbitvalue *bitID,
CRContext *fromCtx, CRContext *toCtx);
DECLEXPORT(void) crStateEvaluatorSwitch(CREvaluatorBits *e, CRbitvalue *bitID,
CRContext *fromCtx, CRContext *toCtx);
#ifdef __cplusplus
}
#endif
#endif /* CR_STATE_EVALUATORS */
|