diff options
author | unknown <Constantin@.(none)> | 2010-01-17 01:20:51 +0100 |
---|---|---|
committer | unknown <Constantin@.(none)> | 2010-01-17 01:20:51 +0100 |
commit | 67575ef92fc93cd63d3f6518feefcdf8f4625968 (patch) | |
tree | a65fca4b7c51a5e335d7bba90541ec0afa24d20d | |
parent | f382c18643d16bf6656e508d611817aaf0c29704 (diff) | |
download | c3d-67575ef92fc93cd63d3f6518feefcdf8f4625968.tar c3d-67575ef92fc93cd63d3f6518feefcdf8f4625968.zip |
windows unterstützung
-rw-r--r-- | Cuboid.h | 34 | ||||
-rw-r--r-- | DisplayClass.h | 10 | ||||
-rw-r--r-- | main.cpp | 7 |
3 files changed, 24 insertions, 27 deletions
@@ -5,26 +5,26 @@ #include <list> -class Cuboid
-{
+class Cuboid +{ public: Cuboid() : width(0), height(0), depth(0), x(0), y(0), z(0) {} - Cuboid(float width, float height, float depth);
- Cuboid(float width, float height, float depth, float x, float y, float z);
- float getHeight();
- float getWidth();
- float getDepth();
- float getPosX();
- float getPosY();
- float getPosZ();
- void setSize(float w, float h, float d);
- void setPos(float x, float y, float z);
- std::list<Triangle> getTriangles();
-
+ Cuboid(float width, float height, float depth); + Cuboid(float width, float height, float depth, float x, float y, float z); + float getHeight(); + float getWidth(); + float getDepth(); + float getPosX(); + float getPosY(); + float getPosZ(); + void setSize(float w, float h, float d); + void setPos(float x, float y, float z); + std::list<Triangle> getTriangles(); + private: - float width, height, depth;
+ float width, height, depth; float x, y, z; -
-};
+ +}; #endif /*_CUBOID_H_*/ diff --git a/DisplayClass.h b/DisplayClass.h index ab9add0..2145966 100644 --- a/DisplayClass.h +++ b/DisplayClass.h @@ -5,12 +5,12 @@ #include "Temparray.h" #include "BSPTree.h" -class DisplayClass
-{
+class DisplayClass +{ public: DisplayClass(int x, int y, int z); virtual ~DisplayClass(); -
+ void renderScene(unsigned long delta); private: @@ -25,7 +25,7 @@ class DisplayClass float angle; //Cubehole cubehole0, cubehole1, cubehole2, cubehole3, cubehole4, cubehole5; std::list<Triangle> triangles; - //BSPTree *tree;
-};
+ //BSPTree *tree; +}; #endif /*_DISPLAYCLASS_H_*/ @@ -223,10 +223,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } 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); - glClearDepth(1.0); + delta = GetTickCount()-ticks; if(delta < MIN_FRAME_DELTA) { @@ -236,7 +233,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine ticks += delta; - static DisplayClass render(); + static DisplayClass render(5, 5, 5); render.renderScene(delta); SwapBuffers(hDC); } |