Skip to content

Commit

Permalink
GITechDemo changes:
Browse files Browse the repository at this point in the history
* Implemented HDR rendering, tone mapping and bloom
* Proper gamma correction is performed and all shading is done in linear space
* Modified build script to give the option of creating a profile build (includes performance markers)
* Added a Gaussian kernel generator
* Light tuning

LibRenderer changes:
* Added support for sRGB textures and render targets
* Various minor bug fixes
  • Loading branch information
iftodebogdan committed Jun 7, 2015
1 parent b88c5df commit 8b38b6d
Show file tree
Hide file tree
Showing 33 changed files with 1,569 additions and 390 deletions.
47 changes: 28 additions & 19 deletions GITechDemo/Build/build_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
import errno
import sys

# Arguments:
# 'rebuild' to force rebuilding the solution
# 'profile' to build on the Profile configuration

PROJECT_NAME = "GITechDemo"
DEFAULT_VSCOMNTOOLS = "VS120COMNTOOLS"
FORCE_REBUILD = False
BUILD_CONFIGURATION = "Release"

def copyfiles(srcdir, dstdir, filepattern):
def failed(exc):
Expand Down Expand Up @@ -50,9 +55,9 @@ def copytree(src, dst, symlinks = False, ignore = None):
else:
shutil.copy2(s, d)

def buildsln(pathToTools, platform):
def buildsln(pathToTools, platform, buildConfig):
cmd = "\"" + pathToTools + "VsDevCmd.bat\" && "
cmd += "MSBuild.exe /maxcpucount /p:Configuration=Release /p:Platform=" + platform
cmd += "MSBuild.exe /maxcpucount /p:Configuration=" + buildConfig + " /p:Platform=" + platform
if(FORCE_REBUILD):
cmd += " /t:rebuild "
else:
Expand All @@ -66,8 +71,11 @@ def buildsln(pathToTools, platform):
#os.system('reg delete "HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "12.0"')
#os.system("reg add \"HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7\" /v \"12.0\" /t REG_SZ /d \"C:\Program Files (x86)\Microsoft Visual Studio 12.0\\\\\"")

if(len(sys.argv) > 1 and sys.argv[1] == "rebuild"):
FORCE_REBUILD = True;
for opt in sys.argv:
if(opt == "rebuild"):
FORCE_REBUILD = True
if(opt == "profile"):
BUILD_CONFIGURATION = "Profile"

print("\nStarting build process...\n")

Expand All @@ -89,31 +97,32 @@ def buildsln(pathToTools, platform):
print("No compatible version of Visual Studio found!\n")

if(pathToTools):
buildsln(pathToTools, "x86")
buildsln(pathToTools, "x64")
buildsln(pathToTools, "x86", BUILD_CONFIGURATION)
buildsln(pathToTools, "x64", BUILD_CONFIGURATION)

print("\nConfiguring build...\n");
print("\nConfiguring build...\n")

# Create directory structure
rootBuildDir = "Windows/" + BUILD_CONFIGURATION + "/" + PROJECT_NAME
makedir("Windows")
makedir("Windows/bin")
makedir("Windows/bin/x64")
makedir("Windows/bin/x86")
makedir("Windows/data")
makedir(rootBuildDir + "/bin")
makedir(rootBuildDir + "/bin/x64")
makedir(rootBuildDir + "/bin/x86")
makedir(rootBuildDir + "/data")

# Copy 64bit binaries
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", "./Windows/bin/x64", "*.exe")
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", "./Windows/bin/x64", "*.dll")
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.exe")
copyfiles("../Bin/x64/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x64", "*.dll")

# Copy 32bit binaries
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", "./Windows/bin/x86", "*.exe")
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", "./Windows/bin/x86", "*.dll")
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.exe")
copyfiles("../Bin/Win32/Release/" + PROJECT_NAME + "/", rootBuildDir + "/bin/x86", "*.dll")

# Copy data
copytree("../Data/", "./Windows/data")
copytree("../Data/", rootBuildDir + "/data")

# Create x64 batch files
x64bat = open("./Windows/run_x64.bat", "w")
x64bat = open(rootBuildDir + "/run_x64.bat", "w")
x64bat.write("\
@echo off\n\
:A\n\
Expand All @@ -124,7 +133,7 @@ def buildsln(pathToTools, platform):
x64bat.close()

# Create x86 batch files
x86bat = open("./Windows/run_x86.bat", "w")
x86bat = open(rootBuildDir + "/run_x86.bat", "w")
x86bat.write("\
@echo off\n\
:A\n\
Expand All @@ -134,4 +143,4 @@ def buildsln(pathToTools, platform):
exit")
x86bat.close()

print("DONE!");
print("DONE!")
Loading

0 comments on commit 8b38b6d

Please sign in to comment.