gpuray_glsl

changeset 1:92695e89164b

vc project
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 09 Nov 2014 14:30:37 +0200
parents f234630e38ff
children 6e3a4daf3159
files anim/anim.c anim/anim.h gpuray_glsl.sln gpuray_glsl.vcxproj gpuray_glsl.vcxproj.filters src/texture.cc vmath/vmath.h vmath/vmath_config.h
diffstat 8 files changed, 467 insertions(+), 12 deletions(-) [+]
line diff
     1.1 --- a/anim/anim.c	Sun Nov 09 13:03:36 2014 +0200
     1.2 +++ b/anim/anim.c	Sun Nov 09 14:30:37 2014 +0200
     1.3 @@ -19,9 +19,11 @@
     1.4  
     1.5  	memset(node, 0, sizeof *node);
     1.6  
     1.7 +#ifdef ANIM_THREAD_SAFE
     1.8  	/* initialize thread-local matrix cache */
     1.9  	pthread_key_create(&node->cache_key, 0);
    1.10  	pthread_mutex_init(&node->cache_list_lock, 0);
    1.11 +#endif
    1.12  
    1.13  	for(i=0; i<ANM_NUM_TRACKS; i++) {
    1.14  		if(anm_init_track(node->tracks + i) == -1) {
    1.15 @@ -43,8 +45,10 @@
    1.16  		anm_destroy_track(node->tracks + i);
    1.17  	}
    1.18  
    1.19 +#ifdef ANIM_THREAD_SAFE
    1.20  	/* destroy thread-specific cache */
    1.21  	pthread_key_delete(node->cache_key);
    1.22 +#endif
    1.23  
    1.24  	while(node->cache_list) {
    1.25  		struct mat_cache *tmp = node->cache_list;
    1.26 @@ -383,19 +387,27 @@
    1.27  
    1.28  void anm_get_matrix(struct anm_node *node, mat4_t mat, anm_time_t tm)
    1.29  {
    1.30 +#ifdef ANIM_THREAD_SAFE
    1.31  	struct mat_cache *cache = pthread_getspecific(node->cache_key);
    1.32 +#else
    1.33 +	struct mat_cache *cache = node->cache_list;
    1.34 +#endif
    1.35  	if(!cache) {
    1.36  		cache = malloc(sizeof *cache);
    1.37  		assert(cache);
    1.38 +		cache->time = ANM_TIME_INVAL;
    1.39 +		cache->inv_time = ANM_TIME_INVAL;
    1.40  
    1.41 +#ifdef ANIM_THREAD_SAFE
    1.42  		pthread_mutex_lock(&node->cache_list_lock);
    1.43  		cache->next = node->cache_list;
    1.44  		node->cache_list = cache;
    1.45  		pthread_mutex_unlock(&node->cache_list_lock);
    1.46 -
    1.47 -		cache->time = ANM_TIME_INVAL;
    1.48 -		cache->inv_time = ANM_TIME_INVAL;
    1.49  		pthread_setspecific(node->cache_key, cache);
    1.50 +#else
    1.51 +		cache->next = node->cache_list;
    1.52 +		node->cache_list = cache;
    1.53 +#endif
    1.54  	}
    1.55  
    1.56  	if(cache->time != tm) {
    1.57 @@ -414,19 +426,27 @@
    1.58  
    1.59  void anm_get_inv_matrix(struct anm_node *node, mat4_t mat, anm_time_t tm)
    1.60  {
    1.61 +#ifdef ANIM_THREAD_SAFE
    1.62  	struct mat_cache *cache = pthread_getspecific(node->cache_key);
    1.63 +#else
    1.64 +	struct mat_cache *cache = node->cache_list;
    1.65 +#endif
    1.66  	if(!cache) {
    1.67  		cache = malloc(sizeof *cache);
    1.68  		assert(cache);
    1.69 +		cache->time = ANM_TIME_INVAL;
    1.70 +		cache->inv_time = ANM_TIME_INVAL;
    1.71  
    1.72 +#ifdef ANIM_THREAD_SAFE
    1.73  		pthread_mutex_lock(&node->cache_list_lock);
    1.74  		cache->next = node->cache_list;
    1.75  		node->cache_list = cache;
    1.76  		pthread_mutex_unlock(&node->cache_list_lock);
    1.77 -
    1.78 -		cache->inv_time = ANM_TIME_INVAL;
    1.79 -		cache->inv_time = ANM_TIME_INVAL;
    1.80  		pthread_setspecific(node->cache_key, cache);
    1.81 +#else
    1.82 +		cache->next = node->cache_list;
    1.83 +		node->cache_list = cache;
    1.84 +#endif
    1.85  	}
    1.86  
    1.87  	if(cache->inv_time != tm) {
    1.88 @@ -491,7 +511,11 @@
    1.89  
    1.90  static void invalidate_cache(struct anm_node *node)
    1.91  {
    1.92 +#ifdef ANIM_THREAD_SAFE
    1.93  	struct mat_cache *cache = pthread_getspecific(node->cache_key);
    1.94 +#else
    1.95 +	struct mat_cache *cache = node->cache_list;
    1.96 +#endif
    1.97  	if(cache) {
    1.98  	   cache->time = cache->inv_time = ANM_TIME_INVAL;
    1.99  	}
     2.1 --- a/anim/anim.h	Sun Nov 09 13:03:36 2014 +0200
     2.2 +++ b/anim/anim.h	Sun Nov 09 14:30:37 2014 +0200
     2.3 @@ -39,8 +39,10 @@
     2.4  		anm_time_t time, inv_time;
     2.5  		struct mat_cache *next;
     2.6  	} *cache_list;
     2.7 +#ifdef ANIM_THREAD_SAFE
     2.8  	pthread_key_t cache_key;
     2.9  	pthread_mutex_t cache_list_lock;
    2.10 +#endif
    2.11  
    2.12  	struct anm_node *parent;
    2.13  	struct anm_node *child;
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/gpuray_glsl.sln	Sun Nov 09 14:30:37 2014 +0200
     3.3 @@ -0,0 +1,22 @@
     3.4 +
     3.5 +Microsoft Visual Studio Solution File, Format Version 12.00
     3.6 +# Visual Studio 2013
     3.7 +VisualStudioVersion = 12.0.30723.0
     3.8 +MinimumVisualStudioVersion = 10.0.40219.1
     3.9 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpuray_glsl", "gpuray_glsl.vcxproj", "{67C47591-86E2-42F7-A6CA-6A494F80FFCA}"
    3.10 +EndProject
    3.11 +Global
    3.12 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    3.13 +		Debug|Win32 = Debug|Win32
    3.14 +		Release|Win32 = Release|Win32
    3.15 +	EndGlobalSection
    3.16 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    3.17 +		{67C47591-86E2-42F7-A6CA-6A494F80FFCA}.Debug|Win32.ActiveCfg = Debug|Win32
    3.18 +		{67C47591-86E2-42F7-A6CA-6A494F80FFCA}.Debug|Win32.Build.0 = Debug|Win32
    3.19 +		{67C47591-86E2-42F7-A6CA-6A494F80FFCA}.Release|Win32.ActiveCfg = Release|Win32
    3.20 +		{67C47591-86E2-42F7-A6CA-6A494F80FFCA}.Release|Win32.Build.0 = Release|Win32
    3.21 +	EndGlobalSection
    3.22 +	GlobalSection(SolutionProperties) = preSolution
    3.23 +		HideSolutionNode = FALSE
    3.24 +	EndGlobalSection
    3.25 +EndGlobal
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/gpuray_glsl.vcxproj	Sun Nov 09 14:30:37 2014 +0200
     4.3 @@ -0,0 +1,164 @@
     4.4 +<?xml version="1.0" encoding="utf-8"?>
     4.5 +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     4.6 +  <ItemGroup Label="ProjectConfigurations">
     4.7 +    <ProjectConfiguration Include="Debug|Win32">
     4.8 +      <Configuration>Debug</Configuration>
     4.9 +      <Platform>Win32</Platform>
    4.10 +    </ProjectConfiguration>
    4.11 +    <ProjectConfiguration Include="Release|Win32">
    4.12 +      <Configuration>Release</Configuration>
    4.13 +      <Platform>Win32</Platform>
    4.14 +    </ProjectConfiguration>
    4.15 +  </ItemGroup>
    4.16 +  <PropertyGroup Label="Globals">
    4.17 +    <ProjectGuid>{67C47591-86E2-42F7-A6CA-6A494F80FFCA}</ProjectGuid>
    4.18 +    <Keyword>Win32Proj</Keyword>
    4.19 +    <RootNamespace>gpuray_glsl</RootNamespace>
    4.20 +  </PropertyGroup>
    4.21 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    4.22 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    4.23 +    <ConfigurationType>Application</ConfigurationType>
    4.24 +    <UseDebugLibraries>true</UseDebugLibraries>
    4.25 +    <PlatformToolset>v120</PlatformToolset>
    4.26 +    <CharacterSet>MultiByte</CharacterSet>
    4.27 +  </PropertyGroup>
    4.28 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    4.29 +    <ConfigurationType>Application</ConfigurationType>
    4.30 +    <UseDebugLibraries>false</UseDebugLibraries>
    4.31 +    <PlatformToolset>v120</PlatformToolset>
    4.32 +    <WholeProgramOptimization>true</WholeProgramOptimization>
    4.33 +    <CharacterSet>MultiByte</CharacterSet>
    4.34 +  </PropertyGroup>
    4.35 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    4.36 +  <ImportGroup Label="ExtensionSettings">
    4.37 +  </ImportGroup>
    4.38 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    4.39 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4.40 +  </ImportGroup>
    4.41 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    4.42 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4.43 +  </ImportGroup>
    4.44 +  <PropertyGroup Label="UserMacros" />
    4.45 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    4.46 +    <LinkIncremental>true</LinkIncremental>
    4.47 +  </PropertyGroup>
    4.48 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    4.49 +    <LinkIncremental>false</LinkIncremental>
    4.50 +  </PropertyGroup>
    4.51 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    4.52 +    <ClCompile>
    4.53 +      <PrecompiledHeader>
    4.54 +      </PrecompiledHeader>
    4.55 +      <WarningLevel>Level3</WarningLevel>
    4.56 +      <Optimization>Disabled</Optimization>
    4.57 +      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    4.58 +      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\src;$(SolutionDir)\imago;$(SolutionDir)\vmath;$(SolutionDir)\anim</AdditionalIncludeDirectories>
    4.59 +      <DisableSpecificWarnings>4244;4996</DisableSpecificWarnings>
    4.60 +    </ClCompile>
    4.61 +    <Link>
    4.62 +      <SubSystem>Console</SubSystem>
    4.63 +      <GenerateDebugInformation>true</GenerateDebugInformation>
    4.64 +      <AdditionalDependencies>opengl32.lib;glut32.lib;glew32.lib;libpng.lib;jpeglib.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
    4.65 +    </Link>
    4.66 +  </ItemDefinitionGroup>
    4.67 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    4.68 +    <ClCompile>
    4.69 +      <WarningLevel>Level3</WarningLevel>
    4.70 +      <PrecompiledHeader>
    4.71 +      </PrecompiledHeader>
    4.72 +      <Optimization>MaxSpeed</Optimization>
    4.73 +      <FunctionLevelLinking>true</FunctionLevelLinking>
    4.74 +      <IntrinsicFunctions>true</IntrinsicFunctions>
    4.75 +      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    4.76 +      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\src;$(SolutionDir)\imago;$(SolutionDir)\vmath;$(SolutionDir)\anim</AdditionalIncludeDirectories>
    4.77 +      <DisableSpecificWarnings>4244;4996</DisableSpecificWarnings>
    4.78 +    </ClCompile>
    4.79 +    <Link>
    4.80 +      <SubSystem>Console</SubSystem>
    4.81 +      <GenerateDebugInformation>true</GenerateDebugInformation>
    4.82 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    4.83 +      <OptimizeReferences>true</OptimizeReferences>
    4.84 +      <AdditionalDependencies>opengl32.lib;glut32.lib;glew32.lib;libpng.lib;jpeglib.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
    4.85 +    </Link>
    4.86 +  </ItemDefinitionGroup>
    4.87 +  <ItemGroup>
    4.88 +    <ClCompile Include="anim\anim.c" />
    4.89 +    <ClCompile Include="anim\dynarr.c" />
    4.90 +    <ClCompile Include="anim\track.c" />
    4.91 +    <ClCompile Include="imago\conv.c" />
    4.92 +    <ClCompile Include="imago\file_jpeg.c" />
    4.93 +    <ClCompile Include="imago\file_png.c" />
    4.94 +    <ClCompile Include="imago\file_ppm.c" />
    4.95 +    <ClCompile Include="imago\file_rgbe.c" />
    4.96 +    <ClCompile Include="imago\ftype_module.c" />
    4.97 +    <ClCompile Include="imago\imago2.c" />
    4.98 +    <ClCompile Include="imago\imago_gl.c" />
    4.99 +    <ClCompile Include="imago\modules.c" />
   4.100 +    <ClCompile Include="src\box.cc" />
   4.101 +    <ClCompile Include="src\camera.cc" />
   4.102 +    <ClCompile Include="src\glsdr.c" />
   4.103 +    <ClCompile Include="src\gpuscene.cc" />
   4.104 +    <ClCompile Include="src\image.cc" />
   4.105 +    <ClCompile Include="src\light.cc" />
   4.106 +    <ClCompile Include="src\main.cc" />
   4.107 +    <ClCompile Include="src\material.cc" />
   4.108 +    <ClCompile Include="src\object.cc" />
   4.109 +    <ClCompile Include="src\plane.cc" />
   4.110 +    <ClCompile Include="src\rend.cc" />
   4.111 +    <ClCompile Include="src\scene.cc" />
   4.112 +    <ClCompile Include="src\scene_load.cc" />
   4.113 +    <ClCompile Include="src\sphere.cc" />
   4.114 +    <ClCompile Include="src\texture.cc" />
   4.115 +    <ClCompile Include="src\xform_node.cc" />
   4.116 +    <ClCompile Include="vmath\matrix.cc" />
   4.117 +    <ClCompile Include="vmath\matrix_c.c" />
   4.118 +    <ClCompile Include="vmath\quat.cc" />
   4.119 +    <ClCompile Include="vmath\quat_c.c" />
   4.120 +    <ClCompile Include="vmath\ray.cc" />
   4.121 +    <ClCompile Include="vmath\ray_c.c" />
   4.122 +    <ClCompile Include="vmath\vector.cc" />
   4.123 +  </ItemGroup>
   4.124 +  <ItemGroup>
   4.125 +    <ClInclude Include="anim\anim.h" />
   4.126 +    <ClInclude Include="anim\config.h" />
   4.127 +    <ClInclude Include="anim\dynarr.h" />
   4.128 +    <ClInclude Include="anim\track.h" />
   4.129 +    <ClInclude Include="imago\ftype_module.h" />
   4.130 +    <ClInclude Include="imago\imago2.h" />
   4.131 +    <ClInclude Include="src\box.h" />
   4.132 +    <ClInclude Include="src\camera.h" />
   4.133 +    <ClInclude Include="src\glsdr.h" />
   4.134 +    <ClInclude Include="src\gpuscene.h" />
   4.135 +    <ClInclude Include="src\image.h" />
   4.136 +    <ClInclude Include="src\light.h" />
   4.137 +    <ClInclude Include="src\material.h" />
   4.138 +    <ClInclude Include="src\object.h" />
   4.139 +    <ClInclude Include="src\opengl.h" />
   4.140 +    <ClInclude Include="src\plane.h" />
   4.141 +    <ClInclude Include="src\rend.h" />
   4.142 +    <ClInclude Include="src\scene.h" />
   4.143 +    <ClInclude Include="src\sphere.h" />
   4.144 +    <ClInclude Include="src\texture.h" />
   4.145 +    <ClInclude Include="src\xform_node.h" />
   4.146 +    <ClInclude Include="vmath\matrix.h" />
   4.147 +    <ClInclude Include="vmath\quat.h" />
   4.148 +    <ClInclude Include="vmath\ray.h" />
   4.149 +    <ClInclude Include="vmath\vector.h" />
   4.150 +    <ClInclude Include="vmath\vmath.h" />
   4.151 +    <ClInclude Include="vmath\vmath_config.h" />
   4.152 +    <ClInclude Include="vmath\vmath_types.h" />
   4.153 +  </ItemGroup>
   4.154 +  <ItemGroup>
   4.155 +    <None Include="sdr\postsdr.glsl" />
   4.156 +    <None Include="sdr\rt.glsl" />
   4.157 +    <None Include="sdr\vertex.glsl" />
   4.158 +    <None Include="vmath\matrix.inl" />
   4.159 +    <None Include="vmath\quat.inl" />
   4.160 +    <None Include="vmath\ray.inl" />
   4.161 +    <None Include="vmath\vector.inl" />
   4.162 +    <None Include="vmath\vmath.inl" />
   4.163 +  </ItemGroup>
   4.164 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   4.165 +  <ImportGroup Label="ExtensionTargets">
   4.166 +  </ImportGroup>
   4.167 +</Project>
   4.168 \ No newline at end of file
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/gpuray_glsl.vcxproj.filters	Sun Nov 09 14:30:37 2014 +0200
     5.3 @@ -0,0 +1,240 @@
     5.4 +<?xml version="1.0" encoding="utf-8"?>
     5.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     5.6 +  <ItemGroup>
     5.7 +    <Filter Include="src">
     5.8 +      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
     5.9 +      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;h;hpp;inl;inc</Extensions>
    5.10 +    </Filter>
    5.11 +    <Filter Include="vmath">
    5.12 +      <UniqueIdentifier>{5946a165-6c38-4913-96d8-0365f17329b2}</UniqueIdentifier>
    5.13 +    </Filter>
    5.14 +    <Filter Include="anim">
    5.15 +      <UniqueIdentifier>{af4eb374-7991-43ab-a961-2477351ca47d}</UniqueIdentifier>
    5.16 +    </Filter>
    5.17 +    <Filter Include="sdr">
    5.18 +      <UniqueIdentifier>{d750317b-ef2d-4b6b-afa6-3820784d5b3d}</UniqueIdentifier>
    5.19 +    </Filter>
    5.20 +    <Filter Include="imago">
    5.21 +      <UniqueIdentifier>{03007862-3db1-4979-b8ef-6af8304727d9}</UniqueIdentifier>
    5.22 +    </Filter>
    5.23 +  </ItemGroup>
    5.24 +  <ItemGroup>
    5.25 +    <ClCompile Include="src\box.cc">
    5.26 +      <Filter>src</Filter>
    5.27 +    </ClCompile>
    5.28 +    <ClCompile Include="src\camera.cc">
    5.29 +      <Filter>src</Filter>
    5.30 +    </ClCompile>
    5.31 +    <ClCompile Include="src\glsdr.c">
    5.32 +      <Filter>src</Filter>
    5.33 +    </ClCompile>
    5.34 +    <ClCompile Include="src\gpuscene.cc">
    5.35 +      <Filter>src</Filter>
    5.36 +    </ClCompile>
    5.37 +    <ClCompile Include="src\image.cc">
    5.38 +      <Filter>src</Filter>
    5.39 +    </ClCompile>
    5.40 +    <ClCompile Include="src\light.cc">
    5.41 +      <Filter>src</Filter>
    5.42 +    </ClCompile>
    5.43 +    <ClCompile Include="src\main.cc">
    5.44 +      <Filter>src</Filter>
    5.45 +    </ClCompile>
    5.46 +    <ClCompile Include="src\material.cc">
    5.47 +      <Filter>src</Filter>
    5.48 +    </ClCompile>
    5.49 +    <ClCompile Include="src\object.cc">
    5.50 +      <Filter>src</Filter>
    5.51 +    </ClCompile>
    5.52 +    <ClCompile Include="src\plane.cc">
    5.53 +      <Filter>src</Filter>
    5.54 +    </ClCompile>
    5.55 +    <ClCompile Include="src\rend.cc">
    5.56 +      <Filter>src</Filter>
    5.57 +    </ClCompile>
    5.58 +    <ClCompile Include="src\scene.cc">
    5.59 +      <Filter>src</Filter>
    5.60 +    </ClCompile>
    5.61 +    <ClCompile Include="src\scene_load.cc">
    5.62 +      <Filter>src</Filter>
    5.63 +    </ClCompile>
    5.64 +    <ClCompile Include="src\sphere.cc">
    5.65 +      <Filter>src</Filter>
    5.66 +    </ClCompile>
    5.67 +    <ClCompile Include="src\texture.cc">
    5.68 +      <Filter>src</Filter>
    5.69 +    </ClCompile>
    5.70 +    <ClCompile Include="src\xform_node.cc">
    5.71 +      <Filter>src</Filter>
    5.72 +    </ClCompile>
    5.73 +    <ClCompile Include="vmath\matrix.cc">
    5.74 +      <Filter>vmath</Filter>
    5.75 +    </ClCompile>
    5.76 +    <ClCompile Include="vmath\matrix_c.c">
    5.77 +      <Filter>vmath</Filter>
    5.78 +    </ClCompile>
    5.79 +    <ClCompile Include="vmath\quat.cc">
    5.80 +      <Filter>vmath</Filter>
    5.81 +    </ClCompile>
    5.82 +    <ClCompile Include="vmath\quat_c.c">
    5.83 +      <Filter>vmath</Filter>
    5.84 +    </ClCompile>
    5.85 +    <ClCompile Include="vmath\ray.cc">
    5.86 +      <Filter>vmath</Filter>
    5.87 +    </ClCompile>
    5.88 +    <ClCompile Include="vmath\ray_c.c">
    5.89 +      <Filter>vmath</Filter>
    5.90 +    </ClCompile>
    5.91 +    <ClCompile Include="vmath\vector.cc">
    5.92 +      <Filter>vmath</Filter>
    5.93 +    </ClCompile>
    5.94 +    <ClCompile Include="anim\anim.c">
    5.95 +      <Filter>anim</Filter>
    5.96 +    </ClCompile>
    5.97 +    <ClCompile Include="anim\dynarr.c">
    5.98 +      <Filter>anim</Filter>
    5.99 +    </ClCompile>
   5.100 +    <ClCompile Include="anim\track.c">
   5.101 +      <Filter>anim</Filter>
   5.102 +    </ClCompile>
   5.103 +    <ClCompile Include="imago\conv.c">
   5.104 +      <Filter>imago</Filter>
   5.105 +    </ClCompile>
   5.106 +    <ClCompile Include="imago\file_jpeg.c">
   5.107 +      <Filter>imago</Filter>
   5.108 +    </ClCompile>
   5.109 +    <ClCompile Include="imago\file_png.c">
   5.110 +      <Filter>imago</Filter>
   5.111 +    </ClCompile>
   5.112 +    <ClCompile Include="imago\file_ppm.c">
   5.113 +      <Filter>imago</Filter>
   5.114 +    </ClCompile>
   5.115 +    <ClCompile Include="imago\file_rgbe.c">
   5.116 +      <Filter>imago</Filter>
   5.117 +    </ClCompile>
   5.118 +    <ClCompile Include="imago\ftype_module.c">
   5.119 +      <Filter>imago</Filter>
   5.120 +    </ClCompile>
   5.121 +    <ClCompile Include="imago\imago_gl.c">
   5.122 +      <Filter>imago</Filter>
   5.123 +    </ClCompile>
   5.124 +    <ClCompile Include="imago\imago2.c">
   5.125 +      <Filter>imago</Filter>
   5.126 +    </ClCompile>
   5.127 +    <ClCompile Include="imago\modules.c">
   5.128 +      <Filter>imago</Filter>
   5.129 +    </ClCompile>
   5.130 +  </ItemGroup>
   5.131 +  <ItemGroup>
   5.132 +    <ClInclude Include="src\box.h">
   5.133 +      <Filter>src</Filter>
   5.134 +    </ClInclude>
   5.135 +    <ClInclude Include="src\camera.h">
   5.136 +      <Filter>src</Filter>
   5.137 +    </ClInclude>
   5.138 +    <ClInclude Include="src\glsdr.h">
   5.139 +      <Filter>src</Filter>
   5.140 +    </ClInclude>
   5.141 +    <ClInclude Include="src\gpuscene.h">
   5.142 +      <Filter>src</Filter>
   5.143 +    </ClInclude>
   5.144 +    <ClInclude Include="src\image.h">
   5.145 +      <Filter>src</Filter>
   5.146 +    </ClInclude>
   5.147 +    <ClInclude Include="src\light.h">
   5.148 +      <Filter>src</Filter>
   5.149 +    </ClInclude>
   5.150 +    <ClInclude Include="src\material.h">
   5.151 +      <Filter>src</Filter>
   5.152 +    </ClInclude>
   5.153 +    <ClInclude Include="src\object.h">
   5.154 +      <Filter>src</Filter>
   5.155 +    </ClInclude>
   5.156 +    <ClInclude Include="src\opengl.h">
   5.157 +      <Filter>src</Filter>
   5.158 +    </ClInclude>
   5.159 +    <ClInclude Include="src\plane.h">
   5.160 +      <Filter>src</Filter>
   5.161 +    </ClInclude>
   5.162 +    <ClInclude Include="src\rend.h">
   5.163 +      <Filter>src</Filter>
   5.164 +    </ClInclude>
   5.165 +    <ClInclude Include="src\scene.h">
   5.166 +      <Filter>src</Filter>
   5.167 +    </ClInclude>
   5.168 +    <ClInclude Include="src\sphere.h">
   5.169 +      <Filter>src</Filter>
   5.170 +    </ClInclude>
   5.171 +    <ClInclude Include="src\texture.h">
   5.172 +      <Filter>src</Filter>
   5.173 +    </ClInclude>
   5.174 +    <ClInclude Include="src\xform_node.h">
   5.175 +      <Filter>src</Filter>
   5.176 +    </ClInclude>
   5.177 +    <ClInclude Include="vmath\matrix.h">
   5.178 +      <Filter>vmath</Filter>
   5.179 +    </ClInclude>
   5.180 +    <ClInclude Include="vmath\quat.h">
   5.181 +      <Filter>vmath</Filter>
   5.182 +    </ClInclude>
   5.183 +    <ClInclude Include="vmath\ray.h">
   5.184 +      <Filter>vmath</Filter>
   5.185 +    </ClInclude>
   5.186 +    <ClInclude Include="vmath\vector.h">
   5.187 +      <Filter>vmath</Filter>
   5.188 +    </ClInclude>
   5.189 +    <ClInclude Include="vmath\vmath.h">
   5.190 +      <Filter>vmath</Filter>
   5.191 +    </ClInclude>
   5.192 +    <ClInclude Include="vmath\vmath_config.h">
   5.193 +      <Filter>vmath</Filter>
   5.194 +    </ClInclude>
   5.195 +    <ClInclude Include="vmath\vmath_types.h">
   5.196 +      <Filter>vmath</Filter>
   5.197 +    </ClInclude>
   5.198 +    <ClInclude Include="anim\anim.h">
   5.199 +      <Filter>anim</Filter>
   5.200 +    </ClInclude>
   5.201 +    <ClInclude Include="anim\config.h">
   5.202 +      <Filter>anim</Filter>
   5.203 +    </ClInclude>
   5.204 +    <ClInclude Include="anim\dynarr.h">
   5.205 +      <Filter>anim</Filter>
   5.206 +    </ClInclude>
   5.207 +    <ClInclude Include="anim\track.h">
   5.208 +      <Filter>anim</Filter>
   5.209 +    </ClInclude>
   5.210 +    <ClInclude Include="imago\ftype_module.h">
   5.211 +      <Filter>imago</Filter>
   5.212 +    </ClInclude>
   5.213 +    <ClInclude Include="imago\imago2.h">
   5.214 +      <Filter>imago</Filter>
   5.215 +    </ClInclude>
   5.216 +  </ItemGroup>
   5.217 +  <ItemGroup>
   5.218 +    <None Include="vmath\matrix.inl">
   5.219 +      <Filter>vmath</Filter>
   5.220 +    </None>
   5.221 +    <None Include="vmath\quat.inl">
   5.222 +      <Filter>vmath</Filter>
   5.223 +    </None>
   5.224 +    <None Include="vmath\ray.inl">
   5.225 +      <Filter>vmath</Filter>
   5.226 +    </None>
   5.227 +    <None Include="vmath\vector.inl">
   5.228 +      <Filter>vmath</Filter>
   5.229 +    </None>
   5.230 +    <None Include="vmath\vmath.inl">
   5.231 +      <Filter>vmath</Filter>
   5.232 +    </None>
   5.233 +    <None Include="sdr\postsdr.glsl">
   5.234 +      <Filter>sdr</Filter>
   5.235 +    </None>
   5.236 +    <None Include="sdr\rt.glsl">
   5.237 +      <Filter>sdr</Filter>
   5.238 +    </None>
   5.239 +    <None Include="sdr\vertex.glsl">
   5.240 +      <Filter>sdr</Filter>
   5.241 +    </None>
   5.242 +  </ItemGroup>
   5.243 +</Project>
   5.244 \ No newline at end of file
     6.1 --- a/src/texture.cc	Sun Nov 09 13:03:36 2014 +0200
     6.2 +++ b/src/texture.cc	Sun Nov 09 14:30:37 2014 +0200
     6.3 @@ -1,10 +1,17 @@
     6.4  #include <stdio.h>
     6.5 -#include <unistd.h>
     6.6  #include <string.h>
     6.7  #include <errno.h>
     6.8  #include "texture.h"
     6.9  #include "object.h"
    6.10  
    6.11 +#ifndef WIN32
    6.12 +#include <unistd.h>
    6.13 +#else
    6.14 +#include <io.h>
    6.15 +
    6.16 +#define R_OK	4
    6.17 +#endif
    6.18 +
    6.19  static inline Color sample_image(const Image &img, float u, float v, Texture::WrapMode wrapping);
    6.20  
    6.21  Texture::Texture()
     7.1 --- a/vmath/vmath.h	Sun Nov 09 13:03:36 2014 +0200
     7.2 +++ b/vmath/vmath.h	Sun Nov 09 14:30:37 2014 +0200
     7.3 @@ -44,10 +44,6 @@
     7.4  #define MIN(a, b)	((a) < (b) ? (a) : (b))
     7.5  #define MAX(a, b)	((a) > (b) ? (a) : (b))
     7.6  
     7.7 -#ifndef __GNUC__
     7.8 -#define round(x)	((x) >= 0 ? (x) + 0.5 : (x) - 0.5)
     7.9 -#endif
    7.10 -
    7.11  #ifdef __cplusplus
    7.12  extern "C" {
    7.13  #endif	/* __cplusplus */
     8.1 --- a/vmath/vmath_config.h	Sun Nov 09 13:03:36 2014 +0200
     8.2 +++ b/vmath/vmath_config.h	Sun Nov 09 14:30:37 2014 +0200
     8.3 @@ -1,7 +1,7 @@
     8.4  #ifndef VMATH_CONFIG_H_
     8.5  #define VMATH_CONFIG_H_
     8.6  
     8.7 -#if (__STDC_VERSION__ < 199999)
     8.8 +#if (__STDC_VERSION__ < 199999) && !defined(__cplusplus)
     8.9  #if defined(__GNUC__) || defined(_MSC_VER)
    8.10  #define inline __inline
    8.11  #else