goat3dgfx

changeset 4:ae47239c8c0d

merged changes from windows
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 16 Nov 2013 21:09:42 +0200
parents eb75bff21824 7bd5ebec3b6f
children 18879c956eb1
files
diffstat 6 files changed, 408 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/.hgignore	Sat Nov 16 21:09:16 2013 +0200
     1.2 +++ b/.hgignore	Sat Nov 16 21:09:42 2013 +0200
     1.3 @@ -5,3 +5,6 @@
     1.4  \.so\.
     1.5  \.so$
     1.6  \.dylib$
     1.7 +\.ncb$
     1.8 +\.suo$
     1.9 +\.user$
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/goat3dgfx.sln	Sat Nov 16 21:09:42 2013 +0200
     2.3 @@ -0,0 +1,20 @@
     2.4 +
     2.5 +Microsoft Visual Studio Solution File, Format Version 10.00
     2.6 +# Visual Studio 2008
     2.7 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "goat3dgfx", "goat3dgfx.vcproj", "{251F8AFF-5A37-4F10-A519-C55C40E127AF}"
     2.8 +EndProject
     2.9 +Global
    2.10 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    2.11 +		Debug|Win32 = Debug|Win32
    2.12 +		Release|Win32 = Release|Win32
    2.13 +	EndGlobalSection
    2.14 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    2.15 +		{251F8AFF-5A37-4F10-A519-C55C40E127AF}.Debug|Win32.ActiveCfg = Debug|Win32
    2.16 +		{251F8AFF-5A37-4F10-A519-C55C40E127AF}.Debug|Win32.Build.0 = Debug|Win32
    2.17 +		{251F8AFF-5A37-4F10-A519-C55C40E127AF}.Release|Win32.ActiveCfg = Release|Win32
    2.18 +		{251F8AFF-5A37-4F10-A519-C55C40E127AF}.Release|Win32.Build.0 = Release|Win32
    2.19 +	EndGlobalSection
    2.20 +	GlobalSection(SolutionProperties) = preSolution
    2.21 +		HideSolutionNode = FALSE
    2.22 +	EndGlobalSection
    2.23 +EndGlobal
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/goat3dgfx.vcproj	Sat Nov 16 21:09:42 2013 +0200
     3.3 @@ -0,0 +1,368 @@
     3.4 +<?xml version="1.0" encoding="Windows-1252"?>
     3.5 +<VisualStudioProject
     3.6 +	ProjectType="Visual C++"
     3.7 +	Version="9.00"
     3.8 +	Name="goat3dgfx"
     3.9 +	ProjectGUID="{251F8AFF-5A37-4F10-A519-C55C40E127AF}"
    3.10 +	RootNamespace="goat3dgfx"
    3.11 +	Keyword="Win32Proj"
    3.12 +	TargetFrameworkVersion="196613"
    3.13 +	>
    3.14 +	<Platforms>
    3.15 +		<Platform
    3.16 +			Name="Win32"
    3.17 +		/>
    3.18 +	</Platforms>
    3.19 +	<ToolFiles>
    3.20 +	</ToolFiles>
    3.21 +	<Configurations>
    3.22 +		<Configuration
    3.23 +			Name="Debug|Win32"
    3.24 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
    3.25 +			IntermediateDirectory="$(ConfigurationName)"
    3.26 +			ConfigurationType="4"
    3.27 +			CharacterSet="1"
    3.28 +			>
    3.29 +			<Tool
    3.30 +				Name="VCPreBuildEventTool"
    3.31 +			/>
    3.32 +			<Tool
    3.33 +				Name="VCCustomBuildTool"
    3.34 +			/>
    3.35 +			<Tool
    3.36 +				Name="VCXMLDataGeneratorTool"
    3.37 +			/>
    3.38 +			<Tool
    3.39 +				Name="VCWebServiceProxyGeneratorTool"
    3.40 +			/>
    3.41 +			<Tool
    3.42 +				Name="VCMIDLTool"
    3.43 +			/>
    3.44 +			<Tool
    3.45 +				Name="VCCLCompilerTool"
    3.46 +				Optimization="0"
    3.47 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GOAT3DGFX_EXPORTS"
    3.48 +				MinimalRebuild="true"
    3.49 +				BasicRuntimeChecks="3"
    3.50 +				RuntimeLibrary="3"
    3.51 +				UsePrecompiledHeader="0"
    3.52 +				WarningLevel="3"
    3.53 +				DebugInformationFormat="4"
    3.54 +				DisableSpecificWarnings="4244;4996;4305"
    3.55 +			/>
    3.56 +			<Tool
    3.57 +				Name="VCManagedResourceCompilerTool"
    3.58 +			/>
    3.59 +			<Tool
    3.60 +				Name="VCResourceCompilerTool"
    3.61 +			/>
    3.62 +			<Tool
    3.63 +				Name="VCPreLinkEventTool"
    3.64 +			/>
    3.65 +			<Tool
    3.66 +				Name="VCLibrarianTool"
    3.67 +			/>
    3.68 +			<Tool
    3.69 +				Name="VCALinkTool"
    3.70 +			/>
    3.71 +			<Tool
    3.72 +				Name="VCXDCMakeTool"
    3.73 +			/>
    3.74 +			<Tool
    3.75 +				Name="VCBscMakeTool"
    3.76 +			/>
    3.77 +			<Tool
    3.78 +				Name="VCFxCopTool"
    3.79 +			/>
    3.80 +			<Tool
    3.81 +				Name="VCPostBuildEventTool"
    3.82 +			/>
    3.83 +		</Configuration>
    3.84 +		<Configuration
    3.85 +			Name="Release|Win32"
    3.86 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
    3.87 +			IntermediateDirectory="$(ConfigurationName)"
    3.88 +			ConfigurationType="4"
    3.89 +			InheritedPropertySheets=".\goat3dgfx.vsprops"
    3.90 +			CharacterSet="1"
    3.91 +			WholeProgramOptimization="1"
    3.92 +			>
    3.93 +			<Tool
    3.94 +				Name="VCPreBuildEventTool"
    3.95 +			/>
    3.96 +			<Tool
    3.97 +				Name="VCCustomBuildTool"
    3.98 +			/>
    3.99 +			<Tool
   3.100 +				Name="VCXMLDataGeneratorTool"
   3.101 +			/>
   3.102 +			<Tool
   3.103 +				Name="VCWebServiceProxyGeneratorTool"
   3.104 +			/>
   3.105 +			<Tool
   3.106 +				Name="VCMIDLTool"
   3.107 +			/>
   3.108 +			<Tool
   3.109 +				Name="VCCLCompilerTool"
   3.110 +				Optimization="2"
   3.111 +				EnableIntrinsicFunctions="true"
   3.112 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GOAT3DGFX_EXPORTS"
   3.113 +				RuntimeLibrary="2"
   3.114 +				EnableFunctionLevelLinking="true"
   3.115 +				UsePrecompiledHeader="0"
   3.116 +				WarningLevel="3"
   3.117 +				DebugInformationFormat="3"
   3.118 +				DisableSpecificWarnings="4244;4996;4305"
   3.119 +			/>
   3.120 +			<Tool
   3.121 +				Name="VCManagedResourceCompilerTool"
   3.122 +			/>
   3.123 +			<Tool
   3.124 +				Name="VCResourceCompilerTool"
   3.125 +			/>
   3.126 +			<Tool
   3.127 +				Name="VCPreLinkEventTool"
   3.128 +			/>
   3.129 +			<Tool
   3.130 +				Name="VCLibrarianTool"
   3.131 +			/>
   3.132 +			<Tool
   3.133 +				Name="VCALinkTool"
   3.134 +			/>
   3.135 +			<Tool
   3.136 +				Name="VCXDCMakeTool"
   3.137 +			/>
   3.138 +			<Tool
   3.139 +				Name="VCBscMakeTool"
   3.140 +			/>
   3.141 +			<Tool
   3.142 +				Name="VCFxCopTool"
   3.143 +			/>
   3.144 +			<Tool
   3.145 +				Name="VCPostBuildEventTool"
   3.146 +			/>
   3.147 +		</Configuration>
   3.148 +	</Configurations>
   3.149 +	<References>
   3.150 +	</References>
   3.151 +	<Files>
   3.152 +		<Filter
   3.153 +			Name="src"
   3.154 +			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
   3.155 +			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
   3.156 +			>
   3.157 +			<File
   3.158 +				RelativePath=".\src\3dschunks.h"
   3.159 +				>
   3.160 +			</File>
   3.161 +			<File
   3.162 +				RelativePath=".\src\assload.cc"
   3.163 +				>
   3.164 +			</File>
   3.165 +			<File
   3.166 +				RelativePath=".\src\curve.cc"
   3.167 +				>
   3.168 +			</File>
   3.169 +			<File
   3.170 +				RelativePath=".\src\curveload.cc"
   3.171 +				>
   3.172 +			</File>
   3.173 +			<File
   3.174 +				RelativePath=".\src\datapath.cc"
   3.175 +				>
   3.176 +			</File>
   3.177 +			<File
   3.178 +				RelativePath=".\src\geom.cc"
   3.179 +				>
   3.180 +			</File>
   3.181 +			<File
   3.182 +				RelativePath=".\src\gfxutil.cc"
   3.183 +				>
   3.184 +			</File>
   3.185 +			<File
   3.186 +				RelativePath=".\src\image.cc"
   3.187 +				>
   3.188 +			</File>
   3.189 +			<File
   3.190 +				RelativePath=".\src\logger.cc"
   3.191 +				>
   3.192 +			</File>
   3.193 +			<File
   3.194 +				RelativePath=".\src\material.cc"
   3.195 +				>
   3.196 +			</File>
   3.197 +			<File
   3.198 +				RelativePath=".\src\mesh.cc"
   3.199 +				>
   3.200 +			</File>
   3.201 +			<File
   3.202 +				RelativePath=".\src\meshgen.cc"
   3.203 +				>
   3.204 +			</File>
   3.205 +			<File
   3.206 +				RelativePath=".\src\object.cc"
   3.207 +				>
   3.208 +			</File>
   3.209 +			<File
   3.210 +				RelativePath=".\src\opengl.cc"
   3.211 +				>
   3.212 +			</File>
   3.213 +			<File
   3.214 +				RelativePath=".\src\psyspp.cc"
   3.215 +				>
   3.216 +			</File>
   3.217 +			<File
   3.218 +				RelativePath=".\src\rtarg.cc"
   3.219 +				>
   3.220 +			</File>
   3.221 +			<File
   3.222 +				RelativePath=".\src\scene.cc"
   3.223 +				>
   3.224 +			</File>
   3.225 +			<File
   3.226 +				RelativePath=".\src\sdrman.cc"
   3.227 +				>
   3.228 +			</File>
   3.229 +			<File
   3.230 +				RelativePath=".\src\shader.cc"
   3.231 +				>
   3.232 +			</File>
   3.233 +			<File
   3.234 +				RelativePath=".\src\texgen.cc"
   3.235 +				>
   3.236 +			</File>
   3.237 +			<File
   3.238 +				RelativePath=".\src\texman.cc"
   3.239 +				>
   3.240 +			</File>
   3.241 +			<File
   3.242 +				RelativePath=".\src\texture.cc"
   3.243 +				>
   3.244 +			</File>
   3.245 +			<File
   3.246 +				RelativePath=".\src\timer.cc"
   3.247 +				>
   3.248 +			</File>
   3.249 +			<File
   3.250 +				RelativePath=".\src\unistate.cc"
   3.251 +				>
   3.252 +			</File>
   3.253 +			<File
   3.254 +				RelativePath=".\src\xform_node.cc"
   3.255 +				>
   3.256 +			</File>
   3.257 +		</Filter>
   3.258 +		<Filter
   3.259 +			Name="include"
   3.260 +			Filter="h;hpp;hxx;hm;inl;inc;xsd"
   3.261 +			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
   3.262 +			>
   3.263 +			<File
   3.264 +				RelativePath=".\src\assload.h"
   3.265 +				>
   3.266 +			</File>
   3.267 +			<File
   3.268 +				RelativePath=".\src\curve.h"
   3.269 +				>
   3.270 +			</File>
   3.271 +			<File
   3.272 +				RelativePath=".\src\curveload.h"
   3.273 +				>
   3.274 +			</File>
   3.275 +			<File
   3.276 +				RelativePath=".\src\datapath.h"
   3.277 +				>
   3.278 +			</File>
   3.279 +			<File
   3.280 +				RelativePath=".\src\dataset.h"
   3.281 +				>
   3.282 +			</File>
   3.283 +			<File
   3.284 +				RelativePath=".\src\dataset.inl"
   3.285 +				>
   3.286 +			</File>
   3.287 +			<File
   3.288 +				RelativePath=".\src\geom.h"
   3.289 +				>
   3.290 +			</File>
   3.291 +			<File
   3.292 +				RelativePath=".\src\gfxutil.h"
   3.293 +				>
   3.294 +			</File>
   3.295 +			<File
   3.296 +				RelativePath=".\src\image.h"
   3.297 +				>
   3.298 +			</File>
   3.299 +			<File
   3.300 +				RelativePath=".\src\logger.h"
   3.301 +				>
   3.302 +			</File>
   3.303 +			<File
   3.304 +				RelativePath=".\src\material.h"
   3.305 +				>
   3.306 +			</File>
   3.307 +			<File
   3.308 +				RelativePath=".\src\mesh.h"
   3.309 +				>
   3.310 +			</File>
   3.311 +			<File
   3.312 +				RelativePath=".\src\meshgen.h"
   3.313 +				>
   3.314 +			</File>
   3.315 +			<File
   3.316 +				RelativePath=".\src\object.h"
   3.317 +				>
   3.318 +			</File>
   3.319 +			<File
   3.320 +				RelativePath=".\src\opengl.h"
   3.321 +				>
   3.322 +			</File>
   3.323 +			<File
   3.324 +				RelativePath=".\src\psyspp.h"
   3.325 +				>
   3.326 +			</File>
   3.327 +			<File
   3.328 +				RelativePath=".\src\rtarg.h"
   3.329 +				>
   3.330 +			</File>
   3.331 +			<File
   3.332 +				RelativePath=".\src\scene.h"
   3.333 +				>
   3.334 +			</File>
   3.335 +			<File
   3.336 +				RelativePath=".\src\sdrman.h"
   3.337 +				>
   3.338 +			</File>
   3.339 +			<File
   3.340 +				RelativePath=".\src\shader.h"
   3.341 +				>
   3.342 +			</File>
   3.343 +			<File
   3.344 +				RelativePath=".\src\texgen.h"
   3.345 +				>
   3.346 +			</File>
   3.347 +			<File
   3.348 +				RelativePath=".\src\texman.h"
   3.349 +				>
   3.350 +			</File>
   3.351 +			<File
   3.352 +				RelativePath=".\src\texture.h"
   3.353 +				>
   3.354 +			</File>
   3.355 +			<File
   3.356 +				RelativePath=".\src\timer.h"
   3.357 +				>
   3.358 +			</File>
   3.359 +			<File
   3.360 +				RelativePath=".\src\unistate.h"
   3.361 +				>
   3.362 +			</File>
   3.363 +			<File
   3.364 +				RelativePath=".\src\xform_node.h"
   3.365 +				>
   3.366 +			</File>
   3.367 +		</Filter>
   3.368 +	</Files>
   3.369 +	<Globals>
   3.370 +	</Globals>
   3.371 +</VisualStudioProject>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/install.bat	Sat Nov 16 21:09:42 2013 +0200
     4.3 @@ -0,0 +1,5 @@
     4.4 +mkdir c:\usr\include\goat3dgfx
     4.5 +copy /Y usr\include\goat3dgfx\* c:\usr\include\goat3dgfx\
     4.6 +mkdir c:\usr\lib
     4.7 +copy /Y usr\lib\* c:\usr\lib\
     4.8 +pause
     5.1 --- a/src/curveload.cc	Sat Nov 16 21:09:16 2013 +0200
     5.2 +++ b/src/curveload.cc	Sat Nov 16 21:09:42 2013 +0200
     5.3 @@ -1,10 +1,20 @@
     5.4  #include <string>
     5.5  #include <assert.h>
     5.6 -#include <stdint.h>
     5.7  #include "curveload.h"
     5.8  #include "3dschunks.h"
     5.9  #include "logger.h"
    5.10  
    5.11 +#ifndef _MSC_VER
    5.12 +#include <stdint.h>
    5.13 +#else
    5.14 +typedef __int8 int8_t;
    5.15 +typedef __int16 int16_t;
    5.16 +typedef __int32 int32_t;
    5.17 +typedef unsigned __int8 uint8_t;
    5.18 +typedef unsigned __int16 uint16_t;
    5.19 +typedef unsigned __int32 uint32_t;
    5.20 +#endif
    5.21 +
    5.22  static uint32_t read_counter;
    5.23  
    5.24  struct ChunkHeader {
     6.1 --- a/src/texture.cc	Sat Nov 16 21:09:16 2013 +0200
     6.2 +++ b/src/texture.cc	Sat Nov 16 21:09:42 2013 +0200
     6.3 @@ -188,7 +188,7 @@
     6.4  bool Texture2D::load(const char *fname)
     6.5  {
     6.6  	Image img;
     6.7 -	if(!img.load(fname) == -1) {
     6.8 +	if(!img.load(fname)) {
     6.9  		error_log("failed to load 2D texture: %s\n", fname);
    6.10  		return false;
    6.11  	}