VirtualBox

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

最後變更 在這個檔案從15532是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 2.6 KB
 
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) crStateLightingInit (CRContext *ctx);
78DECLEXPORT(void) crStateLightingDestroy (CRContext *ctx);
79
80DECLEXPORT(void) crStateLightingDiff(CRLightingBits *bb, CRbitvalue *bitID,
81 CRContext *fromCtx, CRContext *toCtx);
82DECLEXPORT(void) crStateLightingSwitch(CRLightingBits *bb, CRbitvalue *bitID,
83 CRContext *fromCtx, CRContext *toCtx);
84
85DECLEXPORT(void) crStateColorMaterialRecover( void );
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* CR_STATE_LIGHTING_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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