-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestApp.cpp
More file actions
35 lines (28 loc) · 782 Bytes
/
testApp.cpp
File metadata and controls
35 lines (28 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup()
{
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
ofBackground(10, 10, 10);
camera.setDistance(10);
light.setPosition(10,30,-25);
objectLoader = new waveFrontLoader();
objectLoader->loadMaterial(true); //true or false depending on if a .mtl file exists
objectLoader->loadFile("test.obj");
mesh = objectLoader->generateMesh();
delete objectLoader;
}
//--------------------------------------------------------------
void testApp::update()
{
}
//--------------------------------------------------------------
void testApp::draw()
{
camera.begin();
light.enable();
mesh.draw();
light.disable();
camera.end();
}