VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/state/cr_lighting.h@ 32375

Last change on this file since 32375 was 29930, checked in by vboxsync, 15 years ago

crOpenGL: properly cleanup host opengl parts (#2954, #6443)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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_LIGHTING_H
8#define CR_STATE_LIGHTING_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 ambient[CR_MAX_BITARRAY];
22 CRbitvalue diffuse[CR_MAX_BITARRAY];
23 CRbitvalue specular[CR_MAX_BITARRAY];
24 CRbitvalue position[CR_MAX_BITARRAY];
25 CRbitvalue attenuation[CR_MAX_BITARRAY];
26 CRbitvalue spot[CR_MAX_BITARRAY];
27} CRLightBits;
28
29typedef struct {
30 CRbitvalue dirty[CR_MAX_BITARRAY];
31 CRbitvalue shadeModel[CR_MAX_BITARRAY];
32 CRbitvalue colorMaterial[CR_MAX_BITARRAY];
33 CRbitvalue lightModel[CR_MAX_BITARRAY];
34 CRbitvalue material[CR_MAX_BITARRAY];
35 CRbitvalue enable[CR_MAX_BITARRAY];
36 CRLightBits *light;
37} CRLightingBits;
38
39typedef struct {
40 GLboolean enable;
41 GLcolorf ambient;
42 GLcolorf diffuse;
43 GLcolorf specular;
44 GLvectorf position;
45 GLvectorf objPosition;
46 GLfloat constantAttenuation;
47 GLfloat linearAttenuation;
48 GLfloat quadraticAttenuation;
49 GLvectorf spotDirection;
50 GLfloat spotExponent;
51 GLfloat spotCutoff;
52} CRLight;
53
54typedef struct {
55 GLboolean lighting;
56 GLboolean colorMaterial;
57 GLenum shadeModel;
58 GLenum colorMaterialMode;
59 GLenum colorMaterialFace;
60 GLcolorf ambient[2]; /* material front/back */
61 GLcolorf diffuse[2]; /* material front/back */
62 GLcolorf specular[2]; /* material front/back */
63 GLcolorf emission[2]; /* material front/back */
64 GLfloat shininess[2]; /* material front/back */
65 GLint indexes[2][3]; /* material front/back amb/diff/spec */
66 GLcolorf lightModelAmbient;
67 GLboolean lightModelLocalViewer;
68 GLboolean lightModelTwoSide;
69#if defined(CR_EXT_separate_specular_color) || defined(CR_OPENGL_VERSION_1_2)
70 GLenum lightModelColorControlEXT; /* CR_EXT_separate_specular_color */
71#endif
72 GLboolean colorSumEXT; /* CR_EXT_secondary_color */
73 CRLight *light;
74} CRLightingState;
75
76DECLEXPORT(void) crStateLightingInitBits (CRLightingBits *l);
77DECLEXPORT(void) crStateLightingDestroyBits (CRLightingBits *l);
78DECLEXPORT(void) crStateLightingInit (CRContext *ctx);
79DECLEXPORT(void) crStateLightingDestroy (CRContext *ctx);
80
81DECLEXPORT(void) crStateLightingDiff(CRLightingBits *bb, CRbitvalue *bitID,
82 CRContext *fromCtx, CRContext *toCtx);
83DECLEXPORT(void) crStateLightingSwitch(CRLightingBits *bb, CRbitvalue *bitID,
84 CRContext *fromCtx, CRContext *toCtx);
85
86DECLEXPORT(void) crStateColorMaterialRecover( void );
87
88#ifdef __cplusplus
89}
90#endif
91
92#endif /* CR_STATE_LIGHTING_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