Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
217 changes: 217 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml
*.publishproj

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[cod]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg
DualContourSample.VC.opendb
18 changes: 16 additions & 2 deletions DualContourSample.sln
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DualContourSample", "DualContouringSample\DualContourSample.vcxproj", "{91867484-0299-425E-8721-AF4A7D239ECA}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.xproj", "{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{91867484-0299-425E-8721-AF4A7D239ECA}.Debug|Any CPU.ActiveCfg = Debug|Win32
{91867484-0299-425E-8721-AF4A7D239ECA}.Debug|Win32.ActiveCfg = Debug|Win32
{91867484-0299-425E-8721-AF4A7D239ECA}.Debug|Win32.Build.0 = Debug|Win32
{91867484-0299-425E-8721-AF4A7D239ECA}.Release|Any CPU.ActiveCfg = Release|Win32
{91867484-0299-425E-8721-AF4A7D239ECA}.Release|Win32.ActiveCfg = Release|Win32
{91867484-0299-425E-8721-AF4A7D239ECA}.Release|Win32.Build.0 = Release|Win32
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Debug|Win32.ActiveCfg = Debug|Any CPU
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Debug|Win32.Build.0 = Debug|Any CPU
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Release|Any CPU.Build.0 = Release|Any CPU
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Release|Win32.ActiveCfg = Release|Any CPU
{96C56B0A-44A9-4F1F-A81A-708AEBD4E898}.Release|Win32.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
18 changes: 13 additions & 5 deletions DualContouringSample/DualContourSample.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -14,18 +14,19 @@
<ProjectGuid>{91867484-0299-425E-8721-AF4A7D239ECA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>DualContourStarter</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand All @@ -41,6 +42,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<ExtensionsToDeleteOnClean>*.cdf;*.cache;*.obj;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi;*.dll</ExtensionsToDeleteOnClean>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
Expand All @@ -53,14 +55,20 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>false</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir)\SDL2-2.0.3\include;$(SolutionDir)\glew-1.9.0\include;$(SolutionDir)\glm-0.9.3.4</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)\SDL2-2.0.4\include;$(SolutionDir)\glew-2.0.0\include;$(SolutionDir)\glm-0.9.8.0</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\SDL2-2.0.3\lib\x86;$(SolutionDir)\glew-1.9.0\lib</AdditionalLibraryDirectories>
<AdditionalDependencies>opengl32.lib;glew32.lib;SDL2main.lib;SDL2.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(SolutionDir)lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>XCOPY "$(SolutionDir)"\lib\*.DLL "$(TargetDir)" /D /K /Y</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy DLLs to Target Director</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand Down
3 changes: 2 additions & 1 deletion DualContouringSample/glsl_program.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
#include "glsl_program.h"
#include <fstream>
#include <sstream>
Expand Down Expand Up @@ -123,7 +124,7 @@ bool GLSLProgram::link()

if (GLenum err = glGetError() != GL_NO_ERROR)
{
printf("GLSLProgram: err=%d\n");
printf("GLSLProgram: err=%d\n", err);
return false;
}

Expand Down
10 changes: 6 additions & 4 deletions DualContouringSample/main.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

#include <stdio.h>
#include <stdlib.h>

#include <GL\glew.h>
#include <GL/glew.h>
#include <SDL.h>
#include <SDL_opengl.h>
#include <glm\glm.hpp>
#include <glm/glm.hpp>

#include "glsl_program.h"
#include "mesh.h"
Expand All @@ -16,8 +18,8 @@ void HandleMouseMove(const SDL_MouseMotionEvent& e, float& rotateXAxis, float& r
{
if (e.state & SDL_BUTTON_LMASK)
{
rotateXAxis += (float)e.yrel * 0.5f;
rotateYAxis += (float)e.xrel * 0.5f;
rotateXAxis += float(e.yrel) * 0.5f;
rotateYAxis += float(e.xrel) * 0.5f;

rotateXAxis = glm::min(80.f, rotateXAxis);
rotateXAxis = glm::max(-80.f, rotateXAxis);
Expand Down
16 changes: 16 additions & 0 deletions SDL2-2.0.4/BUGS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Bugs are now managed in the SDL bug tracker, here:

http://bugzilla.libsdl.org/

You may report bugs there, and search to see if a given issue has already
been reported, discussed, and maybe even fixed.


You may also find help on the SDL mailing list. Subscription information:

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
bugs discussed on the mailing list may be forgotten or missed.

20 changes: 20 additions & 0 deletions SDL2-2.0.4/COPYING.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Simple DirectMedia Layer
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Loading