libgoatvr

changeset 10:61feb3661397

windows build fix + new project file for the example
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 20 Sep 2014 20:12:00 +0300
parents d12592558809
children 34d4643d61f9
files example/example.vcxproj example/example.vcxproj.filters libgoatvr.sln libgoatvr.vcxproj libgoatvr.vcxproj.filters libgoatvr_static.vcxproj libgoatvr_static.vcxproj.filters src/opengl.c
diffstat 8 files changed, 144 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/example/example.vcxproj	Sat Sep 20 20:12:00 2014 +0300
     1.3 @@ -0,0 +1,88 @@
     1.4 +<?xml version="1.0" encoding="utf-8"?>
     1.5 +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     1.6 +  <ItemGroup Label="ProjectConfigurations">
     1.7 +    <ProjectConfiguration Include="Debug|Win32">
     1.8 +      <Configuration>Debug</Configuration>
     1.9 +      <Platform>Win32</Platform>
    1.10 +    </ProjectConfiguration>
    1.11 +    <ProjectConfiguration Include="Release|Win32">
    1.12 +      <Configuration>Release</Configuration>
    1.13 +      <Platform>Win32</Platform>
    1.14 +    </ProjectConfiguration>
    1.15 +  </ItemGroup>
    1.16 +  <PropertyGroup Label="Globals">
    1.17 +    <ProjectGuid>{7A7B8D81-EB77-49DA-B68D-B117C0A4782B}</ProjectGuid>
    1.18 +    <Keyword>Win32Proj</Keyword>
    1.19 +    <RootNamespace>example</RootNamespace>
    1.20 +  </PropertyGroup>
    1.21 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    1.22 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    1.23 +    <ConfigurationType>Application</ConfigurationType>
    1.24 +    <UseDebugLibraries>true</UseDebugLibraries>
    1.25 +    <PlatformToolset>v120</PlatformToolset>
    1.26 +    <CharacterSet>MultiByte</CharacterSet>
    1.27 +  </PropertyGroup>
    1.28 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    1.29 +    <ConfigurationType>Application</ConfigurationType>
    1.30 +    <UseDebugLibraries>false</UseDebugLibraries>
    1.31 +    <PlatformToolset>v120</PlatformToolset>
    1.32 +    <WholeProgramOptimization>true</WholeProgramOptimization>
    1.33 +    <CharacterSet>MultiByte</CharacterSet>
    1.34 +  </PropertyGroup>
    1.35 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    1.36 +  <ImportGroup Label="ExtensionSettings">
    1.37 +  </ImportGroup>
    1.38 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    1.39 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    1.40 +  </ImportGroup>
    1.41 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    1.42 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    1.43 +  </ImportGroup>
    1.44 +  <PropertyGroup Label="UserMacros" />
    1.45 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    1.46 +    <LinkIncremental>true</LinkIncremental>
    1.47 +  </PropertyGroup>
    1.48 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    1.49 +    <LinkIncremental>false</LinkIncremental>
    1.50 +  </PropertyGroup>
    1.51 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    1.52 +    <ClCompile>
    1.53 +      <PrecompiledHeader>
    1.54 +      </PrecompiledHeader>
    1.55 +      <WarningLevel>Level3</WarningLevel>
    1.56 +      <Optimization>Disabled</Optimization>
    1.57 +      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    1.58 +      <AdditionalIncludeDirectories>$(SolutionDir)\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    1.59 +    </ClCompile>
    1.60 +    <Link>
    1.61 +      <SubSystem>Console</SubSystem>
    1.62 +      <GenerateDebugInformation>true</GenerateDebugInformation>
    1.63 +      <AdditionalDependencies>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);libovr.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;glew32.lib;libgoatvr.lib</AdditionalDependencies>
    1.64 +    </Link>
    1.65 +  </ItemDefinitionGroup>
    1.66 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    1.67 +    <ClCompile>
    1.68 +      <WarningLevel>Level3</WarningLevel>
    1.69 +      <PrecompiledHeader>
    1.70 +      </PrecompiledHeader>
    1.71 +      <Optimization>MaxSpeed</Optimization>
    1.72 +      <FunctionLevelLinking>true</FunctionLevelLinking>
    1.73 +      <IntrinsicFunctions>true</IntrinsicFunctions>
    1.74 +      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    1.75 +      <AdditionalIncludeDirectories>$(SolutionDir)\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    1.76 +    </ClCompile>
    1.77 +    <Link>
    1.78 +      <SubSystem>Console</SubSystem>
    1.79 +      <GenerateDebugInformation>true</GenerateDebugInformation>
    1.80 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
    1.81 +      <OptimizeReferences>true</OptimizeReferences>
    1.82 +      <AdditionalDependencies>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);libovr.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;glew32.lib;libgoatvr.lib</AdditionalDependencies>
    1.83 +    </Link>
    1.84 +  </ItemDefinitionGroup>
    1.85 +  <ItemGroup>
    1.86 +    <ClCompile Include="src\main.c" />
    1.87 +  </ItemGroup>
    1.88 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    1.89 +  <ImportGroup Label="ExtensionTargets">
    1.90 +  </ImportGroup>
    1.91 +</Project>
    1.92 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/example/example.vcxproj.filters	Sat Sep 20 20:12:00 2014 +0300
     2.3 @@ -0,0 +1,14 @@
     2.4 +<?xml version="1.0" encoding="utf-8"?>
     2.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     2.6 +  <ItemGroup>
     2.7 +    <Filter Include="src">
     2.8 +      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
     2.9 +      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    2.10 +    </Filter>
    2.11 +  </ItemGroup>
    2.12 +  <ItemGroup>
    2.13 +    <ClCompile Include="src\main.c">
    2.14 +      <Filter>src</Filter>
    2.15 +    </ClCompile>
    2.16 +  </ItemGroup>
    2.17 +</Project>
    2.18 \ No newline at end of file
     3.1 --- a/libgoatvr.sln	Sat Sep 20 16:52:42 2014 +0300
     3.2 +++ b/libgoatvr.sln	Sat Sep 20 20:12:00 2014 +0300
     3.3 @@ -1,12 +1,14 @@
     3.4  
     3.5  Microsoft Visual Studio Solution File, Format Version 12.00
     3.6  # Visual Studio 2013
     3.7 -VisualStudioVersion = 12.0.30501.0
     3.8 +VisualStudioVersion = 12.0.30723.0
     3.9  MinimumVisualStudioVersion = 10.0.40219.1
    3.10  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgoatvr", "libgoatvr.vcxproj", "{6AD69AF8-6F44-4D45-A59C-A7A07F6E1CE0}"
    3.11  EndProject
    3.12  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgoatvr_static", "libgoatvr_static.vcxproj", "{DF0FC238-A249-432C-9163-3778DDE78A62}"
    3.13  EndProject
    3.14 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example\example.vcxproj", "{7A7B8D81-EB77-49DA-B68D-B117C0A4782B}"
    3.15 +EndProject
    3.16  Global
    3.17  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    3.18  		Debug|Win32 = Debug|Win32
    3.19 @@ -21,6 +23,10 @@
    3.20  		{DF0FC238-A249-432C-9163-3778DDE78A62}.Debug|Win32.Build.0 = Debug|Win32
    3.21  		{DF0FC238-A249-432C-9163-3778DDE78A62}.Release|Win32.ActiveCfg = Release|Win32
    3.22  		{DF0FC238-A249-432C-9163-3778DDE78A62}.Release|Win32.Build.0 = Release|Win32
    3.23 +		{7A7B8D81-EB77-49DA-B68D-B117C0A4782B}.Debug|Win32.ActiveCfg = Debug|Win32
    3.24 +		{7A7B8D81-EB77-49DA-B68D-B117C0A4782B}.Debug|Win32.Build.0 = Debug|Win32
    3.25 +		{7A7B8D81-EB77-49DA-B68D-B117C0A4782B}.Release|Win32.ActiveCfg = Release|Win32
    3.26 +		{7A7B8D81-EB77-49DA-B68D-B117C0A4782B}.Release|Win32.Build.0 = Release|Win32
    3.27  	EndGlobalSection
    3.28  	GlobalSection(SolutionProperties) = preSolution
    3.29  		HideSolutionNode = FALSE
     4.1 --- a/libgoatvr.vcxproj	Sat Sep 20 16:52:42 2014 +0300
     4.2 +++ b/libgoatvr.vcxproj	Sat Sep 20 20:12:00 2014 +0300
     4.3 @@ -52,7 +52,7 @@
     4.4        <WarningLevel>Level3</WarningLevel>
     4.5        <Optimization>Disabled</Optimization>
     4.6        <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGOATVR_EXPORTS;%(PreprocessorDefinitions);USE_LIBOVR</PreprocessorDefinitions>
     4.7 -      <DisableSpecificWarnings>4244;4996</DisableSpecificWarnings>
     4.8 +      <DisableSpecificWarnings>4244;4996;4305</DisableSpecificWarnings>
     4.9      </ClCompile>
    4.10      <Link>
    4.11        <SubSystem>Windows</SubSystem>
    4.12 @@ -76,7 +76,7 @@
    4.13        <FunctionLevelLinking>true</FunctionLevelLinking>
    4.14        <IntrinsicFunctions>true</IntrinsicFunctions>
    4.15        <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGOATVR_EXPORTS;%(PreprocessorDefinitions);USE_LIBOVR</PreprocessorDefinitions>
    4.16 -      <DisableSpecificWarnings>4244;4996</DisableSpecificWarnings>
    4.17 +      <DisableSpecificWarnings>4244;4996;4305</DisableSpecificWarnings>
    4.18      </ClCompile>
    4.19      <Link>
    4.20        <SubSystem>Windows</SubSystem>
    4.21 @@ -95,6 +95,8 @@
    4.22    </ItemDefinitionGroup>
    4.23    <ItemGroup>
    4.24      <ClCompile Include="src\mathutil.c" />
    4.25 +    <ClCompile Include="src\mesh.c" />
    4.26 +    <ClCompile Include="src\opengl.c" />
    4.27      <ClCompile Include="src\opt.c" />
    4.28      <ClCompile Include="src\rbtree.c" />
    4.29      <ClCompile Include="src\vr.c" />
    4.30 @@ -105,6 +107,8 @@
    4.31    </ItemGroup>
    4.32    <ItemGroup>
    4.33      <ClInclude Include="src\mathutil.h" />
    4.34 +    <ClInclude Include="src\mesh.h" />
    4.35 +    <ClInclude Include="src\opengl.h" />
    4.36      <ClInclude Include="src\opt.h" />
    4.37      <ClInclude Include="src\rbtree.h" />
    4.38      <ClInclude Include="src\vr.h" />
     5.1 --- a/libgoatvr.vcxproj.filters	Sat Sep 20 16:52:42 2014 +0300
     5.2 +++ b/libgoatvr.vcxproj.filters	Sat Sep 20 20:12:00 2014 +0300
     5.3 @@ -31,6 +31,12 @@
     5.4      <ClCompile Include="src\vr_openhmd.c">
     5.5        <Filter>src</Filter>
     5.6      </ClCompile>
     5.7 +    <ClCompile Include="src\mesh.c">
     5.8 +      <Filter>src</Filter>
     5.9 +    </ClCompile>
    5.10 +    <ClCompile Include="src\opengl.c">
    5.11 +      <Filter>src</Filter>
    5.12 +    </ClCompile>
    5.13    </ItemGroup>
    5.14    <ItemGroup>
    5.15      <ClInclude Include="src\mathutil.h">
    5.16 @@ -48,6 +54,12 @@
    5.17      <ClInclude Include="src\vr_impl.h">
    5.18        <Filter>src</Filter>
    5.19      </ClInclude>
    5.20 +    <ClInclude Include="src\mesh.h">
    5.21 +      <Filter>src</Filter>
    5.22 +    </ClInclude>
    5.23 +    <ClInclude Include="src\opengl.h">
    5.24 +      <Filter>src</Filter>
    5.25 +    </ClInclude>
    5.26    </ItemGroup>
    5.27    <ItemGroup>
    5.28      <None Include="libgoatvr.def" />
     6.1 --- a/libgoatvr_static.vcxproj	Sat Sep 20 16:52:42 2014 +0300
     6.2 +++ b/libgoatvr_static.vcxproj	Sat Sep 20 20:12:00 2014 +0300
     6.3 @@ -12,6 +12,8 @@
     6.4    </ItemGroup>
     6.5    <ItemGroup>
     6.6      <ClCompile Include="src\mathutil.c" />
     6.7 +    <ClCompile Include="src\mesh.c" />
     6.8 +    <ClCompile Include="src\opengl.c" />
     6.9      <ClCompile Include="src\opt.c" />
    6.10      <ClCompile Include="src\rbtree.c" />
    6.11      <ClCompile Include="src\vr.c" />
    6.12 @@ -22,6 +24,8 @@
    6.13    </ItemGroup>
    6.14    <ItemGroup>
    6.15      <ClInclude Include="src\mathutil.h" />
    6.16 +    <ClInclude Include="src\mesh.h" />
    6.17 +    <ClInclude Include="src\opengl.h" />
    6.18      <ClInclude Include="src\opt.h" />
    6.19      <ClInclude Include="src\rbtree.h" />
    6.20      <ClInclude Include="src\vr.h" />
     7.1 --- a/libgoatvr_static.vcxproj.filters	Sat Sep 20 16:52:42 2014 +0300
     7.2 +++ b/libgoatvr_static.vcxproj.filters	Sat Sep 20 20:12:00 2014 +0300
     7.3 @@ -31,6 +31,12 @@
     7.4      <ClCompile Include="src\vr_openhmd.c">
     7.5        <Filter>src</Filter>
     7.6      </ClCompile>
     7.7 +    <ClCompile Include="src\mesh.c">
     7.8 +      <Filter>src</Filter>
     7.9 +    </ClCompile>
    7.10 +    <ClCompile Include="src\opengl.c">
    7.11 +      <Filter>src</Filter>
    7.12 +    </ClCompile>
    7.13    </ItemGroup>
    7.14    <ItemGroup>
    7.15      <ClInclude Include="src\mathutil.h">
    7.16 @@ -48,5 +54,11 @@
    7.17      <ClInclude Include="src\vr_impl.h">
    7.18        <Filter>src</Filter>
    7.19      </ClInclude>
    7.20 +    <ClInclude Include="src\mesh.h">
    7.21 +      <Filter>src</Filter>
    7.22 +    </ClInclude>
    7.23 +    <ClInclude Include="src\opengl.h">
    7.24 +      <Filter>src</Filter>
    7.25 +    </ClInclude>
    7.26    </ItemGroup>
    7.27  </Project>
    7.28 \ No newline at end of file
     8.1 --- a/src/opengl.c	Sat Sep 20 16:52:42 2014 +0300
     8.2 +++ b/src/opengl.c	Sat Sep 20 20:12:00 2014 +0300
     8.3 @@ -23,7 +23,7 @@
     8.4  
     8.5  void (*vrimp_glfunc(const char *name))()
     8.6  {
     8.7 -	return wglGetProcAddress(name);
     8.8 +	return (void (*)())wglGetProcAddress(name);
     8.9  }
    8.10  #endif	/* WIN32 */
    8.11