VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_lighting.txt@ 78375

Last change on this file since 78375 was 78375, checked in by vboxsync, 6 years ago

Additions/common/crOpengl,GuestHost/OpenGL,HostServices/SharedOpenGL: Eliminate all global variables from the state tracker library (state_tracker) in preparation of the SPU DLL merging, bugref:9435

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 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:colorMaterial:colorMaterialFace,colorMaterialMode:ColorMaterial
6:enable:lighting:GL_LIGHTING
7:enable:colorMaterial:GL_COLOR_MATERIAL
8:enable:colorSumEXT:GL_COLOR_SUM_EXT
9:shadeModel:shadeModel:ShadeModel
10:lightModel:lightModelAmbient|r,g,b,a:LightModelfv,GL_LIGHT_MODEL_AMBIENT
11:lightModel:lightModelLocalViewer:*pState->diff_api.LightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, to->lightModelLocalViewer==GL_TRUE);
12:lightModel:lightModelTwoSide:*pState->diff_api.LightModeli(GL_LIGHT_MODEL_TWO_SIDE, to->lightModelTwoSide==GL_TRUE);
13:lightModel:lightModelColorControlEXT:*pState->diff_api.LightModeli(GL_LIGHT_MODEL_COLOR_CONTROL_EXT, to->lightModelColorControlEXT);
14%flush
15:material:ambient[0]|r,g,b,a:Materialfv, GL_FRONT, GL_AMBIENT
16:material:ambient[1]|r,g,b,a:Materialfv, GL_BACK, GL_AMBIENT
17:material:diffuse[0]|r,g,b,a:Materialfv, GL_FRONT, GL_DIFFUSE
18:material:diffuse[1]|r,g,b,a:Materialfv, GL_BACK, GL_DIFFUSE
19:material:specular[0]|r,g,b,a:Materialfv, GL_FRONT, GL_SPECULAR
20:material:specular[1]|r,g,b,a:Materialfv, GL_BACK, GL_SPECULAR
21:material:emission[0]|r,g,b,a:Materialfv, GL_FRONT, GL_EMISSION
22:material:emission[1]|r,g,b,a:Materialfv, GL_BACK, GL_EMISSION
23:material:shininess[0]:Materialf, GL_FRONT, GL_SHININESS
24:material:shininess[1]:Materialf, GL_BACK, GL_SHININESS
25%flush
26>for (i=0; i<CR_MAX_LIGHTS; i++) {
27>CRLightBits *lb = b->light+i;
28>CRLight *tl = to->light+i;
29>CRLight *cl = from->light+i;
30>if (!(CHECKDIRTY(lb->dirty, bitID))) continue;
31%target=tl
32%current=cl
33%bit=lb
34%extrabit=b
35:enable:enable:GL_LIGHT0+i
36%flush
37:ambient:ambient|r,g,b,a:Lightfv, GL_LIGHT0+i, GL_AMBIENT
38:diffuse:diffuse|r,g,b,a:Lightfv, GL_LIGHT0+i, GL_DIFFUSE
39:specular:specular|r,g,b,a:Lightfv, GL_LIGHT0+i, GL_SPECULAR
40:attenuation:constantAttenuation:Lightf, GL_LIGHT0+i, GL_CONSTANT_ATTENUATION
41:attenuation:linearAttenuation:Lightf, GL_LIGHT0+i, GL_LINEAR_ATTENUATION
42:attenuation:quadraticAttenuation:Lightf, GL_LIGHT0+i, GL_QUADRATIC_ATTENUATION
43:position:*pState->diff_api.MatrixMode(GL_MODELVIEW);
44:position:*pState->diff_api.PushMatrix();
45:position:*pState->diff_api.LoadIdentity();
46:position:position|x,y,z,w:Lightfv, GL_LIGHT0+i, GL_POSITION
47:position:*pState->diff_api.PopMatrix();
48:position:*pState->diff_api.MatrixMode(toCtx->transform.matrixMode);
49:spot:*pState->diff_api.MatrixMode(GL_MODELVIEW);
50:spot:*pState->diff_api.PushMatrix();
51:spot:*pState->diff_api.LoadIdentity();
52:spot:spotDirection|x,y,z:Lightfv, GL_LIGHT0+i, GL_SPOT_DIRECTION
53:spot:spotExponent:Lightf, GL_LIGHT0+i, GL_SPOT_EXPONENT
54:spot:spotCutoff:Lightf, GL_LIGHT0+i, GL_SPOT_CUTOFF
55:spot:*pState->diff_api.PopMatrix();
56:spot:*pState->diff_api.MatrixMode(toCtx->transform.matrixMode);
57%flush
58>CLEARDIRTY(lb->dirty, nbitID);
59>}
60%target=to
61%current=from
62%bit=b
63%extrabit=
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