diff options
author | Constantin Riß <constantin.riss@dre.de> | 2009-12-10 22:59:23 +0100 |
---|---|---|
committer | Constantin Riß <constantin.riss@dre.de> | 2009-12-10 22:59:23 +0100 |
commit | 74d4f23ef8e05180ea764a3b50aadb3dfa5292bd (patch) | |
tree | 338f6067f5422692c35f40b5bb760df8ded03949 | |
parent | 2b8bc4d3b606a1cfe77e3bfe374f6d395556e402 (diff) | |
download | c3d-74d4f23ef8e05180ea764a3b50aadb3dfa5292bd.tar c3d-74d4f23ef8e05180ea764a3b50aadb3dfa5292bd.zip |
Blend deaktiviert.
-rw-r--r-- | DisplayClass.cpp | 27 | ||||
-rw-r--r-- | DisplayClass.h | 2 | ||||
-rw-r--r-- | main.cpp | 6 |
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_*/ @@ -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) |