-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnodes.cpp
37 lines (31 loc) · 998 Bytes
/
nodes.cpp
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
36
37
#include <cppunit/TestCase.h>
#include "System/Logger.h"
#include "System/Config.h"
#include "Scene/Camera.h"
#include "Scene/Node.h"
#include "Scene/Light.h"
#include "Mesh/Mesh.h"
#include "Application/XCB/XCBWindow.h"
#include "Shader/Shaders.h"
class NodeTest : public CppUnit::TestCase {
public:
NodeTest( std::string name ) : CppUnit::TestCase( name ) {}
void runTest() {
QList<string> attributes = QList<string>();
attributes.push_back("uv");
XCBWindow * window = new XCBWindow();
Camera * camera = new Camera();
Light * light = new Light(QVector3D(0, 0, 0),QVector3D(0, -5, 0));
Mesh * mesh = new Mesh(attributes); //Geometry::plane(attributes, QRectF(0.5,0,0.5,1)
ShaderProgram * shader = new VertFragProgram("Texture/texture",attributes);
Node * node = new Node("Test", QVector3D(0,0,0), 1, mesh, shader);
delete camera;
delete light;
delete node;
delete window;
}
};
int main() {
NodeTest foo("bar");
foo.runTest();
}