summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-01-04 21:42:54 +0000
committerTim Redfern <tim@eclectronics.org>2012-01-04 21:42:54 +0000
commit64a4a42ee6826584c38c09a2b5976356e4488993 (patch)
tree3143e5ba192dbc78f110670e76f45e314fcf6910 /src
parent8b01f111e874493d0c3ecb0113a7639116c09c5c (diff)
got the lighting trick
Diffstat (limited to 'src')
-rw-r--r--src/testApp.cpp4
-rw-r--r--src/viewpoint.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/testApp.cpp b/src/testApp.cpp
index e9ae5ee..5bd6f0a 100644
--- a/src/testApp.cpp
+++ b/src/testApp.cpp
@@ -4,16 +4,18 @@
void testApp::setup(){
ofBackground(0,0,0);
+
///ofSetVerticalSync(true);
//some model / light stuff
glEnable (GL_DEPTH_TEST);
glShadeModel (GL_SMOOTH);
- // initialize lighting
+ //initialize lighting
//glEnable (GL_LIGHTING);
glColorMaterial (GL_FRONT_AND_BACK, GL_DIFFUSE);
glEnable (GL_COLOR_MATERIAL);
+
//load the bottle model - the 3ds and the texture file need to be in the same folder
bottle.loadModel("bottle.3DS", 1);
diff --git a/src/viewpoint.cpp b/src/viewpoint.cpp
index 62d5f64..efb6894 100644
--- a/src/viewpoint.cpp
+++ b/src/viewpoint.cpp
@@ -31,7 +31,7 @@ void viewpoint::setup(int ln,float w, float h, float x, float y) {
getLightPosition=new GLfloat[4];
light.enable();
- light.setPointLight();
+ light.setDirectional();
}
//--------------------------------------------------------------
void viewpoint::setLight(){