summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-01-17 18:20:19 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-01-17 18:20:19 +0100
commitbb5829eaf5cad431bfe3a8c7df2634fedc27a9f2 (patch)
tree0a26c0a1c95cb1684bfb8ed9b3e9eaf39850d41f
parentf00836e839d7188dc16cb8c17bd82b4b172029d5 (diff)
downloadc3d-bb5829eaf5cad431bfe3a8c7df2634fedc27a9f2.tar
c3d-bb5829eaf5cad431bfe3a8c7df2634fedc27a9f2.zip
startet ein bisschen anders/weniger Blöcke aufgrund langsamkeit
-rw-r--r--DisplayClass.cpp13
-rw-r--r--DisplayClass.h1
-rw-r--r--main.cpp2
3 files changed, 12 insertions, 4 deletions
diff --git a/DisplayClass.cpp b/DisplayClass.cpp
index d5d6b50..712251a 100644
--- a/DisplayClass.cpp
+++ b/DisplayClass.cpp
@@ -48,9 +48,11 @@ DisplayClass::DisplayClass(int x, int y, int z) : angle(0) {
std::list<Triangle> t5 = cubehole5.getTriangles();
triangles.splice(triangles.end(), t5);*/
- Temparray temp(20, x, y, z);
- triangles=temp.getTriangles();
-
+// Temparray temp(20, x, y, z);
+// triangles=temp.getTriangles();
+this->x=x;
+this->y=y;
+this->z=z;
//tree = new BSPTree(triangles);
}
@@ -72,6 +74,11 @@ void DisplayClass::renderScene(unsigned long delta) {
glRotatef(angle*3, 0.0, 0.0, 1.0);
glRotatef(-angle*5, 1.0, 1.0, 1.0);
+
+ Temparray temp(20, x, y, z);
+ triangles=temp.getTriangles();
+ temp.calcTemp();
+
//vmml::mat4f transform, inverseTransform;
//glGetFloatv(GL_MODELVIEW_MATRIX, transform.array);
diff --git a/DisplayClass.h b/DisplayClass.h
index 2145966..175a1dc 100644
--- a/DisplayClass.h
+++ b/DisplayClass.h
@@ -23,6 +23,7 @@ class DisplayClass
static Renderer render;
float angle;
+ int x, y, z;
//Cubehole cubehole0, cubehole1, cubehole2, cubehole3, cubehole4, cubehole5;
std::list<Triangle> triangles;
//BSPTree *tree;
diff --git a/main.cpp b/main.cpp
index d0a294c..27e4983 100644
--- a/main.cpp
+++ b/main.cpp
@@ -233,7 +233,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
ticks += delta;
- static DisplayClass render(5, 5, 5);
+ static DisplayClass render(3, 3, 3);
render.renderScene(delta);
SwapBuffers(hDC);
}