Skip to content

Commit 1a83b58

Browse files
committed
GITechDemo:
*Started organizing code and separating platform specific from non-platform specific logic (WIP) *Dropped the loading of resources on a separate thread (at least for now) and returned to targeting the Visual Studio 2010 Platform Toolset LibRenderer: *When resizing the window,, the former size in memory of the dynamic render target buffer wasn't reset, leading to larger and larger buffers when repeatedly resizing the window *Other minor fixes
1 parent 25a8389 commit 1a83b58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3825
-3657
lines changed

GITechDemo/Build/build_win.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# 'profile' to build on the Profile configuration
1010

1111
PROJECT_NAME = "GITechDemo"
12-
DEFAULT_VSCOMNTOOLS = "VS120COMNTOOLS"
12+
DEFAULT_VSCOMNTOOLS = "VS140COMNTOOLS"
1313
FORCE_REBUILD = False
1414
BUILD_CONFIGURATION = "Release"
1515

@@ -85,10 +85,10 @@ def buildsln(pathToTools, platform, buildConfig):
8585
pathToTools = os.getenv("VS140COMNTOOLS")
8686
elif(os.getenv("VS120COMNTOOLS")): # Visual Studio 2013
8787
pathToTools = os.getenv("VS120COMNTOOLS")
88-
#elif(os.getenv("VS110COMNTOOLS")): # Visual Studio 2012
89-
# pathToTools = os.getenv("VS110COMNTOOLS")
90-
#elif(os.getenv("VS100COMNTOOLS")): # Visual Studio 2010
91-
# pathToTools = os.getenv("VS100COMNTOOLS")
88+
elif(os.getenv("VS110COMNTOOLS")): # Visual Studio 2012
89+
pathToTools = os.getenv("VS110COMNTOOLS")
90+
elif(os.getenv("VS100COMNTOOLS")): # Visual Studio 2010
91+
pathToTools = os.getenv("VS100COMNTOOLS")
9292
#elif(os.getenv("VS90COMNTOOLS")): # Visual Studio 2008
9393
# pathToTools = os.getenv("VS90COMNTOOLS")
9494
#elif(os.getenv("VS80COMNTOOLS")): # Visual Studio 2005
@@ -111,12 +111,12 @@ def buildsln(pathToTools, platform, buildConfig):
111111
makedir(rootBuildDir + "/data")
112112

113113
# Copy 64bit binaries
114-
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.exe")
115-
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.dll")
114+
copyfiles("../Bin/x64/" + BUILD_CONFIGURATION + "/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.exe")
115+
copyfiles("../Bin/x64/" + BUILD_CONFIGURATION + "/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.dll")
116116

117117
# Copy 32bit binaries
118-
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.exe")
119-
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.dll")
118+
copyfiles("../Bin/Win32/" + BUILD_CONFIGURATION + "/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.exe")
119+
copyfiles("../Bin/Win32/" + BUILD_CONFIGURATION + "/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.dll")
120120

121121
# Copy data
122122
copytree("../Data/", rootBuildDir + "/data")
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#ifndef APP_H_
2+
#define APP_H_
3+
4+
#define CREATE_APP(CLASS) \
5+
App* AppMain = new CLASS();
6+
7+
#include <gmtl\gmtl.h>
8+
using namespace gmtl;
9+
10+
class App
11+
{
12+
public:
13+
virtual ~App() {}
14+
15+
virtual void Init(void* hWnd) = 0;
16+
virtual void Update(const float fDeltaTime) = 0;
17+
virtual void Draw() = 0;
18+
19+
protected:
20+
struct Camera
21+
{
22+
Camera() : fSpeedFactor(1.f) {}
23+
24+
Vec3f vPos;
25+
Matrix44f mRot;
26+
Vec3f vMoveVec;
27+
float fSpeedFactor;
28+
} tCamera;
29+
30+
public:
31+
Camera& GetCamera() { return tCamera; }
32+
};
33+
34+
extern App* AppMain;
35+
36+
#endif
Binary file not shown.

GITechDemo/Code/AppMain/GITechDemo/Resource.h renamed to GITechDemo/Code/AppMain/Framework/Windows/Resource.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
//{{NO_DEPENDENCIES}}
22
// Microsoft Visual C++ generated include file.
3-
// Used by GITechDemo.rc
3+
// Used by Framework.rc
44
//
55

66
#define IDS_APP_TITLE 103
77

88
#define IDR_MAINFRAME 128
9-
#define IDD_GITECHDEMO_DIALOG 102
9+
#define IDD_FRAMEWORK_DIALOG 102
1010
#define IDD_ABOUTBOX 103
1111
#define IDM_ABOUT 104
1212
#define IDM_EXIT 105
13-
#define IDI_GITECHDEMO 107
13+
#define IDI_FRAMEWORK 107
1414
#define IDI_SMALL 108
15-
#define IDC_GITECHDEMO 109
15+
#define IDC_FRAMEWORK 109
1616
#define IDC_MYICON 2
1717
#ifndef IDC_STATIC
1818
#define IDC_STATIC -1

0 commit comments

Comments
 (0)