graphics

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 67da3338107fbc36f7798e97daa761950f3ccd1f
parent bf80f00fa0d29d77189336609ffab1979f73d7d7
Author: Brian Swetland <swetland@frotz.net>
Date:   Sat,  9 Feb 2013 19:01:23 -0800

build: opengl on win32

Diffstat:
M.gitignore | 1+
Mgraphics.sln | 7+++++++
Mhello/hello.cc | 2+-
Mhello/hello.vcxproj | 57++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mlibpng-1.2.50/libpng-1.2.50.vcxproj | 26+++++++++++++++++++++++++-
Mzlib-1.2.7/zlib-1.2.7.vcxproj | 25++++++++++++++++++++++++-
6 files changed, 114 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -7,4 +7,5 @@ x64 *.vcxproj.* Debug Release +OpenGL-Debug *.opensdf \ No newline at end of file diff --git a/graphics.sln b/graphics.sln @@ -17,19 +17,26 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + OpenGL-Debug|Win32 = OpenGL-Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {9A238D95-47DB-4254-A680-F100AA9E755C}.Debug|Win32.ActiveCfg = Debug|Win32 {9A238D95-47DB-4254-A680-F100AA9E755C}.Debug|Win32.Build.0 = Debug|Win32 + {9A238D95-47DB-4254-A680-F100AA9E755C}.OpenGL-Debug|Win32.ActiveCfg = OpenGL-Debug|Win32 + {9A238D95-47DB-4254-A680-F100AA9E755C}.OpenGL-Debug|Win32.Build.0 = OpenGL-Debug|Win32 {9A238D95-47DB-4254-A680-F100AA9E755C}.Release|Win32.ActiveCfg = Release|Win32 {9A238D95-47DB-4254-A680-F100AA9E755C}.Release|Win32.Build.0 = Release|Win32 {F5A10B0A-0EC0-4A76-B4DD-748CA4047E50}.Debug|Win32.ActiveCfg = Debug|Win32 {F5A10B0A-0EC0-4A76-B4DD-748CA4047E50}.Debug|Win32.Build.0 = Debug|Win32 + {F5A10B0A-0EC0-4A76-B4DD-748CA4047E50}.OpenGL-Debug|Win32.ActiveCfg = OpenGL-Debug|Win32 + {F5A10B0A-0EC0-4A76-B4DD-748CA4047E50}.OpenGL-Debug|Win32.Build.0 = OpenGL-Debug|Win32 {F5A10B0A-0EC0-4A76-B4DD-748CA4047E50}.Release|Win32.ActiveCfg = Release|Win32 {F5A10B0A-0EC0-4A76-B4DD-748CA4047E50}.Release|Win32.Build.0 = Release|Win32 {812CD397-998F-4D9C-9BF3-1549F360EABE}.Debug|Win32.ActiveCfg = Debug|Win32 {812CD397-998F-4D9C-9BF3-1549F360EABE}.Debug|Win32.Build.0 = Debug|Win32 + {812CD397-998F-4D9C-9BF3-1549F360EABE}.OpenGL-Debug|Win32.ActiveCfg = OpenGL-Debug|Win32 + {812CD397-998F-4D9C-9BF3-1549F360EABE}.OpenGL-Debug|Win32.Build.0 = OpenGL-Debug|Win32 {812CD397-998F-4D9C-9BF3-1549F360EABE}.Release|Win32.ActiveCfg = Release|Win32 {812CD397-998F-4D9C-9BF3-1549F360EABE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection diff --git a/hello/hello.cc b/hello/hello.cc @@ -172,7 +172,7 @@ void TestApp::render(void) { if (zoom > 100.0) zoom = 100.0; } -#if _WIN32 +#if defined(_WIN32) && !defined(USE_OPENGL) if (keystate[DIK_A]) { nx -= 0.01; update = 1; } if (keystate[DIK_D]) { nx += 0.01; update = 1; } if (keystate[DIK_W]) { ny -= 0.01; update = 1; } diff --git a/hello/hello.vcxproj b/hello/hello.vcxproj @@ -5,6 +5,10 @@ <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="OpenGL-Debug|Win32"> + <Configuration>OpenGL-Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> @@ -21,6 +25,12 @@ <PlatformToolset>v110</PlatformToolset> <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v110</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> @@ -34,6 +44,9 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> @@ -43,6 +56,11 @@ <IncludePath>..\libpng-1.2.50;..\zlib-1.2.7;$(DXSDK_DIR)Include;$(IncludePath)</IncludePath> <LibraryPath>$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'"> + <ExecutablePath>$(DXSDK_DIR)Utilities\bin\x86;$(ExecutablePath)</ExecutablePath> + <IncludePath>..\libpng-1.2.50;..\zlib-1.2.7;$(DXSDK_DIR)Include;$(IncludePath)</IncludePath> + <LibraryPath>$(DXSDK_DIR)Lib\x86;$(LibraryPath)</LibraryPath> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ExecutablePath>$(DXSDK_DIR)Utilities\bin\x86;$(ExecutablePath)</ExecutablePath> <IncludePath>..\libpng-1.2.50;..\zlib-1.2.7;$(DXSDK_DIR)Include;$(IncludePath)</IncludePath> @@ -62,6 +80,24 @@ <AdditionalLibraryDirectories>../Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Link> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> + <AdditionalIncludeDirectories>..\..\SDL-1.2.15\include;../common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>USE_OPENGL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AdditionalDependencies>SDL.lib;SDLmain.lib;libpng-1.2.50.lib;zlib-1.2.7.lib;OpenGL32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Windows</SubSystem> + <AdditionalLibraryDirectories>..\..\SDL-1.2.15\lib\x86;..\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + <PostBuildEvent> + <Command>XCOPY "$(ProjectDir)..\..\SDL-1.2.15\lib\x86\SDL.dll" "$(TargetDir)" /E /I /F /Y</Command> + </PostBuildEvent> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -81,7 +117,13 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dxapp.cc" /> + <ClCompile Include="..\common\dxapp.cc"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">true</ExcludedFromBuild> + </ClCompile> + <ClCompile Include="..\common\glapp.cc"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">false</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\common\loadfile.cc" /> <ClCompile Include="..\common\loadobj.cc" /> <ClCompile Include="..\common\loadpng.cc" /> @@ -94,7 +136,9 @@ <ItemGroup> <ClInclude Include="..\common\app.h" /> <ClInclude Include="..\common\dxapp.h" /> + <ClInclude Include="..\common\glapp.h" /> <ClInclude Include="..\common\matrix.h" /> + <ClInclude Include="..\common\opengl.h" /> <ClInclude Include="..\common\util.h" /> <ClInclude Include="..\common\textgrid.h" /> </ItemGroup> @@ -102,26 +146,37 @@ <FxCompile Include="SimplePS.hlsl"> <FileType>Document</FileType> <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType> + <ShaderType Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">Pixel</ShaderType> <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel> <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType> </FxCompile> <FxCompile Include="..\common\TextPS.hlsl"> <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType> + <ShaderType Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">Pixel</ShaderType> <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel> + <ShaderModel Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">4.0</ShaderModel> <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)%(Filename).h</HeaderFileOutput> + <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">$(OutDir)%(Filename).h</HeaderFileOutput> <VariableName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">codeTextPS</VariableName> + <VariableName Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">codeTextPS</VariableName> </FxCompile> <FxCompile Include="..\common\TextVS.hlsl"> <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType> + <ShaderType Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">Vertex</ShaderType> <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel> + <ShaderModel Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">4.0</ShaderModel> <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)%(Filename).h</HeaderFileOutput> + <HeaderFileOutput Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">$(OutDir)%(Filename).h</HeaderFileOutput> <VariableName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">codeTextVS</VariableName> + <VariableName Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">codeTextVS</VariableName> <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableOptimizations> + <DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">false</DisableOptimizations> </FxCompile> </ItemGroup> <ItemGroup> <FxCompile Include="SimpleVS.hlsl"> <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType> + <ShaderType Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'">Vertex</ShaderType> <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel> <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType> </FxCompile> diff --git a/libpng-1.2.50/libpng-1.2.50.vcxproj b/libpng-1.2.50/libpng-1.2.50.vcxproj @@ -5,6 +5,10 @@ <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="OpenGL-Debug|Win32"> + <Configuration>OpenGL-Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> @@ -21,6 +25,12 @@ <PlatformToolset>v110</PlatformToolset> <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v110</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> @@ -34,6 +44,9 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> @@ -49,6 +62,16 @@ <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../zlib-1.2.7;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -90,4 +113,4 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> +</Project> +\ No newline at end of file diff --git a/zlib-1.2.7/zlib-1.2.7.vcxproj b/zlib-1.2.7/zlib-1.2.7.vcxproj @@ -5,6 +5,10 @@ <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="OpenGL-Debug|Win32"> + <Configuration>OpenGL-Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> @@ -21,6 +25,12 @@ <PlatformToolset>v110</PlatformToolset> <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v110</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> @@ -34,6 +44,9 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> @@ -48,6 +61,15 @@ <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='OpenGL-Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> @@ -94,4 +116,4 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> +</Project> +\ No newline at end of file