summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DisplayClass.cpp27
-rw-r--r--DisplayClass.h2
-rw-r--r--main.cpp6
3 files changed, 28 insertions, 7 deletions
diff --git a/DisplayClass.cpp b/DisplayClass.cpp
index b278812..b47fc48 100644
--- a/DisplayClass.cpp
+++ b/DisplayClass.cpp
@@ -6,17 +6,32 @@
DisplayClass::Renderer DisplayClass::renderer;
DisplayClass::DisplayClass() {
- cubehole0 = Cubehole(3.0, 6.0, 3.0, 0.0, 0.0, 0.0, 2.0, 2.0,
+ cubehole0 = Cubehole(3.0, 6.0, 3.0, 0.0, 0.0, 0.0, 2.5, 2.5,
vmml::vec4f(1.0, 0.85, 0.06, 0.5),
vmml::vec4f(1.0, 0.85, 0.06, 0.5),
vmml::vec4f(1.0, 0.85, 0.06, 0.5),
vmml::vec4f(1.0, 0.85, 0.06, 0.5));
- cubehole1 = Cubehole(2.0, 6.0, 2.0, 0.0, 0.0, 0.0, 1.0, 1.0,
+ cubehole1 = Cubehole(2.5, 6.0, 2.5, 0.0, 0.0, 0.0, 2.0, 2.0,
vmml::vec4f(0.0, 0.85, 0.06, 0.5),
vmml::vec4f(0.0, 0.85, 0.06, 0.5),
vmml::vec4f(0.0, 0.85, 0.06, 0.5),
vmml::vec4f(0.0, 0.85, 0.06, 0.5));
- cubehole2 = Cubehole(1.0, 6.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ cubehole2 = Cubehole(2.0, 6.0, 2.0, 0.0, 0.0, 0.0, 1.5, 1.5,
+ vmml::vec4f(1.0, 0.0, 0.06, 0.5),
+ vmml::vec4f(1.0, 0.0, 0.06, 0.5),
+ vmml::vec4f(1.0, 0.0, 0.06, 0.5),
+ vmml::vec4f(1.0, 0.0, 0.06, 0.5));
+ cubehole3 = Cubehole(1.5, 6.0, 1.5, 0.0, 0.0, 0.0, 1.0, 1.0,
+ vmml::vec4f(1.0, 0.85, 0.06, 0.5),
+ vmml::vec4f(1.0, 0.85, 0.06, 0.5),
+ vmml::vec4f(1.0, 0.85, 0.06, 0.5),
+ vmml::vec4f(1.0, 0.85, 0.06, 0.5));
+ cubehole4 = Cubehole(1.0, 6.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.5,
+ vmml::vec4f(0.0, 0.85, 0.06, 0.5),
+ vmml::vec4f(0.0, 0.85, 0.06, 0.5),
+ vmml::vec4f(0.0, 0.85, 0.06, 0.5),
+ vmml::vec4f(0.0, 0.85, 0.06, 0.5));
+ cubehole5 = Cubehole(0.5, 6.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0,
vmml::vec4f(1.0, 0.0, 0.06, 0.5),
vmml::vec4f(1.0, 0.0, 0.06, 0.5),
vmml::vec4f(1.0, 0.0, 0.06, 0.5),
@@ -45,6 +60,12 @@ void DisplayClass::renderScene(unsigned long delta)
triangles.splice(triangles.end(), t1);
std::list<Triangle> t2 = cubehole2.getTriangles();
triangles.splice(triangles.end(), t2);
+ std::list<Triangle> t3 = cubehole3.getTriangles();
+ triangles.splice(triangles.end(), t3);
+ std::list<Triangle> t4 = cubehole4.getTriangles();
+ triangles.splice(triangles.end(), t4);
+ std::list<Triangle> t5 = cubehole5.getTriangles();
+ triangles.splice(triangles.end(), t5);
BSPTree tree(triangles);
diff --git a/DisplayClass.h b/DisplayClass.h
index 2a28681..406239a 100644
--- a/DisplayClass.h
+++ b/DisplayClass.h
@@ -19,7 +19,7 @@ class DisplayClass
static Renderer renderer;
- Cubehole cubehole0, cubehole1, cubehole2;
+ Cubehole cubehole0, cubehole1, cubehole2, cubehole3, cubehole4, cubehole5;
};
#endif /*_DISPLAYCLASS_H_*/
diff --git a/main.cpp b/main.cpp
index 632c3b9..0132992 100644
--- a/main.cpp
+++ b/main.cpp
@@ -18,13 +18,13 @@ void initGL(bool multisample);
void resize(int width, int height);
void initGL(bool multisample) {
- glClearColor(0.0, 0.0, 0.0, 1.0);//glClearColor(1.0, 0.85, 0.06, 1.0);
+ glClearColor(0.3, 0.5, 0.8, 1.0);//glClearColor(1.0, 0.85, 0.06, 1.0);
glClearDepth(1.0);
//glEnable(GL_DEPTH_TEST);
//glDepthFunc(GL_LEQUAL);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ //glEnable(GL_BLEND);
+ //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
#ifndef _WIN32
if(multisample)