VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/state/cr_evaluators.h@ 44125

Last change on this file since 44125 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_EVALUATORS
8#define CR_STATE_EVALUATORS
9
10#include "state/cr_statetypes.h"
11
12#include <iprt/cdefs.h>
13
14#define GLEVAL_TOT 9
15#define MAX_EVAL_ORDER 30
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21typedef struct {
22 CRbitvalue eval1D[GLEVAL_TOT][CR_MAX_BITARRAY];
23 CRbitvalue eval2D[GLEVAL_TOT][CR_MAX_BITARRAY];
24 CRbitvalue enable[CR_MAX_BITARRAY];
25 CRbitvalue enable1D[GLEVAL_TOT][CR_MAX_BITARRAY];
26 CRbitvalue enable2D[GLEVAL_TOT][CR_MAX_BITARRAY];
27 CRbitvalue grid1D[CR_MAX_BITARRAY];
28 CRbitvalue grid2D[CR_MAX_BITARRAY];
29 CRbitvalue dirty[CR_MAX_BITARRAY];
30#ifdef CR_NV_vertex_program
31 CRbitvalue enableAttrib1D[CR_MAX_VERTEX_ATTRIBS];
32 CRbitvalue enableAttrib2D[CR_MAX_VERTEX_ATTRIBS];
33#endif
34} CREvaluatorBits;
35
36typedef struct {
37 GLfloat u1, u2;
38 GLfloat du;
39 GLint order;
40 GLfloat *coeff;
41} CREvaluator1D;
42
43typedef struct {
44 GLfloat u1, u2;
45 GLfloat v1, v2;
46 GLfloat du, dv;
47 GLint uorder;
48 GLint vorder;
49 GLfloat *coeff;
50} CREvaluator2D;
51
52typedef struct {
53 GLboolean enable1D[GLEVAL_TOT];
54 GLboolean enable2D[GLEVAL_TOT];
55#ifdef CR_NV_vertex_program
56 GLboolean enableAttrib1D[CR_MAX_VERTEX_ATTRIBS];
57 GLboolean enableAttrib2D[CR_MAX_VERTEX_ATTRIBS];
58#endif
59 GLboolean autoNormal;
60
61 CREvaluator1D eval1D[GLEVAL_TOT];
62 CREvaluator2D eval2D[GLEVAL_TOT];
63#ifdef CR_NV_vertex_program
64 CREvaluator1D attribEval1D[CR_MAX_VERTEX_ATTRIBS];
65 CREvaluator2D attribEval2D[CR_MAX_VERTEX_ATTRIBS];
66#endif
67
68 GLint un1D; /* GL_MAP1_GRID_SEGMENTS */
69 GLfloat u11D, u21D; /* GL_MAP1_GRID_DOMAIN */
70
71 GLint un2D; /* GL_MAP2_GRID_SEGMENTS (u) */
72 GLint vn2D; /* GL_MAP2_GRID_SEGMENTS (v) */
73 GLfloat u12D, u22D; /* GL_MAP2_GRID_DOMAIN (u) */
74 GLfloat v12D, v22D; /* GL_MAP2_GRID_DOMAIN (v) */
75} CREvaluatorState;
76
77extern const int gleval_sizes[];
78
79DECLEXPORT(void) crStateEvaluatorInit (CRContext *ctx);
80DECLEXPORT(void) crStateEvaluatorDestroy (CRContext *ctx);
81
82DECLEXPORT(void) crStateEvaluatorDiff(CREvaluatorBits *e, CRbitvalue *bitID,
83 CRContext *fromCtx, CRContext *toCtx);
84DECLEXPORT(void) crStateEvaluatorSwitch(CREvaluatorBits *e, CRbitvalue *bitID,
85 CRContext *fromCtx, CRContext *toCtx);
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* CR_STATE_EVALUATORS */
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