From 67575ef92fc93cd63d3f6518feefcdf8f4625968 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Jan 2010 01:20:51 +0100 Subject: =?UTF-8?q?windows=20unterst=FCtzung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cuboid.h | 34 +++++++++++++++++----------------- DisplayClass.h | 10 +++++----- main.cpp | 7 ++----- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/Cuboid.h b/Cuboid.h index 25d9f73..d1c600d 100644 --- a/Cuboid.h +++ b/Cuboid.h @@ -5,26 +5,26 @@ #include -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 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 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 triangles; - //BSPTree *tree; -}; + //BSPTree *tree; +}; #endif /*_DISPLAYCLASS_H_*/ diff --git a/main.cpp b/main.cpp index 8d59951..d0a294c 100644 --- a/main.cpp +++ b/main.cpp @@ -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); } -- cgit v1.2.3