Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modified the dude's lamp array init

  • Loading branch information...
commit 969286e67023830ca146bf61ecbf748e19ed2a79 1 parent 1a254d6
@aaw5017 aaw5017 authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 dude.cpp
  2. BIN  game
View
17 dude.cpp
@@ -15,9 +15,18 @@ dude::dude(world* ww)
lampOil = 100.00;
lamp = GL_LIGHT7;
lampState = false;
- lampAmb = { 1.0, 1.0, 1.0, 1.0 };
- lampDif = { 0.3,0.3,0.3, 1.0 };
- lampSpec = { 0.3,0.3,0.3, 1.0 };
+ lampAmb[0] = 1.0;
+ lampAmb[1] = 1.0;
+ lampAmb[2] = 1.0;
+ lampAmb[3] = 1.0;
+ lampDif[0] = 1.0;
+ lampDif[1] = 1.0;
+ lampDif[2] = 1.0;
+ lampDif[3] = 1.0;
+ lampSpec[0] = 1.0;
+ lampSpec[1] = 1.0;
+ lampSpec[2] = 1.0;
+ lampSpec[3] = 1.0;
lampPos[3] = 1.0; // Set the dude's light as positional
}
@@ -191,7 +200,7 @@ void dude::goBackward(){
// The dude's lamp will ALWAYS be GL_LIGHT7 (the last one available)
void dude::setLamp() {
- //cout << lampOil << endl;
+ //cout << lampOil << endl;
glLightfv(lamp, GL_AMBIENT, lampAmb);
glLightfv(lamp, GL_DIFFUSE, lampDif);
glLightfv(lamp, GL_SPECULAR, lampSpec);
View
BIN  game
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.