Add buildall.bat script for Windows. Also various example build fixes for Windows
This commit is contained in:
17
buildall.bat
Normal file
17
buildall.bat
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
REM If LLVM_INSTALL_DIR isn't set globally in your environment,
|
||||||
|
REM it can be set here_
|
||||||
|
set LLVM_INSTALL_DIR=c:\users\mmp\llvm-dev
|
||||||
|
|
||||||
|
REM Both the LLVM binaries and python need to be in the path
|
||||||
|
set path=%LLVM_INSTALL_DIR%\bin;%PATH%;c:\cygwin\bin
|
||||||
|
|
||||||
|
msbuild ispc.vcxproj /m:4 /V:m /p:Platform=Win32 /p:Configuration=Release
|
||||||
|
|
||||||
|
msbuild examples\examples.sln /m:4 /V:m /p:Platform=x64 /p:Configuration=Release
|
||||||
|
msbuild examples\examples.sln /m:4 /V:m /p:Platform=x64 /p:Configuration=Debug
|
||||||
|
msbuild examples\examples.sln /m:4 /V:m /p:Platform=Win32 /p:Configuration=Release
|
||||||
|
msbuild examples\examples.sln /m:4 /V:m /p:Platform=Win32 /p:Configuration=Debug
|
||||||
|
|
||||||
|
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#pragma warning (disable: 4244)
|
#pragma warning (disable: 4244)
|
||||||
#pragma warning (disable: 4305)
|
#pragma warning (disable: 4305)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
|
|||||||
@@ -36,9 +36,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
// Just enough of a float3 class to do what we need in this file.
|
// Just enough of a float3 class to do what we need in this file.
|
||||||
#ifdef _MSC_VER
|
|
||||||
__declspec(align(16))
|
|
||||||
#endif
|
|
||||||
struct float3 {
|
struct float3 {
|
||||||
float3() { }
|
float3() { }
|
||||||
float3(float xx, float yy, float zz) { x = xx; y = yy; z = zz; }
|
float3(float xx, float yy, float zz) { x = xx; y = yy; z = zz; }
|
||||||
@@ -298,7 +295,7 @@ volume_serial(float density[], int nVoxels[3], const float raster2camera[4][4],
|
|||||||
for (int y = 0; y < height; ++y) {
|
for (int y = 0; y < height; ++y) {
|
||||||
for (int x = 0; x < width; ++x, ++offset) {
|
for (int x = 0; x < width; ++x, ++offset) {
|
||||||
Ray ray;
|
Ray ray;
|
||||||
generateRay(raster2camera, camera2world, x, y, ray);
|
generateRay(raster2camera, camera2world, (float)x, (float)y, ray);
|
||||||
image[offset] = raymarch(density, nVoxels, ray);
|
image[offset] = raymarch(density, nVoxels, ray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user