diff --git a/lib/irrlicht/media/d3d8.psh b/lib/irrlicht/media/d3d8.psh deleted file mode 100644 index d38a3d617..000000000 --- a/lib/irrlicht/media/d3d8.psh +++ /dev/null @@ -1,10 +0,0 @@ -; part of the Irrlicht Engine Shader example. -; This simple Direct3D9 pixel shader will be loaded by the engine. -; Please note that these example shaders don't do anything really useful. -; They only demonstrate that shaders can be used in Irrlicht. - -ps.1.1 - -tex t0 ; sample color map -mul_x2 t0, t0, v0 ; mulitply with color -add r0, t0, t0 ; make it brighter and store result diff --git a/lib/irrlicht/media/d3d8.vsh b/lib/irrlicht/media/d3d8.vsh deleted file mode 100644 index e0c24f700..000000000 --- a/lib/irrlicht/media/d3d8.vsh +++ /dev/null @@ -1,37 +0,0 @@ -; part of the Irrlicht Engine Shader example. -; This Direct3D9 vertex shader will be loaded by the engine. -; Please note that these example shaders don't do anything really useful. -; They only demonstrate that shaders can be used in Irrlicht. - -vs.1.1 - -; transpose and transform position to clip space -mul r0, v0.x, c4 -mad r0, v0.y, c5, r0 -mad r0, v0.z, c6, r0 -add oPos, c7, r0 - -; transform normal -dp3 r1.x, v1, c0 -dp3 r1.y, v1, c1 -dp3 r1.z, v1, c2 - -; renormalize normal -dp3 r1.w, r1, r1 -rsq r1.w, r1.w -mul r1, r1, r1.w - -; calculate light vector -m4x4 r6, v0, c10 ; vertex into world position -add r2, c8, -r6 ; vtxpos - lightpos - -; normalize light vector -dp3 r2.w, r2, r2 -rsq r2.w, r2.w -mul r2, r2, r2.w - -; calculate light color -dp3 r3, r1, r2 ; dp3 with negative light vector -lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y -mul oD0, r5.y, c9 ; ouput diffuse color -mov oT0, v3 ; store texture coordinates diff --git a/lib/irrlicht/media/d3d9.hlsl b/lib/irrlicht/media/d3d9.hlsl deleted file mode 100644 index e3f3e42be..000000000 --- a/lib/irrlicht/media/d3d9.hlsl +++ /dev/null @@ -1,84 +0,0 @@ -// part of the Irrlicht Engine Shader example. -// These simple Direct3D9 pixel and vertex shaders will be loaded by the shaders -// example. Please note that these example shaders don't do anything really useful. -// They only demonstrate that shaders can be used in Irrlicht. - -//----------------------------------------------------------------------------- -// Global variables -//----------------------------------------------------------------------------- -float4x4 mWorldViewProj; // World * View * Projection transformation -float4x4 mInvWorld; // Inverted world matrix -float4x4 mTransWorld; // Transposed world matrix -float3 mLightPos; // Light position -float4 mLightColor; // Light color - - -// Vertex shader output structure -struct VS_OUTPUT -{ - float4 Position : POSITION; // vertex position - float4 Diffuse : COLOR0; // vertex diffuse color - float2 TexCoord : TEXCOORD0; // tex coords -}; - - -VS_OUTPUT vertexMain(in float4 vPosition : POSITION, - in float3 vNormal : NORMAL, - float2 texCoord : TEXCOORD0 ) -{ - VS_OUTPUT Output; - - // transform position to clip space - Output.Position = mul(vPosition, mWorldViewProj); - - // transform normal - float3 normal = mul(float4(vNormal,0.0), mInvWorld); - - // renormalize normal - normal = normalize(normal); - - // position in world coodinates - float3 worldpos = mul(mTransWorld, vPosition); - - // calculate light vector, vtxpos - lightpos - float3 lightVector = worldpos - mLightPos; - - // normalize light vector - lightVector = normalize(lightVector); - - // calculate light color - float3 tmp = dot(-lightVector, normal); - tmp = lit(tmp.x, tmp.y, 1.0); - - tmp = mLightColor * tmp.y; - Output.Diffuse = float4(tmp.x, tmp.y, tmp.z, 0); - Output.TexCoord = texCoord; - - return Output; -} - - -// Pixel shader output structure -struct PS_OUTPUT -{ - float4 RGBColor : COLOR0; // Pixel color -}; - - -sampler2D myTexture; - -PS_OUTPUT pixelMain(float2 TexCoord : TEXCOORD0, - float4 Position : POSITION, - float4 Diffuse : COLOR0 ) -{ - PS_OUTPUT Output; - - float4 col = tex2D( myTexture, TexCoord ); // sample color map - - // multiply with diffuse and do other senseless operations - Output.RGBColor = Diffuse * col; - Output.RGBColor *= 4.0; - - return Output; -} - diff --git a/lib/irrlicht/media/d3d9.psh b/lib/irrlicht/media/d3d9.psh deleted file mode 100644 index 8286eb862..000000000 --- a/lib/irrlicht/media/d3d9.psh +++ /dev/null @@ -1,11 +0,0 @@ -; part of the Irrlicht Engine Shader example. -; This simple Direct3D9 pixel shader will be loaded by the engine. -; Please note that these example shaders don't do anything really useful. -; They only demonstrate that shaders can be used in Irrlicht. - -ps.1.1 - -tex t0 ; sample color map -add r0, v0, v0 ; mulitply with color -mul t0, t0, r0 ; mulitply with color -add r0, t0, t0 ; make it brighter and store result diff --git a/lib/irrlicht/media/d3d9.vsh b/lib/irrlicht/media/d3d9.vsh deleted file mode 100644 index 0d1dfe9f8..000000000 --- a/lib/irrlicht/media/d3d9.vsh +++ /dev/null @@ -1,42 +0,0 @@ -; part of the Irrlicht Engine Shader example. -; This Direct3D9 vertex shader will be loaded by the engine. -; Please note that these example shaders don't do anything really useful. -; They only demonstrate that shaders can be used in Irrlicht. - -vs.1.1 - -dcl_position v0; ; declare position -dcl_normal v1; ; declare normal -dcl_color v2; ; declare color -dcl_texcoord0 v3; ; declare texture coordinate - -; transpose and transform position to clip space -mul r0, v0.x, c4 -mad r0, v0.y, c5, r0 -mad r0, v0.z, c6, r0 -add oPos, c7, r0 - -; transform normal -dp3 r1.x, v1, c0 -dp3 r1.y, v1, c1 -dp3 r1.z, v1, c2 - -; renormalize normal -dp3 r1.w, r1, r1 -rsq r1.w, r1.w -mul r1, r1, r1.w - -; calculate light vector -m4x4 r6, v0, c10 ; vertex into world position -add r2, c8, -r6 ; vtxpos - lightpos - -; normalize light vector -dp3 r2.w, r2, r2 -rsq r2.w, r2.w -mul r2, r2, r2.w - -; calculate light color -dp3 r3, r1, r2 ; dp3 with negative light vector -lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y -mul oD0, r5.y, c9 ; ouput diffuse color -mov oT0, v3 ; store texture coordinates \ No newline at end of file diff --git a/lib/irrlicht/media/opengl.frag b/lib/irrlicht/media/opengl.frag deleted file mode 100644 index 82c3d5c91..000000000 --- a/lib/irrlicht/media/opengl.frag +++ /dev/null @@ -1,9 +0,0 @@ - -uniform sampler2D myTexture; - -void main (void) -{ - vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0])); - col *= gl_Color; - gl_FragColor = col * 4.0; -} diff --git a/lib/irrlicht/media/opengl.psh b/lib/irrlicht/media/opengl.psh deleted file mode 100644 index 9f9d03bb4..000000000 --- a/lib/irrlicht/media/opengl.psh +++ /dev/null @@ -1,22 +0,0 @@ -!!ARBfp1.0 -# part of the Irrlicht Engine Shader example. -# Please note that these example shaders don't do anything really useful. -# They only demonstrate that shaders can be used in Irrlicht. - -#Input -ATTRIB inTexCoord = fragment.texcoord; # texture coordinates -ATTRIB inColor = fragment.color.primary; # interpolated diffuse color - -#Output -OUTPUT outColor = result.color; - -TEMP texelColor; -TEMP tmp; -TXP texelColor, inTexCoord, texture, 2D; - -ADD tmp, inColor, inColor; # mulitply with color -MUL texelColor, texelColor, tmp; # mulitply with color -ADD outColor, texelColor, texelColor; # make it brighter and store result - -END - diff --git a/lib/irrlicht/media/opengl.vert b/lib/irrlicht/media/opengl.vert deleted file mode 100644 index bfee8169d..000000000 --- a/lib/irrlicht/media/opengl.vert +++ /dev/null @@ -1,27 +0,0 @@ - -uniform mat4 mWorldViewProj; -uniform mat4 mInvWorld; -uniform mat4 mTransWorld; -uniform vec3 mLightPos; -uniform vec4 mLightColor; - -void main(void) -{ - gl_Position = mWorldViewProj * gl_Vertex; - - vec4 normal = vec4(gl_Normal, 0.0); - normal = mInvWorld * normal; - normal = normalize(normal); - - vec4 worldpos = gl_Vertex * mTransWorld; - - vec4 lightVector = worldpos - vec4(mLightPos,1.0); - lightVector = normalize(lightVector); - - float tmp2 = dot(-lightVector, normal); - - vec4 tmp = mLightColor * tmp2; - gl_FrontColor = gl_BackColor = vec4(tmp.x, tmp.y, tmp.z, 0.0); - - gl_TexCoord[0] = gl_MultiTexCoord0; -} diff --git a/lib/irrlicht/media/opengl.vsh b/lib/irrlicht/media/opengl.vsh deleted file mode 100644 index 9cd71bf29..000000000 --- a/lib/irrlicht/media/opengl.vsh +++ /dev/null @@ -1,60 +0,0 @@ -!!ARBvp1.0 -# part of the Irrlicht Engine Shader example. -# Please note that these example shaders don't do anything really useful. -# They only demonstrate that shaders can be used in Irrlicht. - -#input -ATTRIB InPos = vertex.position; -ATTRIB InColor = vertex.color; -ATTRIB InNormal = vertex.normal; -ATTRIB InTexCoord = vertex.texcoord; - -#output -OUTPUT OutPos = result.position; -OUTPUT OutColor = result.color; -OUTPUT OutTexCoord = result.texcoord; - -PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix. -TEMP Temp; -TEMP TempColor; -TEMP TempNormal; -TEMP TempPos; - -#transform position to clip space -DP4 Temp.x, MVP[0], InPos; -DP4 Temp.y, MVP[1], InPos; -DP4 Temp.z, MVP[2], InPos; -DP4 Temp.w, MVP[3], InPos; - -#transform normal -DP3 TempNormal.x, InNormal.x, program.local[0]; -DP3 TempNormal.y, InNormal.y, program.local[1]; -DP3 TempNormal.z, InNormal.z, program.local[2]; - -#renormalize normal -DP3 TempNormal.w, TempNormal, TempNormal; -RSQ TempNormal.w, TempNormal.w; -MUL TempNormal, TempNormal, TempNormal.w; - -# calculate light vector -DP4 TempPos.x, InPos, program.local[10]; # vertex into world position -DP4 TempPos.y, InPos, program.local[11]; -DP4 TempPos.z, InPos, program.local[12]; -DP4 TempPos.w, InPos, program.local[13]; - -ADD TempPos, program.local[8], -TempPos; # vtxpos - lightpos - -# normalize light vector -DP3 TempPos.w, TempPos, TempPos; -RSQ TempPos.w, TempPos.w; -MUL TempPos, TempPos, TempPos.w; - -# calculate light color -DP3 TempColor, TempNormal, TempPos; # dp3 with negative light vector -LIT OutColor, TempColor; # clamp to zero if r3 < 0, r5 has diffuce component in r5.y -MUL OutColor, TempColor.y, program.local[9]; # ouput diffuse color -MOV OutColor.w, 1.0; # we want alpha to be always 1 -MOV OutTexCoord, InTexCoord; # store texture coordinate -MOV OutPos, Temp; - -END \ No newline at end of file diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht-gcc.cbp b/lib/irrlicht/source/Irrlicht/Irrlicht-gcc.cbp deleted file mode 100644 index 5d4c0250a..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht-gcc.cbp +++ /dev/null @@ -1,1322 +0,0 @@ - - - - - - diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht10.0.sln b/lib/irrlicht/source/Irrlicht/Irrlicht10.0.sln deleted file mode 100644 index f3dcbb4e2..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht10.0.sln +++ /dev/null @@ -1,50 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release - Fast FPU|Win32 = Release - Fast FPU|Win32 - Release - Fast FPU|x64 = Release - Fast FPU|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Static lib - Debug|Win32 = Static lib - Debug|Win32 - Static lib - Debug|x64 = Static lib - Debug|x64 - Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 - Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64 - Static lib - Release|Win32 = Static lib - Release|Win32 - Static lib - Release|x64 = Static lib - Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht10.0.vcxproj b/lib/irrlicht/source/Irrlicht/Irrlicht10.0.vcxproj deleted file mode 100644 index 148d5d42a..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht10.0.vcxproj +++ /dev/null @@ -1,1555 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Fast FPU - Win32 - - - Release - Fast FPU - x64 - - - Release - Win32 - - - Release - x64 - - - SDL-Debug - Win32 - - - SDL-Debug - x64 - - - Static lib - Debug - Win32 - - - Static lib - Debug - x64 - - - Static lib - Release - Fast FPU - Win32 - - - Static lib - Release - Fast FPU - x64 - - - Static lib - Release - Win32 - - - Static lib - Release - x64 - - - - Irrlicht - {E08E042A-6C45-411B-92BE-3CC31331019F} - Irrlicht - - - - DynamicLibrary - NotSet - - - DynamicLibrary - NotSet - Windows7.1SDK - - - StaticLibrary - MultiByte - true - - - StaticLibrary - MultiByte - true - Windows7.1SDK - - - StaticLibrary - MultiByte - true - - - StaticLibrary - MultiByte - true - Windows7.1SDK - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - Windows7.1SDK - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - Windows7.1SDK - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - Windows7.1SDK - - - DynamicLibrary - NotSet - - - DynamicLibrary - NotSet - Windows7.1SDK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\..\bin\Win32-VisualStudio\ - ..\..\bin\Win64-VisualStudio\ - ..\..\bin\Win32-VisualStudio\ - ..\..\bin\Win64-VisualStudio\ - obj\$(Configuration)\ - obj\$(Configuration)64\ - false - false - ..\..\bin\Win32-VisualStudio\ - ..\..\bin\Win64-VisualStudio\ - obj\$(Configuration)\ - obj\$(Configuration)64\ - false - false - ..\..\lib\Win32-VisualStudio\ - ..\..\lib\Win64-VisualStudio\ - obj\$(Configuration)\ - obj\$(Configuration)64\ - ..\..\lib\Win32-VisualStudio\ - ..\..\lib\Win64-VisualStudio\ - obj\$(Configuration)\ - obj\$(Configuration)64\ - ..\..\lib\Win32-VisualStudio\ - ..\..\lib\Win64-VisualStudio\ - obj\$(Configuration)\ - obj\$(Configuration)64\ - ..\..\bin\Win32-VisualStudio\ - ..\..\bin\Win64-VisualStudio\ - obj\$(Configuration)\ - obj\$(Configuration)64\ - true - true - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - $(DXSDK_DIR)include;$(CG_INC_PATH);$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - obj\$(Configuration)\ - obj\$(Configuration)64\ - true - true - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)include;$(IncludePath) - $(DXSDK_DIR)Lib\x86;$(CG_LIB_PATH);$(LibraryPath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) - $(DXSDK_DIR)Lib\x86;$(LibraryPath) - $(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64 - $(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64 - $(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64 - $(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64 - $(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64 - $(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64 - $(DXSDK_DIR)Lib\x64;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib\amd64 - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\Debug/Irrlicht.tlb - - - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0 - - - EnableFastChecks - MultiThreadedDebug - false - false - Level3 - Disabled - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - true - - - /MACHINE:I386 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies) - ..\..\bin\Win32-visualstudio\Irrlicht.dll - %(AdditionalLibraryDirectories) - libci.lib;%(IgnoreSpecificDefaultLibraries) - true - - - ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - .\..\Debug/Irrlicht.tlb - - - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions); _ITERATOR_DEBUG_LEVEL=0 - - - EnableFastChecks - MultiThreadedDebug - false - false - Level3 - Disabled - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - true - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) - ..\..\bin\Win64-visualstudio\Irrlicht.dll - %(AdditionalLibraryDirectories) - libci.lib;%(IgnoreSpecificDefaultLibraries) - true - - - ..\..\lib\Win64-visualstudio\Irrlicht.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\Release/Irrlicht.tlb - - - MaxSpeed - OnlyExplicitInline - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - Level3 - - - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - /MACHINE:I386 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;%(AdditionalDependencies) - ..\..\bin\Win32-visualstudio\Irrlicht.dll - libci.lib;%(IgnoreSpecificDefaultLibraries) - false - - - ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\..\Release/Irrlicht.tlb - - - MaxSpeed - OnlyExplicitInline - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - Level3 - - - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - kernel32.lib;user32.lib;gdi32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) - ..\..\bin\Win64-visualstudio\Irrlicht.dll - libci.lib;%(IgnoreSpecificDefaultLibraries) - false - - - ..\..\lib\Win64-visualstudio\Irrlicht.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\Release/Irrlicht.tlb - - - Full - AnySuitable - true - Speed - true - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - false - MultiThreaded - Default - false - false - StreamingSIMDExtensions2 - Fast - false - Level3 - - - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - /MACHINE:I386 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies) - ..\..\bin\Win32-visualstudio\Irrlicht.dll - libci.lib;%(IgnoreSpecificDefaultLibraries) - false - true - - - ..\..\lib\Win32-visualstudio\Irrlicht.lib - Windows - 1.8 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\..\Release/Irrlicht.tlb - - - Full - AnySuitable - true - Speed - true - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - false - MultiThreaded - Default - false - false - StreamingSIMDExtensions2 - Fast - false - Level3 - - - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) - ..\..\bin\Win64-visualstudio\Irrlicht.dll - libci.lib;%(IgnoreSpecificDefaultLibraries) - false - true - - - ..\..\lib\Win64-visualstudio\Irrlicht.lib - Windows - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\Debug/Irrlicht.tlb - - - Disabled - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions);_ITERATOR_DEBUG_LEVEL=2 - - - EnableFastChecks - MultiThreadedDebug - false - false - Level3 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - winmm.lib;%(AdditionalDependencies) - ..\..\lib\Win32-visualstudio\Irrlicht.lib - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - .\..\Debug/Irrlicht.tlb - - - Disabled - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions);_ITERATOR_DEBUG_LEVEL=2 - - - EnableFastChecks - MultiThreadedDebug - false - false - Level3 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - winmm.lib;%(AdditionalDependencies) - ..\..\lib\Win64-visualstudio\Irrlicht.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\Release/Irrlicht.tlb - - - MaxSpeed - OnlyExplicitInline - false - false - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - Level3 - - - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - winmm.lib;%(AdditionalDependencies) - ..\..\lib\Win32-visualstudio\Irrlicht.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\..\Release/Irrlicht.tlb - - - MaxSpeed - OnlyExplicitInline - false - false - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - Level3 - - - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - winmm.lib;%(AdditionalDependencies) - ..\..\lib\Win64-visualstudio\Irrlicht.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\Release/Irrlicht.tlb - - - Full - AnySuitable - true - Speed - true - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - Fast - false - Level3 - - - FastCall - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - winmm.lib;%(AdditionalDependencies) - ..\..\lib\Win32-visualstudio\Irrlicht.lib - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - .\..\Release/Irrlicht.tlb - - - Full - AnySuitable - true - Speed - true - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;WIN64;NDEBUG;_WINDOWS;_USRDLL;_IRR_STATIC_LIB_;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - Fast - false - Level3 - - - FastCall - - - NDEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - winmm.lib;%(AdditionalDependencies) - ..\..\lib\Win64-visualstudio\Irrlicht.lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\Debug/Irrlicht.tlb - - - Disabled - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions) - - - EnableFastChecks - MultiThreadedDebug - false - false - Level3 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - true - - - /MACHINE:I386 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;%(AdditionalDependencies) - ..\..\bin\Win32-visualstudio\Irrlicht.dll - %(AdditionalLibraryDirectories) - libci.lib;%(IgnoreSpecificDefaultLibraries) - true - - - ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - .\..\Debug/Irrlicht.tlb - - - Disabled - ..\..\include;zlib;%(AdditionalIncludeDirectories) - WIN32;WIN64;_DEBUG;_WINDOWS;_USRDLL;IRRLICHT_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_IRR_USE_SDL_DEVICE_=1;%(PreprocessorDefinitions) - - - EnableFastChecks - MultiThreadedDebug - false - false - Level3 - - - _DEBUG;%(PreprocessorDefinitions) - 0x0c07 - - - true - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies) - ..\..\bin\Win64-visualstudio\Irrlicht.dll - %(AdditionalLibraryDirectories) - libci.lib;%(IgnoreSpecificDefaultLibraries) - true - - - ..\..\lib\Win64-visualstudio\Irrlicht.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht10.0.vcxproj.filters b/lib/irrlicht/source/Irrlicht/Irrlicht10.0.vcxproj.filters deleted file mode 100644 index c522cec46..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht10.0.vcxproj.filters +++ /dev/null @@ -1,2247 +0,0 @@ - - - - - {b5bde5d3-f9e4-4036-8c28-2f4e8cd03846} - - - {0b0937fb-2270-4e3e-a94f-f92bc0fa74ae} - - - {67300400-93d5-4a7e-8b59-7c0d7b1f6d75} - - - {feb206b9-81b6-45c0-b4e5-9e637fe060e7} - - - {af459bf5-2849-4a0e-9a21-91acbbf1c6b5} - - - {aa649d49-922d-4118-8574-f05c13d67706} - - - {a72cb2e5-a5c3-41bc-9c86-fdbdae8f7866} - - - {72c30315-bbc0-4109-9ccd-fb7107ba316a} - - - {1fcdc900-911d-4b7a-9328-afce5bbe44fa} - - - {41e16cbf-c3cb-4d74-8aef-c0416b6b9d7f} - - - {b84f01e5-ae3c-457b-8d96-b3e271800162} - - - {eca36d94-d8fb-477d-a0dc-b5498c9686d7} - - - {67826246-df05-4523-9191-5286f9157963} - - - {659a61d5-7ab3-4aa3-95ca-879780810b4e} - - - {f65e8d89-c715-4794-8c2d-22f2b57cffb0} - - - {3cb7865d-a5e9-4b22-8f54-dde759b88c51} - - - {919fcfa4-4277-4c88-8bfc-4bfcfcbb1b65} - - - {834213c7-9515-49de-aa27-8d3ed9c0c87a} - - - {19838bc4-396f-4d23-ad1b-3bb652e33e6d} - - - {a9ca9d4d-7678-4687-b78b-15236c0dcf53} - - - {d694e7b0-0fb0-4685-ace7-56d9ec65a3d0} - - - {e2571a61-945c-4509-b47c-daea464916ab} - - - {1354e9fa-cea6-461e-af7f-9940bb5f0a2f} - - - {ac7af7ba-0e6b-4da4-a695-a0070a4da974} - - - {1173499e-79e8-4c34-8046-abc325e2f2a9} - - - {ca095ff3-25e4-4852-ab55-af28c602cd8a} - - - {1c8bd90a-8361-4478-8942-a062450ef209} - - - {128cac28-b6f8-49e7-87f5-ee15951d0396} - - - {6f10ce97-ed8b-47bc-a189-f2262eb467e4} - - - {5d58bc55-284e-4880-9226-85083e65d660} - - - {064ee182-9f07-4026-ac22-c141ae2c7281} - - - {6e842906-e193-451d-8716-12eaafabd0d8} - - - {799f220e-3a58-4788-876b-88c175b69871} - - - {da421793-4674-481c-be46-f7a44e78aee5} - - - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\video - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\core - - - include\io - - - include\io - - - include\io - - - include\io - - - include\io - - - include\io - - - include\io - - - include\io - - - include\io - - - include\io - - - include\io - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\scene - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - include\gui - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\video - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Null - - - Irrlicht\video\Null - - - Irrlicht\video\Null - - - Irrlicht\video\Null - - - Irrlicht\video\Null - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\irr - - - Irrlicht\irr - - - Irrlicht\irr - - - Irrlicht\irr - - - Irrlicht\irr\extern - - - Irrlicht\irr\extern - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - include\scene - - - - Irrlicht\scene\loaders - - - include\scene - - - Irrlicht\scene\loaders - - - include\video - - - include - - - include\video - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\OpenGL - - - Irrlicht\video - - - - - doc - - - doc - - - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\sceneNodes - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\particleSystem - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\collision - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\animators - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\scene\writers - - - Irrlicht\video - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\Software - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\OpenGL - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Direct3D8 - - - Irrlicht\video\Null - - - Irrlicht\video\Null - - - Irrlicht\video\Null - - - Irrlicht\video\Null - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Writer - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Null\Loader - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\video\Burning Video - - - Irrlicht\irr - - - Irrlicht\irr - - - Irrlicht\irr - - - Irrlicht\irr - - - Irrlicht\irr\extern - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\zlib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\jpeglib - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\libpng - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\aesGladman - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\extern\bzip2 - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\irr\device - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\io - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\gui - - - Irrlicht\scene\loaders - - - Irrlicht\scene\loaders - - - Irrlicht\video\Direct3D9 - - - Irrlicht\video\OpenGL - - - Irrlicht\video - - - - - - \ No newline at end of file diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht8.0.sln b/lib/irrlicht/source/Irrlicht/Irrlicht8.0.sln deleted file mode 100644 index e9759b209..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht8.0.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - Static lib - Debug|Win32 = Static lib - Debug|Win32 - Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 - Static lib - Release|Win32 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht8.0.vcproj b/lib/irrlicht/source/Irrlicht/Irrlicht8.0.vcproj deleted file mode 100644 index 38ce04b3e..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht8.0.vcproj +++ /dev/null @@ -1,3512 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht9.0.sln b/lib/irrlicht/source/Irrlicht/Irrlicht9.0.sln deleted file mode 100644 index 17f0dab23..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht9.0.sln +++ /dev/null @@ -1,32 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht9.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release - Fast FPU|Win32 = Release - Fast FPU|Win32 - Release|Win32 = Release|Win32 - Static lib - Debug|Win32 = Static lib - Debug|Win32 - Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 - Static lib - Release|Win32 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht9.0.vcproj b/lib/irrlicht/source/Irrlicht/Irrlicht9.0.vcproj deleted file mode 100644 index a58889402..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht9.0.vcproj +++ /dev/null @@ -1,3656 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht_xbox.sln b/lib/irrlicht/source/Irrlicht/Irrlicht_xbox.sln deleted file mode 100644 index 1a358172d..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht_xbox.sln +++ /dev/null @@ -1,30 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht_xbox", "Irrlicht_xbox.vcproj", "{2440E601-7438-4C6B-B4AF-BBFE9735875E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Profile = Profile - Profile_FastCap = Profile_FastCap - Release = Release - Release_LTCG = Release_LTCG - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Debug.ActiveCfg = Debug|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Debug.Build.0 = Debug|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile.ActiveCfg = Profile|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile.Build.0 = Profile|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release.ActiveCfg = Release|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release.Build.0 = Release|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox - {2440E601-7438-4C6B-B4AF-BBFE9735875E}.Release_LTCG.Build.0 = Release_LTCG|Xbox - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht_xbox.vcproj b/lib/irrlicht/source/Irrlicht/Irrlicht_xbox.vcproj deleted file mode 100644 index d92d0dfd8..000000000 --- a/lib/irrlicht/source/Irrlicht/Irrlicht_xbox.vcproj +++ /dev/null @@ -1,1987 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/irrlicht/tests/2dmaterial.cpp b/lib/irrlicht/tests/2dmaterial.cpp deleted file mode 100644 index b47b56c8f..000000000 --- a/lib/irrlicht/tests/2dmaterial.cpp +++ /dev/null @@ -1,910 +0,0 @@ -#include "testUtils.h" -#include -using namespace irr; - -namespace -{ -// don't use this code! It lacks many checks and is for testing -// purposes only!!! -// based on code and media from SuperTuxKart -class ScalableFont : public gui::IGUIFontBitmap -{ - float m_scale; - struct TextureInfo - { - irr::core::stringc m_file_name; - bool m_has_alpha; - float m_scale; - - TextureInfo() - { - m_has_alpha = false; - m_scale = 1.0f; - } - }; - - std::map m_texture_files; - - void lazyLoadTexture(int texID) - { - const bool mipmap = Driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); - Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); - // load texture - SpriteBank->setTexture(texID, Driver->getTexture( m_texture_files[texID].m_file_name )); - // set previous mip-map+filter state - Driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, mipmap); - - // couldn't load texture, abort. - if (!SpriteBank->getTexture(texID)) - { - return; - } - else - { - // colorkey texture rather than alpha channel? - if (! m_texture_files[texID].m_has_alpha) - { - Driver->makeColorKeyTexture(SpriteBank->getTexture(texID), core::position2di(0,0)); - } - } - } - void doReadXmlFile(io::IXMLReader* xml) - { - while (xml->read()) - { - if (io::EXN_ELEMENT == xml->getNodeType()) - { - if (core::stringw(L"include") == xml->getNodeName()) - { - core::stringc filename = xml->getAttributeValue(L"file"); - io::IXMLReader* included = Environment->getFileSystem()->createXMLReader(filename.c_str()); - if (included != NULL) - { - doReadXmlFile(included); - included->drop(); - } - } - else if (core::stringw(L"Texture") == xml->getNodeName()) - { - // add a texture - core::stringc filename = xml->getAttributeValue(L"filename"); - core::stringc fn = filename; - u32 i = (u32)xml->getAttributeValueAsInt(L"index"); - - float scale=1.0f; - if (xml->getAttributeValue(L"scale")) - scale = xml->getAttributeValueAsFloat(L"scale"); - //std::cout << "scale = " << scale << std::endl; - - core::stringw alpha = xml->getAttributeValue(L"hasAlpha"); - - //std::cout << "---- Adding font texture " << fn.c_str() << "; alpha=" << alpha.c_str() << std::endl; - - - // make sure the sprite bank has enough textures in it - while (i+1 > SpriteBank->getTextureCount()) - { - SpriteBank->addTexture(NULL); - } - - TextureInfo info; - info.m_file_name = fn; - info.m_has_alpha = (alpha == core::stringw("true")); - info.m_scale = scale; - - m_texture_files[i] = info; - } - else if (core::stringw(L"c") == xml->getNodeName()) - { - // adding a character to this font - SFontArea a; - gui::SGUISpriteFrame f; - gui::SGUISprite s; - core::rect rectangle; - - a.underhang = xml->getAttributeValueAsInt(L"u"); - a.overhang = xml->getAttributeValueAsInt(L"o"); - a.spriteno = SpriteBank->getSprites().size(); - s32 texno = xml->getAttributeValueAsInt(L"i"); - - // parse rectangle - core::stringc rectstr = xml->getAttributeValue(L"r"); - wchar_t ch = xml->getAttributeValue(L"c")[0]; - - const c8 *c = rectstr.c_str(); - s32 val; - val = 0; - while (*c >= '0' && *c <= '9') - { - val *= 10; - val += *c - '0'; - c++; - } - rectangle.UpperLeftCorner.X = val; - while (*c == L' ' || *c == L',') c++; - - val = 0; - while (*c >= '0' && *c <= '9') - { - val *= 10; - val += *c - '0'; - c++; - } - rectangle.UpperLeftCorner.Y = val; - while (*c == L' ' || *c == L',') c++; - - val = 0; - while (*c >= '0' && *c <= '9') - { - val *= 10; - val += *c - '0'; - c++; - } - rectangle.LowerRightCorner.X = val; - while (*c == L' ' || *c == L',') c++; - - val = 0; - while (*c >= '0' && *c <= '9') - { - val *= 10; - val += *c - '0'; - c++; - } - rectangle.LowerRightCorner.Y = val; - - CharacterMap[ch] = Areas.size(); - - // make frame - f.rectNumber = SpriteBank->getPositions().size(); - f.textureNumber = texno; - - // add frame to sprite - s.Frames.push_back(f); - s.frameTime = 0; - - // add rectangle to sprite bank - SpriteBank->getPositions().push_back(rectangle); - a.width = rectangle.getWidth(); - - // add sprite to sprite bank - SpriteBank->getSprites().push_back(s); - - // add character to font - Areas.push_back(a); - } - } - } - } - -public: - - bool m_black_border; - - ScalableFont* m_fallback_font; - float m_fallback_font_scale; - int m_fallback_kerning_width; - - //! constructor - ScalableFont(gui::IGUIEnvironment *env, const io::path& filename) - : Driver(0), SpriteBank(0), Environment(env), WrongCharacter(0), - MaxHeight(0), GlobalKerningWidth(0), GlobalKerningHeight(0) - { - #ifdef _DEBUG - setDebugName("ScalableFont"); - #endif - - m_fallback_font = NULL; - m_fallback_kerning_width = 0; - m_fallback_font_scale = 1.0f; - m_scale = 0.37f; - m_black_border = false; - - if (Environment) - { - // don't grab environment, to avoid circular references - Driver = Environment->getVideoDriver(); - - SpriteBank = Environment->addEmptySpriteBank(filename); - if (SpriteBank) - SpriteBank->grab(); - } - - if (Driver) - Driver->grab(); - - setInvisibleCharacters ( L" " ); - - io::IXMLReader* reader = env->getFileSystem()->createXMLReader(filename.c_str()); - if (reader) - { - load( reader ); - reader->drop(); - } - assert_log(Areas.size() > 0); - } - - //! destructor - virtual ~ScalableFont() - { - if (Driver) - Driver->drop(); - if (SpriteBank) - SpriteBank->drop(); - } - - //! loads a font from an XML file - bool load(io::IXMLReader* xml) - { - if (!SpriteBank) - return false; - - doReadXmlFile(xml); - - // set bad character - WrongCharacter = getAreaIDFromCharacter(L' ', NULL); - - setMaxHeight(); - - for(wchar_t c='0'; c<='9'; c++) - { - SFontArea a = getAreaFromCharacter(c, NULL); - if (a.overhang > m_max_digit_area.overhang ) m_max_digit_area.overhang = a.overhang; - if (a.underhang > m_max_digit_area.underhang) m_max_digit_area.underhang = a.underhang; - if (a.width > m_max_digit_area.width) m_max_digit_area.width = a.width; - } - m_max_digit_area.overhang = 0; - m_max_digit_area.underhang=0; - return true; - } - //! draws an text and clips it to the specified rectangle if wanted - virtual void draw(const core::stringw& text, const core::rect& position, - video::SColor color, bool hcenter=false, - bool vcenter=false, const core::rect* clip=0) - { - if (!Driver) return; - - core::position2d offset = position.UpperLeftCorner; - core::dimension2d text_dimension; - - // When we use the "tab" hack, disable right-alignment, it messes up everything -// bool has_tab = (text.findFirst(L'\t') != -1); - // ---- collect character locations - const unsigned int text_size = text.size(); - core::array indices(text_size); - core::array offsets(text_size); - core::array fallback; - fallback.set_used(text_size); - - for (u32 i = 0; i> 1; - continue; - } // if lineBreak - - bool use_fallback_font = false; - const SFontArea &area = getAreaFromCharacter(c, &use_fallback_font); - fallback[i] = use_fallback_font; - offset.X += area.underhang; - offsets.push_back(offset); - // Invisible character. add something to the array anyway so that - // indices from the various arrays remain in sync - indices.push_back((Invisible.findFirst(c) < 0) ? (int)area.spriteno - : -1); - offset.X += getCharWidth(area, fallback[i]); - } // for i& sprites = SpriteBank->getSprites(); - core::array< core::rect >& positions = SpriteBank->getPositions(); - core::array< gui::SGUISprite >* fallback_sprites; - core::array< core::rect >* fallback_positions; - if (m_fallback_font!=NULL) - { - fallback_sprites = &m_fallback_font->SpriteBank->getSprites(); - fallback_positions = &m_fallback_font->SpriteBank->getPositions(); - } - else - { - fallback_sprites = NULL; - fallback_positions = NULL; - } - - video::IVideoDriver* driver = Environment->getVideoDriver(); - const int spriteAmount = sprites.size(); - for (int n=0; n= spriteAmount)) - continue; - if (indices[n] == -1) - continue; - - //assert_log(sprites[spriteID].Frames.size() > 0); - - const int texID = (fallback[n] ? - (*fallback_sprites)[spriteID].Frames[0].textureNumber : - sprites[spriteID].Frames[0].textureNumber); - - core::rect source = (fallback[n] ? - (*fallback_positions)[(*fallback_sprites)[spriteID].Frames[0].rectNumber] : - positions[sprites[spriteID].Frames[0].rectNumber]); - - const TextureInfo& info = (fallback[n] ? - (*(m_fallback_font->m_texture_files.find(texID))).second : - (*(m_texture_files.find(texID))).second); - float char_scale = info.m_scale; - - core::dimension2d size = source.getSize(); - - float scale = (fallback[n] ? m_scale*m_fallback_font_scale : m_scale); - size.Width = (int)(size.Width * scale * char_scale); - size.Height = (int)(size.Height * scale * char_scale); - - // align vertically if character is smaller - int y_shift = (size.Height < MaxHeight*m_scale ? (int)((MaxHeight*m_scale - size.Height)/2.0f) : 0); - - core::rect dest(offsets[n] + core::position2di(0, y_shift), size); - - video::SColor colors[] = {color, color, color, color}; - - video::ITexture* texture = (fallback[n] ? - m_fallback_font->SpriteBank->getTexture(texID) : - SpriteBank->getTexture(texID) ); - - if (texture == NULL) - { - // perform lazy loading - - if (fallback[n]) - { - m_fallback_font->lazyLoadTexture(texID); - texture = m_fallback_font->SpriteBank->getTexture(texID); - } - else - { - lazyLoadTexture(texID); - texture = SpriteBank->getTexture(texID); - } - - if (texture == NULL) - { - continue; // no such character - } - } - - if (m_black_border) - { - // draw black border - video::SColor black(color.getAlpha(),0,0,0); - video::SColor black_colors[] = {black, black, black, black}; - - for (int x_delta=-2; x_delta<=2; x_delta++) - { - for (int y_delta=-2; y_delta<=2; y_delta++) - { - if (x_delta == 0 || y_delta == 0) continue; - driver->draw2DImage(texture, - dest + core::position2d(x_delta, y_delta), - source, - clip, - black_colors, true); - } - } - } - - if (fallback[n]) - { - // draw text over - static video::SColor orange(color.getAlpha(), 255, 100, 0); - static video::SColor yellow(color.getAlpha(), 255, 220, 15); - video::SColor title_colors[] = {yellow, orange, orange, yellow}; - driver->draw2DImage(texture, - dest, - source, - clip, - title_colors, true); - } - else - { - driver->draw2DImage(texture, - dest, - source, - clip, - colors, true); - - } - } - } - - //! returns the dimension of a text - virtual core::dimension2d getDimension(const wchar_t* text) const - { - assert_log(Areas.size() > 0); - - core::dimension2d dim(0, 0); - core::dimension2d thisLine(0, (int)(MaxHeight*m_scale)); - - for (const wchar_t* p = text; *p; ++p) - { - if (*p == L'\r' || // Windows breaks - *p == L'\n') // Unix breaks - { - if (*p==L'\r' && p[1] == L'\n') // Windows breaks - ++p; - dim.Height += thisLine.Height; - if (dim.Width < thisLine.Width) - dim.Width = thisLine.Width; - thisLine.Width = 0; - continue; - } - - bool fallback = false; - const SFontArea &area = getAreaFromCharacter(*p, &fallback); - - thisLine.Width += area.underhang; - - thisLine.Width += getCharWidth(area, fallback); - } - - dim.Height += thisLine.Height; - if (dim.Width < thisLine.Width) dim.Width = thisLine.Width; - - // std::cout << "ScalableFont::getDimension returns : " << dim.Width << ", " << dim.Height << " --> "; - - dim.Width = (int)(dim.Width + 0.9f); // round up - dim.Height = (int)(dim.Height + 0.9f); - - //std::cout << dim.Width << ", " << dim.Height << std::endl; - - return dim; - } - //! Calculates the index of the character in the text which is on a specific position. - virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const - { - s32 x = 0; - s32 idx = 0; - - while (text[idx]) - { - const SFontArea& a = Areas[getAreaIDFromCharacter(text[idx], NULL)]; - - x += a.width + a.overhang + a.underhang + GlobalKerningWidth; - - if (x >= pixel_x) - return idx; - - ++idx; - } - - return -1; - } - //! Returns the type of this font - virtual gui::EGUI_FONT_TYPE getType() const { return gui::EGFT_BITMAP; } - - //! set an Pixel Offset on Drawing ( scale position on width ) - virtual void setKerningWidth (s32 kerning) - { - GlobalKerningWidth = kerning; - } - virtual void setKerningHeight (s32 kerning) - { - GlobalKerningHeight = kerning; - } - //! set an Pixel Offset on Drawing ( scale position on width ) - virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const - { - s32 ret = GlobalKerningWidth; - - if (thisLetter) - { - ret += Areas[getAreaIDFromCharacter(*thisLetter, NULL)].overhang; - - if (previousLetter) - { - ret += Areas[getAreaIDFromCharacter(*previousLetter, NULL)].underhang; - } - } - - return ret; - } - virtual s32 getKerningHeight() const - { - return GlobalKerningHeight; - } - - //! gets the sprite bank - virtual gui::IGUISpriteBank* getSpriteBank() const - { - return SpriteBank; - } - - //! returns the sprite number from a given character - virtual u32 getSpriteNoFromChar(const wchar_t *c) const - { - return Areas[getAreaIDFromCharacter(*c, NULL)].spriteno; - } - - virtual void setInvisibleCharacters( const wchar_t *s ) - { - Invisible = s; - } - -private: - - struct SFontArea - { - SFontArea() : underhang(0), overhang(0), width(0), spriteno(0) {} - s32 underhang; - s32 overhang; - s32 width; - u32 spriteno; - }; - - int getCharWidth(const SFontArea& area, const bool fallback) const - { - core::array< gui::SGUISprite >& sprites = SpriteBank->getSprites(); - core::array< gui::SGUISprite >* fallback_sprites = (m_fallback_font != NULL ? - &m_fallback_font->SpriteBank->getSprites() : - NULL); - - const int texID = (fallback ? - (*fallback_sprites)[area.spriteno].Frames[0].textureNumber : - sprites[area.spriteno].Frames[0].textureNumber); - - const TextureInfo& info = (fallback ? - (*(m_fallback_font->m_texture_files.find(texID))).second : - (*(m_texture_files.find(texID))).second); - const float char_scale = info.m_scale; - - //std::cout << "area.spriteno=" << area.spriteno << ", char_scale=" << char_scale << std::endl; - - if (fallback) - return (int)(((area.width + area.overhang)*m_fallback_font_scale + m_fallback_kerning_width) * m_scale * char_scale); - else - return (int)((area.width + area.overhang + GlobalKerningWidth) * m_scale * char_scale); - } - s32 getAreaIDFromCharacter(const wchar_t c, bool* fallback_font) const - { - std::map::const_iterator n = CharacterMap.find(c); - if (n != CharacterMap.end()) - { - if (fallback_font != NULL) - *fallback_font = false; - return (*n).second; - } - else if (m_fallback_font != NULL && fallback_font != NULL) - { - *fallback_font = true; - return m_fallback_font->getAreaIDFromCharacter(c, NULL); - } - else - { - // std::cout << "The font does not have this character : <" << (int)c << ">" << std::endl; - if (fallback_font != NULL) - *fallback_font = false; - return WrongCharacter; - } - } - const SFontArea &getAreaFromCharacter(const wchar_t c, bool* fallback_font) const - { - const int area_id = getAreaIDFromCharacter(c, fallback_font); - const bool use_fallback_font = (fallback_font && *fallback_font); - - // Note: fallback_font can be NULL - return ( use_fallback_font ? m_fallback_font->Areas[area_id] : Areas[area_id]); - } // getAreaFromCharacter - void setMaxHeight() - { - // FIXME: should consider per-texture scaling - MaxHeight = 0; - s32 t; - - core::array< core::rect >& p = SpriteBank->getPositions(); - - for (u32 i=0; iMaxHeight) - MaxHeight = t; - } - } - core::array Areas; - /** The maximum values of all digits, used in monospace_digits. */ - mutable SFontArea m_max_digit_area; - std::map CharacterMap; - video::IVideoDriver* Driver; - gui::IGUISpriteBank* SpriteBank; - gui::IGUIEnvironment* Environment; - u32 WrongCharacter; - s32 MaxHeight; - s32 GlobalKerningWidth, GlobalKerningHeight; - - core::stringw Invisible; -}; -} - -// The actual bug that was behind this issue was the combination of -// 2d rendering and mipmaps. The issue was reproduced using the special -// draw2dimage version, hence the name. -static bool draw2DImage4c(video::E_DRIVER_TYPE type) -{ - IrrlichtDevice *device = createDevice(type, core::dimension2d(240, 120)); - - if (!device) - return true; // could not create selected driver. - - video::IVideoDriver* driver = device->getVideoDriver(); - - if (!driver->queryFeature(video::EVDF_BILINEAR_FILTER)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS,true); - driver->setTextureCreationFlag(video::ETCF_OPTIMIZED_FOR_QUALITY,true); - - video::ITexture* images = driver->getTexture("../media/2ddemo.png"); - driver->makeColorKeyTexture(images, core::position2d(0,0)); - - core::rect imp1(349,15,385,78); - core::rect imp2(387,15,423,78); - - // font cannot handle loading from sub-dirs - io::path cwd = device->getFileSystem()->getWorkingDirectory(); - device->getFileSystem()->changeWorkingDirectoryTo("media"); - - ScalableFont* font = new ScalableFont(device->getGUIEnvironment(), "title_font.xml"); - font->m_fallback_font_scale = 4.0f; - font->m_fallback_kerning_width = 15; - font->setKerningWidth(-18); - font->m_black_border = true; - - /* - Prepare a nicely filtering 2d render mode for special cases. - */ - driver->getMaterial2D().UseMipMaps = true; - driver->getMaterial2D().TextureLayer[0].BilinearFilter = true; - - { - driver->beginScene(true, true, video::SColor(255,120,102,136)); - - driver->enableMaterial2D(); - - // draw fire & dragons background world - driver->draw2DImage(images, core::position2di(), - core::rect(0,0,342,224), 0, - video::SColor(255,255,255,255), true); - - // draw flying imp - driver->draw2DImage(images, core::position2d(114,75), - imp1, 0, video::SColor(255,255,255,255), true); - - // draw second flying imp - driver->draw2DImage(images, core::position2d(220,55), - imp2, 0, video::SColor(255,255,255,255), true); - - driver->draw2DImage(images, core::rect(10,10,108,48), - core::rect(354,87,442,118)); - - video::SColor colors[] = {0xff00ffff, 0xff00ffff, 0xffffff00, 0xffffff00}; - driver->draw2DImage(images, core::recti(10,50,108,88), - core::recti(354,87,442,118), 0, colors, true); - - font->draw( L"WXYZsSdDrRjJbB", core::rect(30,20,300,300), - video::SColor(255,255,255,255) ); - - driver->enableMaterial2D(false); - - driver->draw2DImage(images, core::recti(10,90,108,128), - core::recti(354,87,442,118), 0, colors, true); - - font->draw( L"WXYZsSdDrRjJbB", core::rect(30,60,300,400), - video::SColor(255,255,255,255) ); - - driver->endScene(); - } - font->drop(); - device->getFileSystem()->changeWorkingDirectoryTo(cwd); - - // don't go under 99% as the difference is not very large - bool result = takeScreenshotAndCompareAgainstReference(driver, "-draw2DImage4cFilter.png"); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -// This test renders a 3d scene and a gui on top of it. The GUI is -// filtered via 2dmaterial (blurred). -// TODO: Works only for OpenGL right now -static bool addBlend2d(video::E_DRIVER_TYPE type) -{ - SIrrlichtCreationParameters params; - params.AntiAlias = 0; - params.Bits = 32; - params.WindowSize = core::dimension2d(160, 120); - params.DriverType = type; - - IrrlichtDevice *device = createDeviceEx(params); - - if (!device) - return true; // in case the driver type does not exist - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - if (!driver->queryFeature(video::EVDF_BILINEAR_FILTER)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::IAnimatedMesh* mesh = smgr->getMesh("../media/sydney.md2"); - if (!mesh) - { - device->closeDevice(); - device->run(); - device->drop(); - return false; - } - - stabilizeScreenBackground(driver); - - scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); - - if (node) - { - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMD2Animation(scene::EMAT_STAND); - node->setMaterialTexture( 0, driver->getTexture("../media/sydney.bmp") ); - } - - smgr->addCameraSceneNode(0, core::vector3df(0,30,-40), core::vector3df(0,5,0)); - - gui::IGUIEnvironment* env = device->getGUIEnvironment(); - { - // create the toolbox window - gui::IGUIWindow* wnd = env->addWindow(core::rect(0,0,800,480), - false, L"Toolset", 0, 100); - - // create tab control and tabs - gui::IGUITabControl* tab = env->addTabControl( - core::rect(2,20,800-602,480-7), wnd, true, true); - - gui::IGUITab* t1 = tab->addTab(L"Config"); - - // add some edit boxes and a button to tab one - env->addImage(driver->getTexture("../media/tools.png"), core::vector2d(10,20), true, t1); - env->addStaticText(L"X:", core::rect(22,48,40,66), false, false, t1); - env->addEditBox(L"1.0", core::rect(40,46,130,66), true, t1, 201); - - // quick scale buttons - env->addButton(core::rect(65,20,95,40), t1, 102, L"* 10"); - env->addButton(core::rect(100,20,130,40), t1, 103, L"* 0.1"); - } - - video::SMaterial& material2D = driver->getMaterial2D(); - for (unsigned int n=0; nbeginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->enableMaterial2D(); - env->drawAll(); - driver->enableMaterial2D(false); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-addBlend2D.png", 98.2f); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -// This test renders 4 times the same image. Two via IGUIImage, two via draw2DImage -// 3 of the 4 images are filtered via 2dmaterial and bilinear filter, only the one -// at the bottom left is not. -static bool moreFilterTests(video::E_DRIVER_TYPE type) -{ - IrrlichtDevice* device = irr::createDevice(type, core::dimension2du(160,120)); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - gui::IGUIEnvironment* gui = device->getGUIEnvironment(); - - if (!driver->queryFeature(video::EVDF_BILINEAR_FILTER)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); - video::ITexture* tex = driver->getTexture("../media/irrlichtlogo.jpg"); - gui::IGUIImage* image = gui->addImage(core::recti(0,0,64,64)); - image->setScaleImage(true); - image->setImage(tex); - image->setUseAlphaChannel(true); - driver->getMaterial2D().TextureLayer[0].BilinearFilter=true; - driver->getMaterial2D().TextureLayer[0].TrilinearFilter=true; - - { - driver->beginScene(true, true, irr::video::SColor(255,255,255,255)); - - // all three logos should be with filtering - driver->enableMaterial2D(); - - driver->getMaterial2D().setTexture(0, 0); - driver->draw2DImage(tex, irr::core::rect(64, 64, 128, 128), irr::core::rect(0, 0, 88, 31)); - - driver->getMaterial2D().setTexture(0, tex); - driver->draw2DImage(tex, irr::core::rect(64, 0, 128, 64), irr::core::rect(0, 0, 88, 31)); - - gui->drawAll(); - - // the next gui image should be without filter - driver->enableMaterial2D(false); - image->setRelativePosition(core::recti(0,64,64,128)); - gui->drawAll(); - - driver->endScene(); - } - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-2dmatFilter.png"); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -bool twodmaterial() -{ - bool result = true; - TestWithAllDrivers(addBlend2d); - TestWithAllDrivers(moreFilterTests); - TestWithAllDrivers(draw2DImage4c); - return result; -} diff --git a/lib/irrlicht/tests/Makefile b/lib/irrlicht/tests/Makefile deleted file mode 100644 index 193434dcf..000000000 --- a/lib/irrlicht/tests/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# Irrlicht Engine Regression Tests Makefile -Target = tests -Sources = $(wildcard *.cpp) - -CPPFLAGS = -I../include -I/usr/X11R6/include -pipe -# CXXFLAGS += -O3 -CXXFLAGS += -Wall -ansi -pedantic -O0 -g -D_DEBUG -fno-exceptions - -ifeq ($(HOSTTYPE), x86_64) -LIBSELECT=64 -endif - -all: all_linux - -# target specific settings -all_linux: SYSTEM=Linux -all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor - -all_win32 clean_win32: SYSTEM=Win32-gcc -all_win32: LDFLAGS = -L../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm - -all_win32 clean_win32: SUF=.exe -# name of the binary - only valid for targets which set SYSTEM -DESTPATH = ../bin/$(SYSTEM)/$(Target)$(SUF) - -OBJ = $(Sources:.cpp=.o) - -all_linux all_win32: $(OBJ) - $(warning Building...) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) - @$(RM) tests # otherwise it's easy to forget to copy it and run the old binary - -clean: clean_linux clean_win32 - $(warning Cleaning...) - @$(RM) $(OBJ) - -clean_linux clean_win32: - @$(RM) $(DESTPATH) - -.PHONY: all all_win32 clean clean_linux clean_win32 - -# Create dependency files for automatic recompilation -%.d:%.cpp - $(CXX) $(CPPFLAGS) -MM -MF $@ $< - -ifneq ($(MAKECMDGOALS),clean) --include $(OBJ:.o=.d) -endif - diff --git a/lib/irrlicht/tests/anti-aliasing.cpp b/lib/irrlicht/tests/anti-aliasing.cpp deleted file mode 100644 index 09205be4a..000000000 --- a/lib/irrlicht/tests/anti-aliasing.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "testUtils.h" - -using namespace irr; - -static bool testLineRendering(video::E_DRIVER_TYPE type) -{ - SIrrlichtCreationParameters params; - params.AntiAlias = 2; - params.Bits = 16; - params.WindowSize = core::dimension2d(160, 120); - params.DriverType = type; - - IrrlichtDevice *device = createDeviceEx(params); - - if (!device) - return true; // in case the driver type does not exist - - video::IVideoDriver* driver = device->getVideoDriver(); - // if no AntiAliasing supported, skip this test - if (driver->getDriverAttributes().getAttributeAsInt("AntiAlias")<2) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::ISceneManager* smgr = device->getSceneManager(); - - scene::IAnimatedMesh* mesh = smgr->getMesh("./media/sydney.md2"); - if (!mesh) - { - device->closeDevice(); - device->run(); - device->drop(); - return false; - } - - stabilizeScreenBackground(driver); - - scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); - - if (node) - { - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMD2Animation(scene::EMAT_STAND); - node->setMaterialTexture( 0, driver->getTexture("./media/sydney.bmp") ); - } - - smgr->addCameraSceneNode(0, core::vector3df(0,30,-40), core::vector3df(0,5,0)); - - device->getTimer()->setTime(0); // scene has animations and current scene seems to be saved at that time - driver->beginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->draw3DBox(node->getBoundingBox(), video::SColor(0,255,0,0)); - driver->draw2DLine(core::position2di(10,10), core::position2di(100,100), video::SColor(255,0,0,0)); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-lineAntiAliasing.png", 99.4f ); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -bool antiAliasing() -{ - bool result = true; - TestWithAllHWDrivers(testLineRendering); - return result; -} diff --git a/lib/irrlicht/tests/archiveReader.cpp b/lib/irrlicht/tests/archiveReader.cpp deleted file mode 100644 index 5674f6c97..000000000 --- a/lib/irrlicht/tests/archiveReader.cpp +++ /dev/null @@ -1,469 +0,0 @@ -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace io; - -namespace -{ - -bool testArchive(IFileSystem* fs, const io::path& archiveName) -{ - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - { - logTestString("Already mounted archives found\n"); - return false; - } - - if ( !fs->addFileArchive(archiveName, /*bool ignoreCase=*/true, /*bool ignorePaths=*/false) ) - { - logTestString("Mounting archive failed\n"); - return false; - } - - // make sure there is an archive mounted - if ( !fs->getFileArchiveCount() ) - { - logTestString("Mounted archive not in list\n"); - return false; - } - - // mount again - if ( !fs->addFileArchive(archiveName, /*bool ignoreCase=*/true, /*bool ignorePaths=*/false) ) - { - logTestString("Mounting a second time failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - // make sure there is exactly one archive mounted - if ( fs->getFileArchiveCount() != 1 ) - { - logTestString("Duplicate mount not recognized\n"); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - if (fs->getFileArchive(0)->getType()==io::EFAT_FOLDER) - { - // mount again with different path end symbol (either with slash or without) - core::stringc newArchiveName=archiveName; - if (archiveName.lastChar()=='/') - newArchiveName.erase(newArchiveName.size()-1); - else - newArchiveName.append('/'); - if ( !fs->addFileArchive(newArchiveName, /*bool ignoreCase=*/true, /*bool ignorePaths=*/false) ) - { - logTestString("Mounting a second time with different name failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - // make sure there is exactly one archive mounted - if ( fs->getFileArchiveCount() != 1 ) - { - logTestString("Duplicate mount with different filename not recognized\n"); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - } - -#if 0 - // log what we got - io::IFileArchive* archive = fs->getFileArchive(fs->getFileArchiveCount()-1); - const io::IFileList* fileList = archive->getFileList(); - for ( u32 f=0; f < fileList->getFileCount(); ++f) - { - logTestString("File name: %s\n", fileList->getFileName(f).c_str()); - logTestString("Full path: %s\n", fileList->getFullFileName(f).c_str()); - logTestString("ID: %d\n", fileList->getID(f)); - } -#endif - - io::path filename("mypath/mypath/myfile.txt"); - if (!fs->existFile(filename)) - { - logTestString("existFile with deep path failed\n"); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - const char* names[] = {"test/test.txt", "mypath/myfile.txt", "mypath/mypath/myfile.txt"}; - const char* basenames[] = {"test.txt", "myfile.txt", "myfile.txt"}; - const char* content[] = {"Hello world!", "1est\n", "2est"}; - - for (u32 i=0; i<3; ++i) - { - if (!fs->existFile(names[i])) - { - logTestString("existFile failed\n"); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - IReadFile* readFile = fs->createAndOpenFile(names[i]); - if (!readFile) - { - logTestString("createAndOpenFile failed\n"); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - if (fs->getFileBasename(readFile->getFileName()) != basenames[i]) - { - logTestString("Wrong filename, file list seems to be corrupt\n"); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - readFile->drop(); - return false; - } - char tmp[13] = {'\0'}; - readFile->read(tmp, 12); - if (strcmp(tmp, content[i])) - { - logTestString("Read bad data from archive: %s\n", tmp); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - readFile->drop(); - return false; - } - readFile->drop(); - } - - if (!fs->removeFileArchive(fs->getFileArchiveCount()-1)) - { - logTestString("Couldn't remove archive.\n"); - return false; - } - - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - return false; - - return true; -} - -bool testEncryptedZip(IFileSystem* fs) -{ - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - { - logTestString("Already mounted archives found\n"); - return false; - } - - const char* archiveName = "media/enc.zip"; - if ( !fs->addFileArchive(archiveName, /*bool ignoreCase=*/true, /*bool ignorePaths=*/false) ) - { - logTestString("Mounting archive failed\n"); - return false; - } - - // make sure there is an archive mounted - if ( !fs->getFileArchiveCount() ) - { - logTestString("Mounted archive not in list\n"); - return false; - } - - // mount again - if ( !fs->addFileArchive(archiveName, /*bool ignoreCase=*/true, /*bool ignorePaths=*/false) ) - { - logTestString("Mounting a second time failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - // make sure there is exactly one archive mounted - if ( fs->getFileArchiveCount() != 1 ) - { - logTestString("Duplicate mount not recognized\n"); - while (fs->getFileArchiveCount()) - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - // log what we got - io::IFileArchive* archive = fs->getFileArchive(fs->getFileArchiveCount()-1); - io::path filename("doc"); - const io::IFileList* fileList = archive->getFileList(); - for ( u32 f=0; f < fileList->getFileCount(); ++f) - { - logTestString("%s name: %s\n", fileList->isDirectory(f)?"Directory":"File", fileList->getFileName(f).c_str()); - logTestString("Full path: %s\n", fileList->getFullFileName(f).c_str()); - } - if (fileList->findFile(filename) != -1) - { - logTestString("findFile wrongly succeeded on directory\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - if (fileList->findFile(filename, true)==-1) - { - logTestString("findFile failed on directory\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - filename="doc/readme.txt"; - if (fileList->findFile(filename)==-1) - { - logTestString("findFile failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - if (fileList->findFile(filename, true) != -1) - { - logTestString("findFile wrongly succeeded on non-directory\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - if (!fs->existFile(filename)) - { - logTestString("existFile failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - filename="doc"; - if (fs->existFile(filename)) - { - logTestString("existFile succeeded wrongly on directory\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - filename="doc/readme.txt"; - IReadFile* readFile = fs->createAndOpenFile(filename); - if ( readFile ) - { - logTestString("createAndOpenFile succeeded, even though no password was set.\n"); - readFile->drop(); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - archive->Password="33445"; - readFile = fs->createAndOpenFile(filename); -#ifdef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ - if ( !readFile ) - { - logTestString("createAndOpenFile failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - char tmp[13] = {'\0'}; - readFile->read(tmp, 12); - readFile->drop(); - if (strncmp(tmp, "Linux Users:", 12)) - { - logTestString("Read bad data from archive: %s\n", tmp); - return false; - } -#endif - - if (!fs->removeFileArchive(fs->getFileArchiveCount()-1)) - { - logTestString("Couldn't remove archive.\n"); - return false; - } - - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - return false; - - return true; -} - -bool testSpecialZip(IFileSystem* fs, const char* archiveName, const char* filename, const void* content) -{ - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - { - logTestString("Already mounted archives found\n"); - return false; - } - - if ( !fs->addFileArchive(archiveName, /*bool ignoreCase=*/true, /*bool ignorePaths=*/false) ) - { - logTestString("Mounting archive failed\n"); - return false; - } - - // make sure there is an archive mounted - if ( !fs->getFileArchiveCount() ) - { - logTestString("Mounted archive not in list\n"); - return false; - } - - // log what we got - io::IFileArchive* archive = fs->getFileArchive(fs->getFileArchiveCount()-1); - const io::IFileList* fileList = archive->getFileList(); - for ( u32 f=0; f < fileList->getFileCount(); ++f) - { - logTestString("%s name: %s\n", fileList->isDirectory(f)?"Directory":"File", fileList->getFileName(f).c_str()); - logTestString("Full path: %s\n", fileList->getFullFileName(f).c_str()); - } - - if (!fs->existFile(filename)) - { - logTestString("existFile failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - IReadFile* readFile = fs->createAndOpenFile(filename); - if ( !readFile ) - { - logTestString("createAndOpenFile failed\n"); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - char tmp[6] = {'\0'}; - readFile->read(tmp, 5); - if (memcmp(tmp, content, 5)) - { - logTestString("Read bad data from archive: %s\n", tmp); - readFile->drop(); - fs->removeFileArchive(fs->getFileArchiveCount()-1); - return false; - } - - readFile->drop(); - - if (!fs->removeFileArchive(fs->getFileArchiveCount()-1)) - { - logTestString("Couldn't remove archive.\n"); - return false; - } - - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - return false; - - return true; -} - -static bool testMountFile(IFileSystem* fs) -{ - bool result = true; -#if 1 - fs->changeWorkingDirectoryTo("empty"); - // log what we got - const io::IFileList* fileList = fs->createFileList(); - for ( u32 f=0; f < fileList->getFileCount(); ++f) - { - logTestString("File name: %s\n", fileList->getFileName(f).c_str()); - logTestString("Full path: %s\n", fileList->getFullFileName(f).c_str()); - logTestString("ID: %d\n", fileList->getID(f)); - } - fileList->drop(); - fs->changeWorkingDirectoryTo(".."); -#endif - if (!fs->addFileArchive("empty"), false) - result = false; - const IFileList* list = fs->getFileArchive(0)->getFileList(); -#if 1 - // log what we got - io::IFileArchive* archive = fs->getFileArchive(fs->getFileArchiveCount()-1); - fileList = archive->getFileList(); - for ( u32 f=0; f < fileList->getFileCount(); ++f) - { - logTestString("File name: %s\n", fileList->getFileName(f).c_str()); - logTestString("Full path: %s\n", fileList->getFullFileName(f).c_str()); - logTestString("ID: %d\n", fileList->getID(f)); - } -#endif - - if (list->getFileName(0) != "burnings video 0.39b.png") - result = false; - return result; -} - -bool testAddRemove(IFileSystem* fs, const io::path& archiveName) -{ - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - { - logTestString("Already mounted archives found\n"); - return false; - } - - if ( !fs->addFileArchive(archiveName, /*bool ignoreCase=*/true, /*bool ignorePaths=*/false) ) - { - logTestString("Mounting archive failed\n"); - return false; - } - - // make sure there is an archive mounted - if ( !fs->getFileArchiveCount() ) - { - logTestString("Mounted archive not in list\n"); - return false; - } - - if (!fs->removeFileArchive(archiveName)) - { - logTestString("Couldn't remove archive.\n"); - return false; - } - - // make sure there is no archive mounted - if ( fs->getFileArchiveCount() ) - return false; - - return true; -} -} - - -bool archiveReader() -{ - IrrlichtDevice * device = irr::createDevice(video::EDT_NULL, dimension2d(1, 1)); - assert_log(device); - if(!device) - return false; - - io::IFileSystem * fs = device->getFileSystem (); - if ( !fs ) - return false; - - bool ret = true; - logTestString("Testing mount file.\n"); - ret &= testArchive(fs, "media/file_with_path"); - logTestString("Testing mount file.\n"); - ret &= testArchive(fs, "media/file_with_path/"); - logTestString("Testing zip files.\n"); - ret &= testArchive(fs, "media/file_with_path.zip"); - logTestString("Testing pak files.\n"); - ret &= testArchive(fs, "media/sample_pakfile.pak"); - logTestString("Testing npk files.\n"); - ret &= testArchive(fs, "media/file_with_path.npk"); - logTestString("Testing encrypted zip files.\n"); - ret &= testEncryptedZip(fs); - logTestString("Testing special zip files.\n"); - ret &= testSpecialZip(fs, "media/Monty.zip", "monty/license.txt", "Monty"); - logTestString("Testing special zip files lzma.\n"); - const u8 buf[] = {0xff, 0xfe, 0x3c, 0x00, 0x3f}; - ret &= testSpecialZip(fs, "media/lzmadata.zip", "tahoma10_.xml", buf); -// logTestString("Testing complex mount file.\n"); -// ret &= testMountFile(fs); - logTestString("Testing add/remove with filenames.\n"); - ret &= testAddRemove(fs, "media/file_with_path.zip"); - - device->closeDevice(); - device->run(); - device->drop(); - - return ret; -} - diff --git a/lib/irrlicht/tests/b3dAnimation.cpp b/lib/irrlicht/tests/b3dAnimation.cpp deleted file mode 100644 index 50ec9df24..000000000 --- a/lib/irrlicht/tests/b3dAnimation.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -// Tests B3D animations. -bool b3dAnimation(void) -{ - // Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions. - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, core::dimension2d(160, 120), 32); - assert_log(device); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - scene::ISkinnedMesh* mesh = (scene::ISkinnedMesh*)smgr->getMesh("../media/ninja.b3d"); - assert_log(mesh); - - bool result = false; - if (!mesh) - return false; - - scene::IAnimatedMeshSceneNode* node1 = smgr->addAnimatedMeshSceneNode(mesh); - assert_log(node1); - - /** Verify that two skinned animated mesh scene nodes can use different frames of the skinned mesh */ - if(node1) - { - node1->setPosition(core::vector3df(-3, -3, 10)); - node1->setMaterialFlag(video::EMF_LIGHTING, false); - node1->setAnimationSpeed(0.f); - node1->setCurrentFrame(10.f); - node1->setDebugDataVisible(irr::scene::EDS_BBOX_BUFFERS); - } - - scene::IAnimatedMeshSceneNode* node2 = smgr->addAnimatedMeshSceneNode(mesh); - assert_log(node2); - if(node2) - { - node2->setPosition(core::vector3df(3, -3, 10)); - node2->setMaterialFlag(video::EMF_LIGHTING, false); - node2->setAnimationSpeed(0.f); - node2->setCurrentFrame(62.f); - node2->setDebugDataVisible(scene::EDS_BBOX_BUFFERS); - } - - (void)smgr->addCameraSceneNode(); - - // Just jump to the last frame since that's all we're interested in. - device->run(); - driver->beginScene(true, true, video::SColor(255, 60, 60, 60)); - smgr->drawAll(); - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-b3dAnimation.png"); - if (node2) - node2->remove(); - - /** Now test if bones are correctly positioned. */ - node1->setDebugDataVisible(scene::EDS_SKELETON); - node1->setPosition(core::vector3df(1,-5,8)); - node1->setRotation(core::vector3df(0,180,0)); - node1->updateAbsolutePosition(); - for (u32 i=0; igetJointCount(); ++i) - { - smgr->addCubeSceneNode(1.f,0,-1,node1->getJointNode(i)->getAbsolutePosition()); -// smgr->addCubeSceneNode(1.f,node1->getJointNode(i)); - } - - // Simple render call - device->run(); - driver->beginScene(true, true, video::SColor(255, 60, 60, 60)); - smgr->drawAll(); - driver->endScene(); - - result &= takeScreenshotAndCompareAgainstReference(driver, "-b3dJointPosition.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/billboards.cpp b/lib/irrlicht/tests/billboards.cpp deleted file mode 100644 index 20e0f8613..000000000 --- a/lib/irrlicht/tests/billboards.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -namespace -{ -// Test billboard sizing -bool billboardSize(void) -{ - // Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions. - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, core::dimension2d(160, 120), 32); - assert_log(device); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - smgr->addCameraSceneNode(); - scene::IBillboardSceneNode* bill = smgr->addBillboardSceneNode(); - bill->setPosition(core::vector3df(0,0,50)); - bill = smgr->addBillboardSceneNode(); - bill->setPosition(core::vector3df(-30,0,50)); - bill->getMaterial(0).Lighting=false; - bill = smgr->addBillboardSceneNode(); - bill->setPosition(core::vector3df(30,0,50)); - bill->getMaterial(0).Lighting=false; - bill->getMaterial(0).Wireframe=true; - bill = smgr->addBillboardSceneNode(); - bill->setPosition(core::vector3df(30,0,50)); - bill->setSize(2,2,2); - - bill = smgr->addBillboardSceneNode(); - bill->setSize(10,20,2); - bill->setPosition(core::vector3df(0,30,50)); - bill = smgr->addBillboardSceneNode(); - bill->setSize(10,2,20); - bill->setPosition(core::vector3df(-30,30,50)); - bill->getMaterial(0).Lighting=false; - bill = smgr->addBillboardSceneNode(); - bill->setSize(10,2,20); - bill->setPosition(core::vector3df(30,30,50)); - bill->getMaterial(0).Lighting=false; - bill->getMaterial(0).Wireframe=true; - bill = smgr->addBillboardSceneNode(); - bill->setPosition(core::vector3df(30,30,50)); - bill->setSize(2,2,2); - - video::ITexture* tex = driver->getTexture("../media/fireball.bmp"); - bill = smgr->addBillboardSceneNode(); - bill->getMaterial(0).Lighting=false; - bill->getMaterial(0).TextureLayer[0].AnisotropicFilter=true; - bill->getMaterial(0).setTexture(0, tex); - bill->setSize(10,20,2); - bill->setPosition(core::vector3df(0,-30,50)); - bill = smgr->addBillboardSceneNode(); - bill->setSize(10,2,20); - bill->setPosition(core::vector3df(-30,-30,50)); - bill->getMaterial(0).TextureLayer[0].AnisotropicFilter=true; - bill->getMaterial(0).setTexture(0, tex); - bill->getMaterial(0).Lighting=false; - bill = smgr->addBillboardSceneNode(); - bill->setSize(10,2,20); - bill->setPosition(core::vector3df(30,-30,50)); - bill->getMaterial(0).TextureLayer[0].AnisotropicFilter=true; - bill->getMaterial(0).setTexture(0, tex); - bill->getMaterial(0).Lighting=false; - bill->getMaterial(0).Wireframe=true; - bill = smgr->addBillboardSceneNode(); - bill->setPosition(core::vector3df(30,-30,50)); - bill->setSize(2,2,2); - - bill = smgr->addBillboardSceneNode(); - bill->getMaterial(0).Lighting=false; - bill->getMaterial(0).setTexture(0, tex); - bill->setSize(10,20,14); - bill->setPosition(core::vector3df(0,-15,50)); - bill = smgr->addBillboardSceneNode(); - bill->setSize(10,14,20); - bill->setPosition(core::vector3df(-30,-15,50)); - bill->getMaterial(0).setTexture(0, tex); - bill->getMaterial(0).Lighting=false; - bill = smgr->addBillboardSceneNode(); - bill->setSize(10,14,20); - bill->setPosition(core::vector3df(30,-15,50)); - bill->getMaterial(0).setTexture(0, tex); - bill->getMaterial(0).Lighting=false; - bill->getMaterial(0).Wireframe=true; - bill = smgr->addBillboardSceneNode(); - bill->setPosition(core::vector3df(30,-15,50)); - bill->setSize(2,2,2); - - bool result = false; - - device->run(); - driver->beginScene(true, true, video::SColor(255, 60, 60, 60)); - smgr->drawAll(); - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-billboard.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// Test billboard orientation -// Should generate a properly readable (i.e. not mirrored or flipped) -// font file display. -bool billboardOrientation(void) -{ - // Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions. - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, core::dimension2d(160, 120), 32); - assert_log(device); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - smgr->addCameraSceneNode(); - scene::IBillboardSceneNode* bill = smgr->addBillboardSceneNode(0, core::dimension2df(40,40)); - bill->setPosition(core::vector3df(0,-15,10)); - bill->getMaterial(0).Lighting=false; - bill->getMaterial(0).setTexture(0, driver->getTexture("../media/fontcourier.bmp")); - - bool result = false; - - device->run(); - driver->beginScene(true, true, video::SColor(255, 60, 60, 60)); - smgr->drawAll(); - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-billboardOrientation.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -} // end anonymous namespace - -// Test billboards -bool billboards(void) -{ - bool result = billboardSize(); - result &= billboardOrientation(); - return result; -} diff --git a/lib/irrlicht/tests/burningsVideo.cpp b/lib/irrlicht/tests/burningsVideo.cpp deleted file mode 100644 index 6271a640a..000000000 --- a/lib/irrlicht/tests/burningsVideo.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace scene; -using namespace video; - -/** Tests the Burning Video driver */ -bool burningsVideo(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, - core::dimension2du(160,120), 32); - if (!device) - return false; - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager* smgr = device->getSceneManager(); - - smgr->addCubeSceneNode(10.f, 0, -1, core::vector3df(0.f, 0.f, 20.f)); - smgr->addCameraSceneNode(); - // Test that ambient lighting works when there are no other lights in the scene - smgr->setAmbientLight(video::SColorf(.7f, .1f, .1f, 1.f)); - - bool result = false; - device->run(); - if (driver->beginScene(true, true, video::SColor(0, 80, 80, 80))) - { - smgr->drawAll(); - driver->endScene(); - result = takeScreenshotAndCompareAgainstReference(driver, "-ambient-lighting.png", 100); - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/collisionResponseAnimator.cpp b/lib/irrlicht/tests/collisionResponseAnimator.cpp deleted file mode 100644 index e852a1b00..000000000 --- a/lib/irrlicht/tests/collisionResponseAnimator.cpp +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; - -static bool expectedCollisionCallbackPositions = true; - -class CMyCollisionCallback : public ICollisionCallback -{ -public: - bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) - { - const vector3df & collisionPoint = animator.getCollisionPoint(); - - logTestString("Collision callback at %f %f %f\n", - collisionPoint.X, collisionPoint.Y, collisionPoint.Z); - - if(collisionPoint != ExpectedCollisionPoint) - { - logTestString("*** Error: collision point, expected %f %f %f\n", - ExpectedCollisionPoint.X, ExpectedCollisionPoint.Y, ExpectedCollisionPoint.Z); - expectedCollisionCallbackPositions = false; - assert_log(false); - } - - const vector3df & nodePosition = animator.getCollisionResultPosition(); - if(nodePosition != ExpectedNodePosition) - { - logTestString("*** Error: result position, expected %f %f %f\n", - ExpectedNodePosition.X, ExpectedNodePosition.Y, ExpectedNodePosition.Z); - expectedCollisionCallbackPositions = false; - assert_log(false); - } - - if(animator.getTargetNode() != ExpectedTarget) - { - logTestString("*** Error: wrong node\n"); - expectedCollisionCallbackPositions = false; - assert_log(false); - } - - return ConsumeNextCollision; - } - - void setNextExpectedCollision(ISceneNode* target, - const vector3df& expectedPoint, - const vector3df& expectedPosition, - bool consume) - { - ExpectedTarget = target; - ExpectedCollisionPoint = expectedPoint; - ExpectedNodePosition = expectedPosition; - ConsumeNextCollision = consume; - } - -private: - - ISceneNode * ExpectedTarget; - vector3df ExpectedCollisionPoint; - vector3df ExpectedNodePosition; - bool ConsumeNextCollision; - -}; - -/** Test that collision response animator will reset itself when removed from a - scene node, so that the scene node can then be moved without the animator - jumping it back again. */ -bool collisionResponseAnimator(void) -{ - IrrlichtDevice * device = irr::createDevice(video::EDT_NULL); - assert_log(device); - if(!device) - return false; - - ISceneManager * smgr = device->getSceneManager(); - - // Create 2 nodes to the left of a "wall" - ISceneNode * testNode1 = smgr->addEmptySceneNode(); - ISceneNode * testNode2 = smgr->addEmptySceneNode(); - testNode1->setPosition(vector3df(-50, 0,0)); - testNode2->setPosition(vector3df(-50, 0,0)); - - // Create a "wall" node, and collision response animators for each test node. - IMeshSceneNode * wallNode = smgr->addCubeSceneNode(10.f); - - ITriangleSelector * wallSelector = smgr->createTriangleSelectorFromBoundingBox(wallNode); - ISceneNodeAnimatorCollisionResponse * collisionAnimator1 = - smgr->createCollisionResponseAnimator(wallSelector, - testNode1, - vector3df(10,10,10), - vector3df(0, 0, 0)); - testNode1->addAnimator(collisionAnimator1); - - CMyCollisionCallback collisionCallback; - collisionAnimator1->setCollisionCallback(&collisionCallback); - - collisionAnimator1->drop(); - collisionAnimator1 = 0; - - ISceneNodeAnimatorCollisionResponse * collisionAnimator2 = - smgr->createCollisionResponseAnimator(wallSelector, - testNode2, - vector3df(10,10,10), - vector3df(0, 0, 0)); - testNode2->addAnimator(collisionAnimator2); - collisionAnimator2->setCollisionCallback(&collisionCallback); - - wallSelector->drop(); - // Don't drop() collisionAnimator2 since we're going to use it. - - // Get the system in a good state - device->run(); - smgr->drawAll(); - - // Try to move both nodes to the right of the wall. - // This one should be stopped by its animator. - testNode1->setPosition(vector3df(50, 0,0)); - collisionCallback.setNextExpectedCollision(testNode1, - vector3df(-5.005f, 0, 0), - vector3df(-15.005f, 0, 0), - false); - - // Whereas this one, by forcing the animator to update its target node, should be - // able to pass through the wall. (In <=1.6 it was stopped by the wall even if - // the animator was removed and later re-added); - testNode2->setPosition(vector3df(50, 0,0)); - collisionAnimator2->setTargetNode(testNode2); - collisionAnimator2->drop(); // We're done using this now. - - device->run(); - smgr->drawAll(); - - bool result = true; - - if(testNode1->getAbsolutePosition().X > -15.f) - { - logTestString("collisionResponseAnimator test node 1 wasn't stopped from moving.\n"); - assert_log(false); - result = false; - } - - if(testNode2->getAbsolutePosition().X < 50.f) - { - logTestString("collisionResponseAnimator test node 2 was stopped from moving.\n"); - assert_log(false); - result = false; - } - - // Now try to move the second node back through the wall again. Now it should be - // stopped by the wall. - testNode2->setPosition(vector3df(-50, 0, 0)); - - // We'll consume this collision, so the node will actually move all the way through. - collisionCallback.setNextExpectedCollision(testNode2, - vector3df(5.005f, 0, 0), - vector3df(15.005f, 0, 0), - true); - - device->run(); - smgr->drawAll(); - - if(testNode2->getAbsolutePosition().X != -50.f) - { - logTestString("collisionResponseAnimator test node 2 was stopped from moving.\n"); - assert_log(false); - result = false; - } - - // Now we'll try to move it back to the right and allow it to be stopped. - collisionCallback.setNextExpectedCollision(testNode2, - vector3df(-5.005f, 0, 0), - vector3df(-15.005f, 0, 0), - false); - testNode2->setPosition(vector3df(50, 0, 0)); - - device->run(); - smgr->drawAll(); - - if(testNode2->getAbsolutePosition().X > -15.f) - { - logTestString("collisionResponseAnimator test node 2 moved too far.\n"); - assert_log(false); - result = false; - } - - device->closeDevice(); - device->run(); - device->drop(); - - result &= expectedCollisionCallbackPositions; - return result; -} - diff --git a/lib/irrlicht/tests/color.cpp b/lib/irrlicht/tests/color.cpp deleted file mode 100644 index c31e4273e..000000000 --- a/lib/irrlicht/tests/color.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "testUtils.h" - -using namespace irr; -using namespace video; - -bool rounding() -{ - SColorf colf(0.003922f, 0.007843f, 0.011765f); // test-values by virion which once failed - SColor col = colf.toSColor(); - return col.getRed() == 1 && col.getGreen() == 2 && col.getBlue() == 3; -} - -//! Test SColor and SColorf -bool color(void) -{ - bool ok = true; - - ok &= rounding(); - - return ok; -} diff --git a/lib/irrlicht/tests/createImage.cpp b/lib/irrlicht/tests/createImage.cpp deleted file mode 100644 index 36885c89c..000000000 --- a/lib/irrlicht/tests/createImage.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "testUtils.h" - -using namespace irr; - -namespace -{ -bool testImageCreation() -{ - // create device - - IrrlichtDevice *device = createDevice(video::EDT_SOFTWARE, core::dimension2d(160,120)); - - if (device == 0) - return true; // could not create selected driver. - - video::IVideoDriver* driver = device->getVideoDriver(); - video::ITexture* tex=driver->getTexture("../media/water.jpg"); - video::IImage* img1=driver->createImage(tex, core::vector2di(0,0), core::dimension2du(32,32)); - video::ITexture* tex1=driver->addTexture("new1", img1); - img1->drop(); - img1=0; - video::IImage* img2=driver->createImage(tex, core::vector2di(0,0), tex->getSize()); - video::ITexture* tex2=driver->addTexture("new2", img2); - img2->drop(); - img2 = 0; - - driver->beginScene(true, true, video::SColor(255,255,0,255));//Backbuffer background is pink - - driver->draw2DImage(tex, core::position2d(0,0), core::recti(0,0,32,32)); - driver->draw2DImage(tex1, core::position2d(32,0)); - driver->draw2DImage(tex2, core::position2d(64,0), core::recti(0,0,32,32)); - - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-createImage.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool testImageFormats() -{ - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, core::dimension2d(256,128)); - - if (device == 0) - return true; // could not create selected driver. - - video::IVideoDriver* driver = device->getVideoDriver(); - video::ITexture* tex=driver->getTexture("../media/water.jpg"); - video::ITexture* tex1=driver->getTexture("media/grey.tga"); - driver->beginScene(true, true); - - driver->draw2DImage(tex, core::position2d(0,0), core::recti(0,0,64,64)); - driver->draw2DImage(tex1, core::position2d(0,64), core::recti(0,0,64,64)); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-testImageFormats.png", 99.5f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} -} - -bool createImage() -{ - bool result = testImageCreation(); - result &= testImageFormats(); - return result; -} diff --git a/lib/irrlicht/tests/cursorSetVisible.cpp b/lib/irrlicht/tests/cursorSetVisible.cpp deleted file mode 100644 index bf08cdf51..000000000 --- a/lib/irrlicht/tests/cursorSetVisible.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -struct TrapMouseMoves : IEventReceiver -{ - int MouseMovesReceived; - - TrapMouseMoves() : MouseMovesReceived(0) { } - - virtual bool OnEvent(const SEvent & event) - { - if(event.EventType == EET_MOUSE_INPUT_EVENT - && event.MouseInput.Event == EMIE_MOUSE_MOVED) - MouseMovesReceived++; - - return false; - } -}; - -/** This test verifies that setting the cursor visibility - only generates a mouse message when it actually changes */ -bool cursorSetVisible(void) -{ - IrrlichtDevice * device = createDevice(video::EDT_SOFTWARE, dimension2d(1, 1)); - TrapMouseMoves moveTrapper; - device->setEventReceiver(&moveTrapper); - - device->run(); - - gui::ICursorControl * cursor = device->getCursorControl(); - - // Move the cursor inside the Irrlicht window so that we get messages for it. - cursor->setPosition(0, 0); - device->run(); // Receive any messages - - cursor->setVisible(false); // Should generate a mouse move - device->run(); // Receive any messages - - cursor->setVisible(false); // Should not generate a mouse move - device->run(); // Receive any messages - - cursor->setVisible(true); // Should generate a mouse move - device->run(); // Receive any messages - - cursor->setVisible(true); // Should not generate a mouse move - device->run(); // Receive any messages - - - // We should get at most 3 messages: one for the setPosition(), and one for - // each actual change of visibility. - bool result = (moveTrapper.MouseMovesReceived <= 3); - - device->closeDevice(); - device->run(); - device->drop(); - - if(!result) - { - logTestString("ERROR: cursorSetVisible received %d events.\n", moveTrapper.MouseMovesReceived); - assert_log(false); - } - - return result; -} - diff --git a/lib/irrlicht/tests/disambiguateTextures.cpp b/lib/irrlicht/tests/disambiguateTextures.cpp deleted file mode 100644 index e53275f17..000000000 --- a/lib/irrlicht/tests/disambiguateTextures.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -/** This tests verifies that textures opened from different places in the filesystem - can be distinguished, even if they have the same filename. */ -bool disambiguateTextures(void) -{ - IrrlichtDevice *device = - createDevice( video::EDT_NULL, dimension2d(640, 480)); - - if (!device) - { - logTestString("Unable to create EDT_NULL device\n"); - return false; - } - - // Expects an empty tmp/tmp directory under this app's wd and - // a media directory under this apps' directory with tools.png in it. - stringc wd = device->getFileSystem()->getWorkingDirectory(); - - if(-1 == wd.find("/tests") && -1 == wd.find("\\tests")) - { - logTestString("The tests must be run from the /tests directory, regardless of where\n"\ - "the test executable was built.\n"); - device->drop(); - return false; - } - - IVideoDriver * driver = device->getVideoDriver(); - - ITexture * tex1 = driver->getTexture("../media/tools.png"); - assert_log(tex1); - if(!tex1) - logTestString("Unable to open ../media/tools.png\n"); - - ITexture * tex2 = driver->getTexture("../media/tools.png"); - assert_log(tex2); - if(!tex2) - logTestString("Unable to open ../media/tools.png\n"); - - IReadFile * readFile = device->getFileSystem()->createAndOpenFile("../media/tools.png"); - assert_log(readFile); - if(!readFile) - logTestString("Unable to open ../media/tools.png\n"); - - ITexture * tex3 = driver->getTexture(readFile); - assert_log(tex3); - if(!readFile) - logTestString("Unable to create texture from ../media/tools.png\n"); - - readFile->drop(); - - // All 3 of the above textures should be identical. - assert_log(tex1 == tex2); - assert_log(tex1 == tex3); - - stringc newWd = wd + "/empty/empty"; - bool changed = device->getFileSystem()->changeWorkingDirectoryTo(newWd.c_str()); - assert_log(changed); - ITexture * tex4 = driver->getTexture("../../media/tools.png"); - assert_log(tex4); - if(!tex4) - logTestString("Unable to open ../../media/tools.png\n"); - assert_log(tex1 != tex4); - - // The working directory must be restored for the other tests to work. - changed &= device->getFileSystem()->changeWorkingDirectoryTo(wd.c_str()); - - device->closeDevice(); - device->run(); - device->drop(); - - return (changed && tex1 == tex2 && tex1 == tex3 && tex1 != tex4) ? true : false; -} - diff --git a/lib/irrlicht/tests/draw2DImage.cpp b/lib/irrlicht/tests/draw2DImage.cpp deleted file mode 100644 index a60374598..000000000 --- a/lib/irrlicht/tests/draw2DImage.cpp +++ /dev/null @@ -1,185 +0,0 @@ -#include "testUtils.h" - -using namespace irr; - -namespace -{ - -bool testWithRenderTarget(video::E_DRIVER_TYPE driverType) -{ - // create device - - IrrlichtDevice *device = createDevice(driverType, core::dimension2d(160,120)); - - if (device == 0) - return true; // could not create selected driver. - - video::IVideoDriver* driver = device->getVideoDriver(); - - if (!driver->queryFeature(video::EVDF_RENDER_TO_TARGET)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - video::ITexture* RenderTarget=driver->addRenderTargetTexture(core::dimension2d(64,64), "BASEMAP"); - - video::ITexture *tex=driver->getTexture("../media/water.jpg"); - - driver->beginScene(true, true, video::SColor(255,255,0,255));//Backbuffer background is pink - - //draw the 256x256 water image on the rendertarget: - driver->setRenderTarget(RenderTarget,true,true,video::SColor(255,0,0,255));//Rendertarget background is blue - driver->draw2DImage(tex, core::position2d(0,0), core::recti(0,0,32,32)); - driver->setRenderTarget(0, false); - - //draw the rendertarget on screen: - //this should normally draw a 64x64 image containing a 32x32 image in the top left corner - driver->draw2DImage(RenderTarget, core::position2d(0,0)); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-draw2DImageRTT.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// Test various special destination rectangles -bool testRectangles(video::E_DRIVER_TYPE driverType) -{ - // create device - IrrlichtDevice *device = createDevice(driverType, core::dimension2d(160,120)); - - if (device == 0) - return true; // could not create selected driver. - - video::IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - video::ITexture *tex=driver->getTexture("../media/fireball.bmp"); - - driver->beginScene(true, true, video::SColor(255,255,0,255));//Backbuffer background is pink - - // draw normal, will be overdrwan in error case - driver->draw2DImage(tex, core::recti(68,32,132,96), core::recti(0,0,64,64)); - //draw the image larger - driver->draw2DImage(tex, core::recti(0,0,64,64), core::recti(0,0,32,32)); - //draw the image flipped horizontally - driver->draw2DImage(tex, core::recti(132,0,68,64), core::recti(0,0,64,64)); - //draw the image smaller - driver->draw2DImage(tex, core::recti(0,64,32,96), core::recti(0,0,64,64)); - //draw the image much smaller - driver->draw2DImage(tex, core::recti(36,64,44,72), core::recti(0,0,64,64)); - //draw the image flipped horizontally - driver->draw2DImage(tex, core::recti(68,64,132,0), core::recti(0,0,64,64)); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-draw2DImageRect.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// draws a complex (interlaced, paletted, alpha) png image -bool testWithPNG(video::E_DRIVER_TYPE driverType) -{ - // create device - - IrrlichtDevice *device = createDevice(driverType, core::dimension2d(160,120)); - - if (device == 0) - return true; // could not create selected driver. - - video::IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - video::ITexture *tex=driver->getTexture("media/RedbrushAlpha-0.25.png"); - - driver->beginScene(true, true, video::SColor(255,40,40,255));//Backbuffer background is blue - driver->draw2DImage(tex, core::recti(0,0,160,120), core::recti(0,0,256,256), 0, 0, true); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-draw2DImagePNG.png", 98.f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// draws an image and checks if the written example equals the original image -bool testExactPlacement(video::E_DRIVER_TYPE driverType) -{ - // create device - - IrrlichtDevice *device = createDevice(driverType, core::dimension2d(160,120), 32); - - if (device == 0) - return true; // could not create selected driver. - - video::IVideoDriver* driver = device->getVideoDriver(); - - if (driver->getColorFormat() != video::ECF_A8R8G8B8 || !driver->queryFeature(video::EVDF_RENDER_TO_TARGET)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - video::ITexture* rt=driver->addRenderTargetTexture(core::dimension2d(32,32), "rt1"); - video::ITexture *tex=driver->getTexture("../media/fireball.bmp"); - - driver->beginScene(true, true, video::SColor(255,40,40,255));//Backbuffer background is blue - driver->setRenderTarget(rt); - driver->draw2DImage(tex, core::recti(0,0,32,32), core::recti(0,0,64,64)); - driver->setRenderTarget(0); - driver->endScene(); - - video::IImage* img = driver->createImage(rt, core::vector2di(), rt->getSize()); - driver->writeImageToFile(img, "results/fireball.png"); - img->drop(); - bool result = fuzzyCompareImages(driver, "media/fireball.png", "results/fireball.png")>98.25f; - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -} - -bool draw2DImage() -{ - bool result = true; - TestWithAllDrivers(testWithRenderTarget); - TestWithAllHWDrivers(testWithPNG); - // TODO D3D driver moves image 1 pixel top-left in case of down scaling - TestWithAllDrivers(testExactPlacement); - TestWithAllDrivers(testRectangles); - return result; -} diff --git a/lib/irrlicht/tests/drawPixel.cpp b/lib/irrlicht/tests/drawPixel.cpp deleted file mode 100644 index 6ae19b873..000000000 --- a/lib/irrlicht/tests/drawPixel.cpp +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -//! Tests IVideoDriver::drawPixel(). -/** Expect to see two diagonal lines overlaying a wall texture cube. - One line should run from green at the top left to red at the bottom right. - The other should run from cyan 100% transparent at the bottom left to - cyan 100% opaque at the top right. */ -static bool lineRender(E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - // Draw a cube background so that we can check that the pixels' alpha is working. - ISceneNode * cube = smgr->addCubeSceneNode(50.f, 0, -1, vector3df(0, 0, 60)); - cube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - cube->setMaterialFlag(video::EMF_LIGHTING, false); - (void)smgr->addCameraSceneNode(); - - driver->beginScene(true, true, SColor(255,100,101,140)); - smgr->drawAll(); - - // Test for benign handling of offscreen pixel values as well as onscreen ones. - for(s32 x = -10; x < 170; ++x) - { - s32 y = 120 * x / 160; - driver->drawPixel((u32)x, (u32)y, SColor(255, 255 * x / 640, 255 * (640 - x) / 640, 0)); - y = 120 - y; - driver->drawPixel((u32)x, (u32)y, SColor(255 * x / 640, 0, 255, 255)); - } - - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawPixel.png", 98.81f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// this test draws alternating white and black borders with -// increasing thickness. Intended use of this test is to ensure -// the corect pixel alignment within the render window. -static bool pixelAccuracy(E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - device->getSceneManager()->addCameraSceneNode(); - - driver->beginScene(true, true, SColor(255,100,101,140)); - u32 start=0; - for (u32 count=1; count<10; ++count) - { - for (u32 j=0; jdrawPixel(start+x, start, (count%2==1)?0xffffffff:0xff000000); - } - ++start; - } - } - start=0; - for (u32 count=1; count<10; ++count) - { - for (u32 j=0; jdrawPixel(start, start+x, (count%2==1)?0xffffffff:0xff000000); - } - ++start; - } - } - for (u32 x=0; x<100; ++x) - { - driver->drawPixel(x, x, 0xffff0000); - } - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-pixelAccuracy.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// this test draws lines of different lengths and compares -// them with pixel placement -// grey pixels denote start and end of the white drawn lines -// black pixels only make those grey points better visible -// yellow and magenta lines should start and end next toa black pixel, -// yellow one right to the last black pixel down, magenta below the last -// black pixel to the right -// white lines are always double drawn, lines back and forth. -static bool drawLine(E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - device->getSceneManager()->addCameraSceneNode(); - - driver->beginScene(true, true, SColor(255,100,101,140)); - // horizontal lines - for (u32 i=0; i<20; ++i) - { - driver->draw2DLine(core::vector2di(10,10+3*i), core::vector2di(10+2*i,10+3*i)); - // mark start point - driver->drawPixel(9,10+3*i+1, video::SColor(0xff000000)); - driver->drawPixel(10,10+3*i+1, video::SColor(0xff888888)); - driver->drawPixel(11,10+3*i+1, video::SColor(0xff000000)); - // mark end point - driver->drawPixel(9+2*i,10+3*i+1, video::SColor(0xff000000)); - driver->drawPixel(10+2*i,10+3*i+1, video::SColor(0xff888888)); - driver->drawPixel(11+2*i,10+3*i+1, video::SColor(0xff000000)); - driver->draw2DLine(core::vector2di(10+2*i,10+3*i+2), core::vector2di(10,10+3*i+2)); - } - // vertical lines - for (u32 i=0; i<20; ++i) - { - driver->draw2DLine(core::vector2di(11+3*i,10), core::vector2di(11+3*i,10+2*i)); - // mark start point - driver->drawPixel(11+3*i+1,9, video::SColor(0xff000000)); - driver->drawPixel(11+3*i+1,10, video::SColor(0xff888888)); - driver->drawPixel(11+3*i+1,11, video::SColor(0xff000000)); - // mark end point - driver->drawPixel(11+3*i+1,9+2*i, video::SColor(0xff000000)); - driver->drawPixel(11+3*i+1,10+2*i, video::SColor(0xff888888)); - driver->drawPixel(11+3*i+1,11+2*i, video::SColor(0xff000000)); - driver->draw2DLine(core::vector2di(11+3*i+2,10+2*i), core::vector2di(11+3*i+2, 10)); - } - // diagonal lines - driver->draw2DLine(core::vector2di(14,14),core::vector2di(50,68), video::SColor(0xffffff00)); - driver->draw2DLine(core::vector2di(15,14),core::vector2di(69,50), video::SColor(0xffff00ff)); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawLine.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool drawPixel(void) -{ - bool result = true; - - TestWithAllDrivers(lineRender); - TestWithAllDrivers(pixelAccuracy); - TestWithAllDrivers(drawLine); - - return result; -} diff --git a/lib/irrlicht/tests/drawRectOutline.cpp b/lib/irrlicht/tests/drawRectOutline.cpp deleted file mode 100644 index 096fb7e14..000000000 --- a/lib/irrlicht/tests/drawRectOutline.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "testUtils.h" - -using namespace irr; - -namespace -{ - -bool testWithDriver(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = - createDevice(driverType, core::dimension2du(160, 120)); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - - core::recti r; - r.UpperLeftCorner = core::position2di(1,1); - r.LowerRightCorner = core::position2di(100,100); - driver->draw2DRectangleOutline( r ); - - r += core::position2di( 10 , 10 ); - driver->draw2DRectangleOutline( r , video::SColor(128, 255, 128, 128) ); - - driver->getMaterial2D().Thickness=12.f; - driver->enableMaterial2D(); - r += core::position2di( 10 , 10 ); - driver->draw2DRectangleOutline( r , video::SColor(128, 255, 128, 128) ); - - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-drawRectOutline.png", 98.5f ); - - device->closeDevice(); - device->run(); - device->drop(); - - return result ; -} -} - -bool drawRectOutline(void) -{ - // TODO: Only OpenGL supports thick lines - bool result = true; - TestWithAllDrivers(testWithDriver); - return result; -} diff --git a/lib/irrlicht/tests/drawVertexPrimitive.cpp b/lib/irrlicht/tests/drawVertexPrimitive.cpp deleted file mode 100644 index 70f6c6ffe..000000000 --- a/lib/irrlicht/tests/drawVertexPrimitive.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "testUtils.h" - -using namespace irr; - -namespace -{ - -// this test renders random point clouds using different primitives on top -// tests the primitives type support in general and can hint to differences -// between the drivers -bool testWithDriver(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = - createDevice(driverType, core::dimension2du(160, 120)); - if (!device) - return true; - - scene::ISceneManager* smgr = device->getSceneManager(); - video::IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - smgr->addCameraSceneNode(0, core::vector3df(128,128,-100), core::vector3df(128,128,128)); - - scene::SMeshBuffer Buffer; - - Buffer.Material.Wireframe = false; - Buffer.Material.Lighting = false; - Buffer.Material.FogEnable = false; - Buffer.Material.BackfaceCulling = false; - Buffer.Material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; - - device->getRandomizer()->reset(); - const u32 points=256; - Buffer.Vertices.reallocate(points); - for (u32 i=0; igetRandomizer()->rand()%points); - f32 y = (f32)(1+device->getRandomizer()->rand()%points); - f32 z = (f32)(1+device->getRandomizer()->rand()%points); - video::SColor color(255, device->getRandomizer()->rand()%255, device->getRandomizer()->rand()%255, device->getRandomizer()->rand()%255); - Buffer.Vertices.push_back( video::S3DVertex(x,y,z,0,1,0,color,0,0) ); - } - Buffer.recalculateBoundingBox(); - for (u32 i=0; ibeginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - u32 primCount = 0; - switch (Type) - { - case scene::EPT_POINTS: primCount = Buffer.Indices.size(); break; - case scene::EPT_LINE_STRIP: primCount = Buffer.Indices.size()-1; break; - case scene::EPT_LINE_LOOP: primCount = Buffer.Indices.size()-1; break; - case scene::EPT_LINES: primCount = Buffer.Indices.size()/2; break; - case scene::EPT_TRIANGLE_STRIP: primCount = Buffer.Indices.size()-2; break; - case scene::EPT_TRIANGLE_FAN: primCount = Buffer.Indices.size()-2; break; - case scene::EPT_TRIANGLES: primCount = Buffer.Indices.size()/3; break; - case scene::EPT_QUAD_STRIP: primCount = (Buffer.Indices.size()-2)/4; break; - case scene::EPT_QUADS: primCount = Buffer.Indices.size()/4; break; - case scene::EPT_POLYGON: primCount = Buffer.Indices.size()-1; break; - case scene::EPT_POINT_SPRITES: primCount = Buffer.Indices.size(); break; - default: break; - } - - // TODO: mode is buggy, but required for skybox. So driver supports it, but would core dump here. - if (driverType==video::EDT_BURNINGSVIDEO && Type==scene::EPT_TRIANGLE_FAN) - continue; - driver->setMaterial(Buffer.Material); - driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); - driver->drawVertexPrimitiveList(Buffer.getVertices(), - Buffer.getVertexCount(), Buffer.getIndices(), primCount, - video::EVT_STANDARD, (scene::E_PRIMITIVE_TYPE)Type, - video::EIT_16BIT); - driver->endScene(); - core::stringc name = "-drawVPL_"; - // we use character enumeration as we have more than 9 types - name.append(Type-scene::EPT_POINTS+'a'); - name.append(".png"); - result &= takeScreenshotAndCompareAgainstReference(driver, name.c_str()); - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result ; -} -} - -bool drawVertexPrimitive(void) -{ - bool result = true; - TestWithAllDrivers(testWithDriver); - return result; -} diff --git a/lib/irrlicht/tests/empty/empty/Direct3D 9.0.png b/lib/irrlicht/tests/empty/empty/Direct3D 9.0.png deleted file mode 100644 index 66f160a84..000000000 Binary files a/lib/irrlicht/tests/empty/empty/Direct3D 9.0.png and /dev/null differ diff --git a/lib/irrlicht/tests/empty/empty/Irrlicht Software Device 1.0.png b/lib/irrlicht/tests/empty/empty/Irrlicht Software Device 1.0.png deleted file mode 100644 index b5389f1dc..000000000 Binary files a/lib/irrlicht/tests/empty/empty/Irrlicht Software Device 1.0.png and /dev/null differ diff --git a/lib/irrlicht/tests/empty/empty/OpenGL 2.1.2.png b/lib/irrlicht/tests/empty/empty/OpenGL 2.1.2.png deleted file mode 100644 index a88e0476a..000000000 Binary files a/lib/irrlicht/tests/empty/empty/OpenGL 2.1.2.png and /dev/null differ diff --git a/lib/irrlicht/tests/empty/empty/burnings video 0.39b.png b/lib/irrlicht/tests/empty/empty/burnings video 0.39b.png deleted file mode 100644 index de3456761..000000000 Binary files a/lib/irrlicht/tests/empty/empty/burnings video 0.39b.png and /dev/null differ diff --git a/lib/irrlicht/tests/enumerateImageManipulators.cpp b/lib/irrlicht/tests/enumerateImageManipulators.cpp deleted file mode 100644 index 556ba4cd7..000000000 --- a/lib/irrlicht/tests/enumerateImageManipulators.cpp +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace scene; -using namespace video; - -bool enumerateImageManipulators(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_NULL); - if (!device) - return false; - - IVideoDriver* driver = device->getVideoDriver(); - - const char* filenames[] = - { - "foo.bmp", - "foo.jpg", - "foo.pcx", - "foo.png", - "foo.ppm", - "foo.psd", - "foo.tga", - // the following have no writers - "foo.wal", - "foo.pgm", - "foo.pbm", - "foo.rgb", - "foo.rgba", - "foo.sgi", - "foo.int", - "foo.inta", - "foo.bw" - }; - // how many formats have loaders? - const u32 writersUntil = 7; - - const u32 numberOfFilenames = sizeof(filenames) / sizeof(filenames[0]); - bool loaderForFilename[numberOfFilenames] = { false }; // and the rest get 0 == false - bool writerForFilename[numberOfFilenames] = { false }; // and the rest get 0 == false - - bool result = true; - - u32 i; - const u32 loaders = driver->getImageLoaderCount(); - for (i = 0; i < loaders; ++i) - { - IImageLoader * loader = driver->getImageLoader(i); - - if(!loader) - { - logTestString("Failed to get image loader %d\n", i); - assert_log(false); - result = false; - } - - for(u32 filename = 0; filename < numberOfFilenames; ++filename) - { - if(loader->isALoadableFileExtension(filenames[filename])) - { - loaderForFilename[filename] = true; - } - } - } - - IImageLoader * loader = driver->getImageLoader(i); - assert_log(loader == 0); - if(loader) - { - logTestString("Got a loader when none was expected (%d)\n", i); - result = false; - } - - for(u32 filename = 0; filename < numberOfFilenames; ++filename) - { - if(!loaderForFilename[filename]) - { - logTestString("File type '%s' doesn't have a loader\n", filenames[filename]); - assert_log(false); - result = false; - } - } - - const u32 writers = driver->getImageWriterCount(); - for (i = 0; i < writers; ++i) - { - IImageWriter * writer = driver->getImageWriter(i); - - if(!writer) - { - logTestString("Failed to get image writer %d\n", i); - assert_log(false); - result = false; - } - - for(u32 filename = 0; filename < numberOfFilenames; ++filename) - { - if(writer->isAWriteableFileExtension(filenames[filename])) - { - writerForFilename[filename] = true; - break; - } - } - } - - IImageWriter * writer = driver->getImageWriter(i); - assert_log(writer == 0); - if(writer) - { - logTestString("Got a writer when none was expected (%d)\n", i); - result = false; - } - - for(u32 filename = 0; filename < numberOfFilenames; ++filename) - { - // There's no writer for the .WAL file type. - if(!writerForFilename[filename] && (filenamecloseDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/exports.cpp b/lib/irrlicht/tests/exports.cpp deleted file mode 100644 index 7bbc2eee9..000000000 --- a/lib/irrlicht/tests/exports.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -//! Tests that symbols exported from Irrlicht can be used by the user app. -bool exports(void) -{ - logTestString("Checking whether IdentityMatrix is exported.\n"); - irr::core::matrix4 identity = irr::core::IdentityMatrix; - (void)identity; // Satisfy the compiler that it's used. - - irr::video::SMaterial id = irr::video::IdentityMaterial; - (void)id; // Satisfy the compiler that it's used. - // If it built, we're done. - return true; -} diff --git a/lib/irrlicht/tests/fast_atof.cpp b/lib/irrlicht/tests/fast_atof.cpp deleted file mode 100644 index bab463cc4..000000000 --- a/lib/irrlicht/tests/fast_atof.cpp +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -//! This was an older Irrlicht implementation, tested against for reference. -static inline u32 old_strtol10(const char* in, const char** out=0) -{ - u32 value = 0; - - while ( ( *in >= '0') && ( *in <= '9' )) - { - value = ( value * 10 ) + ( *in - '0' ); - ++in; - } - if (out) - *out = in; - return value; -} - -//! This was an older Irrlicht implementation, tested against for reference. -static inline const char* old_fast_atof_move( const char* c, float& out) -{ - bool inv = false; - const char *t; - float f; - - if (*c=='-') - { - ++c; - inv = true; - } - - //f = (float)strtol(c, &t, 10); - f = (float) old_strtol10 ( c, &c ); - - if (*c == '.') - { - ++c; - - //float pl = (float)strtol(c, &t, 10); - float pl = (float) old_strtol10 ( c, &t ); - pl *= fast_atof_table[t-c]; - - f += pl; - - c = t; - - if (*c == 'e') - { - ++c; - //float exp = (float)strtol(c, &t, 10); - bool einv = (*c=='-'); - if (einv) - ++c; - - float exp = (float)old_strtol10(c, &c); - if (einv) - exp *= -1.0f; - - f *= (float)pow(10.0f, exp); - } - } - - if (inv) - f *= -1.0f; - - out = f; - return c; -} - -//! This was an older Irrlicht implementation, tested against for reference. -static inline float old_fast_atof(const char* c) -{ - float ret; - old_fast_atof_move(c, ret); - return ret; -} - - -static bool testCalculation_atof(const char * valueString) -{ - const f32 newFastValue = fast_atof(valueString); - const f32 oldFastValue = old_fast_atof(valueString); - const f32 atofValue = (f32)atof(valueString); - - logTestString("\n String '%s'\n New fast %.40f\n Old fast %.40f\n atof %.40f\n", - valueString, newFastValue, oldFastValue, atofValue); - - const f32 diffNew = fabs(newFastValue - atofValue) ; - const f32 diffOld = fabs(newFastValue - atofValue) ; - bool accurate = diffNew <= diffOld || equalsByUlp(diffNew, diffOld, 1); - - if(!accurate) - logTestString("*** ERROR - less accurate than old method ***\n\n"); - - return accurate; -} - -static bool testCalculation_strtol(const char * valueString) -{ - const s32 newFastValue = strtol10(valueString); - const s32 oldFastValue = old_strtol10(valueString); - const s32 strtolValue = (s32)clamp(strtol(valueString, 0, 10), (long int)INT_MIN, (long int)INT_MAX); - - logTestString("\n String '%s'\n New fast %d\n Old fast %d\n strtol %d\n", - valueString, newFastValue, oldFastValue, strtolValue); - - bool accurate = (newFastValue == strtolValue) || (oldFastValue != strtolValue); - - if (!accurate) - logTestString("*** ERROR - wrong calculation in new method ***\n\n"); - - return accurate; -} - -//! Test both the accuracy and speed of Irrlicht's fast_atof() implementation. -bool test_fast_atof(void) -{ - bool accurate = true; - - accurate &= testCalculation_atof("340282346638528859811704183484516925440.000000"); - accurate &= testCalculation_atof("3.402823466e+38F"); - accurate &= testCalculation_atof("3402823466e+29F"); - accurate &= testCalculation_atof("-340282346638528859811704183484516925440.000000"); - accurate &= testCalculation_atof("-3.402823466e+38F"); - accurate &= testCalculation_atof("-3402823466e+29F"); - accurate &= testCalculation_atof("34028234663852885981170418348451692544.000000"); - accurate &= testCalculation_atof("3.402823466e+37F"); - accurate &= testCalculation_atof("3402823466e+28F"); - accurate &= testCalculation_atof("-34028234663852885981170418348451692544.000000"); - accurate &= testCalculation_atof("-3.402823466e+37F"); - accurate &= testCalculation_atof("-3402823466e+28F"); - accurate &= testCalculation_atof(".00234567"); - accurate &= testCalculation_atof("-.00234567"); - accurate &= testCalculation_atof("0.00234567"); - accurate &= testCalculation_atof("-0.00234567"); - accurate &= testCalculation_atof("1.175494351e-38F"); - accurate &= testCalculation_atof("1175494351e-47F"); - accurate &= testCalculation_atof("1.175494351e-37F"); - accurate &= testCalculation_atof("1.175494351e-36F"); - accurate &= testCalculation_atof("-1.175494351e-36F"); - accurate &= testCalculation_atof("123456.789"); - accurate &= testCalculation_atof("-123456.789"); - accurate &= testCalculation_atof("0000123456.789"); - accurate &= testCalculation_atof("-0000123456.789"); - accurate &= testCalculation_atof("-0.0690462109446526"); - - if (!accurate) - { - logTestString("Calculation is not accurate, so the speed is irrelevant\n"); - return false; - } - -#ifndef _DEBUG // it's only faster in release - IrrlichtDevice* device = createDevice(video::EDT_NULL); - if (!device) - return false; - ITimer* timer = device->getTimer(); - - const int ITERATIONS = 100000; - int i; - - f32 value; - u32 then = timer->getRealTime(); - for(i = 0; i < ITERATIONS; ++i) - value = (f32)atof("-340282346638528859811704183484516925440.000000"); - - const u32 atofTime = timer->getRealTime() - then; - - then += atofTime; - for(i = 0; i < ITERATIONS; ++i) - value = fast_atof("-340282346638528859811704183484516925440.000000"); - const u32 fastAtofTime = timer->getRealTime() - then; - - then += fastAtofTime; - for(i = 0; i < ITERATIONS; ++i) - value = old_fast_atof("-340282346638528859811704183484516925440.000000"); - const u32 oldFastAtofTime = timer->getRealTime() - then; - - logTestString("Speed test\n atof time = %d\n fast_atof Time = %d\nold fast_atof time = %d\n", - atofTime, fastAtofTime, oldFastAtofTime); - - device->closeDevice(); - device->run(); - device->drop(); - - if(fastAtofTime > (1.2f*atofTime)) - { - logTestString("The fast method is slower than atof()\n"); - return false; - } -#endif // #ifndef _DEBUG - - return true; -} - -//! Test both the accuracy and speed of Irrlicht's strtol10() implementation. -bool test_strtol(void) -{ - bool accurate = true; - - accurate &= testCalculation_strtol("340282346638528859811704183484516925440"); - accurate &= testCalculation_strtol("3402823466"); - accurate &= testCalculation_strtol("3402823466e+29F"); - accurate &= testCalculation_strtol("-340282346638528859811704183484516925440"); - accurate &= testCalculation_strtol("-3402823466"); - accurate &= testCalculation_strtol("-3402823466e+29F"); - accurate &= testCalculation_strtol("402823466385288598117"); - accurate &= testCalculation_strtol("402823466"); - accurate &= testCalculation_strtol("402823466e+28F"); - accurate &= testCalculation_strtol("402823466385288598117"); - accurate &= testCalculation_strtol("-402823466"); - accurate &= testCalculation_strtol("-402823466e+28F"); - accurate &= testCalculation_strtol(".00234567"); - accurate &= testCalculation_strtol("-234567"); - accurate &= testCalculation_strtol("234567"); - accurate &= testCalculation_strtol("-234567"); - accurate &= testCalculation_strtol("1175494351"); - accurate &= testCalculation_strtol("11754943512"); - accurate &= testCalculation_strtol("11754943513"); - accurate &= testCalculation_strtol("11754943514"); - accurate &= testCalculation_strtol("-1175494351"); - accurate &= testCalculation_strtol("123456789"); - accurate &= testCalculation_strtol("-123456789"); - accurate &= testCalculation_strtol("123456.789"); - accurate &= testCalculation_strtol("-123456.789"); - accurate &= testCalculation_strtol("-109446526"); - - if(!accurate) - { - logTestString("Calculation is not accurate, so the speed is irrelevant\n"); - return false; - } - -#ifndef _DEBUG // it's only faster in release - IrrlichtDevice* device = createDevice(video::EDT_NULL); - if (!device) - return false; - ITimer* timer = device->getTimer(); - - const int ITERATIONS = 1000000; - int i; - - s32 value; - u32 then = timer->getRealTime(); - for(i = 0; i < ITERATIONS; ++i) - value = strtol("-3402823466", 0, 10); - - const u32 strtolTime = timer->getRealTime() - then; - - then += strtolTime; - for(i = 0; i < ITERATIONS; ++i) - value = strtol10("-3402823466"); - const u32 strtol10Time = timer->getRealTime() - then; - - then += strtol10Time; - for(i = 0; i < ITERATIONS; ++i) - value = old_strtol10("-3402823466"); - const u32 oldstrtol10Time = timer->getRealTime() - then; - - logTestString("Speed test\n strtol time = %d\n strtol10 time = %d\nold strtol10 time = %d\n", - strtolTime, strtol10Time, oldstrtol10Time); - - device->closeDevice(); - device->run(); - device->drop(); - - if (strtol10Time > (1.2f*strtolTime)) - { - logTestString("The fast method is slower than strtol()\n"); - return false; - } -#endif // #ifndef _DEBUG - - return true; -} - -bool fast_atof(void) -{ - bool ok = true; - ok &= test_fast_atof() ; - ok &= test_strtol(); - return ok; -} diff --git a/lib/irrlicht/tests/filesystem.cpp b/lib/irrlicht/tests/filesystem.cpp deleted file mode 100644 index fed70d1cf..000000000 --- a/lib/irrlicht/tests/filesystem.cpp +++ /dev/null @@ -1,183 +0,0 @@ -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace io; - -static bool testgetAbsoluteFilename(io::IFileSystem* fs) -{ - bool result=true; - io::path apath = fs->getAbsolutePath("media"); - io::path cwd = fs->getWorkingDirectory(); - if (apath!=(cwd+"/media")) - { - logTestString("getAbsolutePath failed on existing dir %s\n", apath.c_str()); - result = false; - } - - apath = fs->getAbsolutePath("../media/"); - core::deletePathFromPath(cwd, 1); - if (apath!=(cwd+"media/")) - { - logTestString("getAbsolutePath failed on dir with postfix / %s\n", apath.c_str()); - result = false; - } - - apath = fs->getAbsolutePath ("../nothere.txt"); // file does not exist - if (apath!=(cwd+"nothere.txt")) - { - logTestString("getAbsolutePath failed on non-existing file %s\n", apath.c_str()); - result = false; - } - - return result; -} - -static bool testFlattenFilename(io::IFileSystem* fs) -{ - bool result=true; - io::path tmpString="../tmp"; - io::path refString="../tmp/"; - fs->flattenFilename(tmpString); - if (tmpString != refString) - { - logTestString("flattening destroys path.\n%s!=%s\n", tmpString.c_str(),refString.c_str()); - result = false; - } - - tmpString="tmp/tmp/../"; - refString="tmp/"; - fs->flattenFilename(tmpString); - if (tmpString != refString) - { - logTestString("flattening destroys path.\n%s!=%s\n", tmpString.c_str(),refString.c_str()); - result = false; - } - - tmpString="tmp/tmp/.."; - fs->flattenFilename(tmpString); - if (tmpString != refString) - { - logTestString("flattening destroys path.\n%s!=%s\n", tmpString.c_str(),refString.c_str()); - result = false; - } - - tmpString="tmp/next/../third"; - refString="tmp/third/"; - fs->flattenFilename(tmpString); - if (tmpString != refString) - { - logTestString("flattening destroys path.\n%s!=%s\n", tmpString.c_str(),refString.c_str()); - result = false; - } - - tmpString="this/tmp/next/../../my/fourth"; - refString="this/my/fourth/"; - fs->flattenFilename(tmpString); - if (tmpString != refString) - { - logTestString("flattening destroys path.\n%s!=%s\n", tmpString.c_str(),refString.c_str()); - result = false; - } - - tmpString="this/is/../../../a/fifth/test/"; - refString="../a/fifth/test/"; - fs->flattenFilename(tmpString); - if (tmpString != refString) - { - logTestString("flattening destroys path.\n%s!=%s\n", tmpString.c_str(),refString.c_str()); - result = false; - } - - tmpString="this/../is/../../a/sixth/test/"; - refString="../a/sixth/test/"; - fs->flattenFilename(tmpString); - if (tmpString != refString) - { - logTestString("flattening destroys path.\n%s!=%s\n", tmpString.c_str(),refString.c_str()); - result = false; - } - - return result; -} - -static bool testgetRelativeFilename(io::IFileSystem* fs) -{ - bool result=true; - io::path apath = fs->getAbsolutePath("media"); - io::path cwd = fs->getWorkingDirectory(); - if (fs->getRelativeFilename(apath, cwd) != "media") - { - logTestString("getRelativePath failed on %s\n", apath.c_str()); - result = false; - } - - apath = fs->getAbsolutePath("../media/"); - if (fs->getRelativeFilename(apath, cwd) != "../media/") - { - logTestString("getRelativePath failed on %s\n", apath.c_str()); - result = false; - } - - return result; -} - -bool filesystem(void) -{ - IrrlichtDevice * device = irr::createDevice(video::EDT_NULL, dimension2d(1, 1)); - assert_log(device); - if(!device) - return false; - - io::IFileSystem * fs = device->getFileSystem (); - if ( !fs ) - return false; - - bool result = true; - - io::path workingDir = device->getFileSystem()->getWorkingDirectory(); - - io::path empty; - if ( fs->existFile(empty) ) - { - logTestString("Empty filename should not exist.\n"); - result = false; - } - - io::path newWd = workingDir + "/media"; - bool changed = device->getFileSystem()->changeWorkingDirectoryTo(newWd); - assert_log(changed); - - if ( fs->existFile(empty) ) - { - logTestString("Empty filename should not exist even in another workingdirectory.\n"); - result = false; - } - - // The working directory must be restored for the other tests to work. - changed = device->getFileSystem()->changeWorkingDirectoryTo(workingDir.c_str()); - assert_log(changed); - - // adding a folder archive which just should not really change anything - device->getFileSystem()->addFileArchive( "./" ); - - if ( fs->existFile(empty) ) - { - logTestString("Empty filename should not exist in folder file archive.\n"); - result = false; - } - - // remove it again to not affect other tests - device->getFileSystem()->removeFileArchive( device->getFileSystem()->getFileArchiveCount() ); - - result &= testFlattenFilename(fs); - result &= testgetAbsoluteFilename(fs); - result &= testgetRelativeFilename(fs); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - diff --git a/lib/irrlicht/tests/flyCircleAnimator.cpp b/lib/irrlicht/tests/flyCircleAnimator.cpp deleted file mode 100644 index 89f25377b..000000000 --- a/lib/irrlicht/tests/flyCircleAnimator.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; - -/** Tests the offset capability of the fly circle animator */ -bool flyCircleAnimator(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, - core::dimension2du(160,120), 32); - if (!device) - return false; - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager* smgr = device->getSceneManager(); - - const f32 offsetDegrees[] = { 0.f, 45.f, 135.f, 270.f }; - - for(u32 i = 0; i < sizeof(offsetDegrees) / sizeof(offsetDegrees[0]); ++i) - { - IBillboardSceneNode * node = smgr->addBillboardSceneNode(); - // Have the animator rotate around the Z axis plane, rather than the default Y axis - ISceneNodeAnimator * animator = smgr->createFlyCircleAnimator( - vector3df(0, 0, 0), 30.f, 0.001f, - vector3df(0, 0, 1), (offsetDegrees[i] / 360.f)); - if(!node || !animator) - return false; - - node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR ); - node->setMaterialTexture(0, driver->getTexture("../media/particle.bmp")); - node->setMaterialFlag(video::EMF_LIGHTING, false); - - node->addAnimator(animator); - animator->drop(); - } - - (void)smgr->addCameraSceneNode(0, vector3df(0, 0, -50), vector3df(0, 0, 0)); - - bool result = false; - - // Don't do device->run() since I need the time to remain at 0. - if (driver->beginScene(true, true, video::SColor(0, 80, 80, 80))) - { - smgr->drawAll(); - driver->endScene(); - result = takeScreenshotAndCompareAgainstReference(driver, "-flyCircleAnimator.png", 100); - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - diff --git a/lib/irrlicht/tests/guiDisabledMenu.cpp b/lib/irrlicht/tests/guiDisabledMenu.cpp deleted file mode 100644 index 5c1ee1254..000000000 --- a/lib/irrlicht/tests/guiDisabledMenu.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace gui; - -// Tests that disabled GUI menu items don't cause their submenu to appear when hovered over. -/** - http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?p=178436#178436 - */ - -bool guiDisabledMenu(void) -{ - IrrlichtDevice *device = createDevice( video::EDT_BURNINGSVIDEO, - dimension2d(160, 40), 32); - assert_log(device); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - gui::IGUIEnvironment* env = device->getGUIEnvironment(); - - gui::IGUIContextMenu* menu = env->addMenu(); - menu->addItem(L"Menu", -1, true, true); - gui::IGUIContextMenu* subMenu = menu->getSubMenu(0); - subMenu->addItem(L"Submenu 1", -1, false, true); - gui::IGUIContextMenu* subSubMenu = subMenu->getSubMenu(0); - subSubMenu->addItem(L"Final item"); - - SEvent event; - event.EventType = EET_MOUSE_INPUT_EVENT; - event.MouseInput.Event = EMIE_LMOUSE_PRESSED_DOWN; - event.MouseInput.X = menu->getAbsolutePosition().UpperLeftCorner.X + 1; - event.MouseInput.Y = menu->getAbsolutePosition().UpperLeftCorner.Y + 1; - (void)menu->OnEvent(event); - - // Hovering over the disabled submenu shouldn't cause the "Final item" to appear. - event.MouseInput.Event = EMIE_MOUSE_MOVED; - event.MouseInput.X = subMenu->getAbsolutePosition().UpperLeftCorner.X + 40; - event.MouseInput.Y = subMenu->getAbsolutePosition().UpperLeftCorner.Y + 10; - (void)menu->OnEvent(event); - - device->run(); - driver->beginScene(true, true, video::SColor(150,50,50,50)); - env->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-guiDisabledMenu.png", 98.77f); - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - diff --git a/lib/irrlicht/tests/ioScene.cpp b/lib/irrlicht/tests/ioScene.cpp deleted file mode 100644 index f7a3fa60d..000000000 --- a/lib/irrlicht/tests/ioScene.cpp +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -// Tests save scene. -static bool saveScene(void) -{ - IrrlichtDevice *device = createDevice( EDT_NULL, dimension2d(160, 120), 32); - assert_log(device); - if (!device) - return false; - - ISceneManager * smgr = device->getSceneManager(); - - ISkinnedMesh* mesh = (ISkinnedMesh*)smgr->getMesh("../media/ninja.b3d"); - if (!mesh) - return false; - - IAnimatedMeshSceneNode* node1 = smgr->addAnimatedMeshSceneNode(mesh); - if (node1) - { - node1->setPosition(vector3df(-3, -3, 10)); - node1->setMaterialFlag(EMF_LIGHTING, false); - node1->setAnimationSpeed(0.f); - node1->setCurrentFrame(10.f); - node1->setDebugDataVisible(irr::scene::EDS_BBOX_BUFFERS); - } - - ISkinnedMesh* mesh2 = (ISkinnedMesh*)smgr->getMesh(device->getFileSystem()->getAbsolutePath("../media/dwarf.x")); - if (!mesh2) - return false; - - IAnimatedMeshSceneNode* node2 = smgr->addAnimatedMeshSceneNode(mesh2); - if (node2) - { - node2->setPosition(vector3df(33, -93, 120)); - node2->setMaterialFlag(EMF_LIGHTING, false); - node2->setAnimationSpeed(10.f); - node2->setCurrentFrame(2.f); - } - - IAnimatedMeshSceneNode* node3 = smgr->addAnimatedMeshSceneNode(mesh2, node2); - if (node3) - { - node3->setPosition(vector3df(-88, -300, 150)); - node3->setMaterialFlag(EMF_LIGHTING, false); - node3->setAnimationSpeed(0.f); - node3->setCurrentFrame(12.f); - } - - smgr->addCameraSceneNode(); - - logTestString("Test scene.irr"); - smgr->saveScene("results/scene.irr"); - bool result = xmlCompareFiles(device->getFileSystem(), "results/scene.irr", "media/scene.irr"); - - logTestString("Test scene2.irr"); - smgr->saveScene("results/scene2.irr", 0, node3); - result &= xmlCompareFiles(device->getFileSystem(), "results/scene2.irr", "media/scene2.irr"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -static bool loadScene(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, - core::dimension2du(160,120), 32); - if (!device) - return false; - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager* smgr = device->getSceneManager(); - // load scene from example, with correct relative path - device->getFileSystem()->changeWorkingDirectoryTo("results"); - smgr->loadScene("../../media/example.irr"); - smgr->addCameraSceneNode(0, core::vector3df(0,0,-50)); - device->getFileSystem()->changeWorkingDirectoryTo(".."); - - bool result = false; - device->run(); - device->getTimer()->setTime(666); // scene has animations and current scene seems to be saved at that time ... really - best result with just that number :-) - if (driver->beginScene(true, true, video::SColor(0, 80, 80, 80))) - { - smgr->drawAll(); - driver->endScene(); - // we need to be very sloppy, because the animators will produce a different - // start depending on the actual loading time. 97% seems to be safe, as removing - // an object produces values around 95% - result = takeScreenshotAndCompareAgainstReference(driver, "-loadScene.png", 97.4f); - if (!result) - logTestString("Rendering the loaded scene failed.\n"); - } - - ISceneNode* node = smgr->getSceneNodeFromId(128); - if (!node) - result=false; - else if (result) // only check if scene was correctly loaded - { - result &= (node->getChildren().size()==0); - if (!result) - logTestString("Node has an illegal child node.\n"); - device->getSceneManager()->loadScene("results/scene2.irr", 0, node); - result &= (node->getChildren().size()!=0); - if (!result) - logTestString("Loading second scene as child failed.\n"); - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool ioScene(void) -{ - bool result = saveScene(); - result &= loadScene(); - return result; -} diff --git a/lib/irrlicht/tests/irrArray.cpp b/lib/irrlicht/tests/irrArray.cpp deleted file mode 100644 index 674489c8c..000000000 --- a/lib/irrlicht/tests/irrArray.cpp +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" -#include - -using namespace irr; -using namespace core; - -core::map countReferences; - -struct SDummy -{ - SDummy(int a) : x(a) - { - countReferences.insert(x,1); - } - - SDummy() : x(0) - { - countReferences.insert(x,1); - } - - SDummy(const SDummy& other) - { - x = other.x; - countReferences[x] = countReferences[x] + 1; - } - - ~SDummy() - { - countReferences[x] = countReferences[x] - 1; - } - - int x; -}; - -static bool testErase() -{ - { - core::array aaa; - aaa.push_back(SDummy(0)); - aaa.push_back(SDummy(1)); - aaa.push_back(SDummy(2)); - aaa.push_back(SDummy(3)); - aaa.push_back(SDummy(4)); - aaa.push_back(SDummy(5)); - - aaa.erase(0,2); - } - - for ( core::map::Iterator it = countReferences.getIterator(); !it.atEnd(); it++ ) - { - if ( it->getValue() != 0 ) - { - logTestString("testErase: wrong count for %d, it's: %d\n", it->getKey(), it->getValue()); - return false; - } - } - return true; -} - - -struct VarArray -{ - core::array < int, core::irrAllocatorFast > MyArray; -}; - -static bool testSelfAssignment() -{ - core::array myArray; - myArray.push_back(1); - myArray = myArray; - return myArray.size() == 1; -} - -// this will (did once) crash when wrong due to deallocating memory twice, so no return value -static void crashTestFastAlloc() -{ - core::array < VarArray, core::irrAllocatorFast > ArrayArray; - ArrayArray.setAllocStrategy(core::ALLOC_STRATEGY_SAFE); // force more re-allocations - VarArray var; - var.MyArray.setAllocStrategy(core::ALLOC_STRATEGY_SAFE); // force more re-allocations - var.MyArray.push_back( 0 ); - - for ( int i=0; i< 100; ++i ) - { - ArrayArray.push_back(var); - ArrayArray.push_back(var); - } -} - -static bool testSwap() -{ - bool result = true; - - core::array array1, array2, copy1, copy2; - for ( int i=0; i<99; ++i ) - { - array1.push_back(i); - if ( i < 10 ) // we want also different container sizes - array2.push_back(99-i); - } - copy1 = array1; - copy2 = array2; - array1.swap(array2); - - result &= (array1 == copy2); - result &= (array2 == copy1); - - assert_log( result ); - - return result; -} - -// Test the functionality of core::array -bool testIrrArray(void) -{ - bool allExpected = true; - - logTestString("crashTestFastAlloc\n"); - crashTestFastAlloc(); - allExpected &= testSelfAssignment(); - allExpected &= testSwap(); - allExpected &= testErase(); - - if(allExpected) - logTestString("\nAll tests passed\n"); - else - logTestString("\nFAIL!\n"); - - return allExpected; -} diff --git a/lib/irrlicht/tests/irrCoreEquals.cpp b/lib/irrlicht/tests/irrCoreEquals.cpp deleted file mode 100644 index 45c176ac7..000000000 --- a/lib/irrlicht/tests/irrCoreEquals.cpp +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald and Christian Stehno -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -bool irrCoreEquals(void) -{ - // float tests - if(!irr::core::equals(99.f, 99.f)) - { - logTestString("irr::core::equals(f32, f32 (, default)) failed.\n"); - return false; - } - - if(!irr::core::equals(99.f, 98.f, 1.f)) - { - logTestString("irr::core::equals(f32, f32, f32) failed.\n"); - return false; - } - - // double tests - if(!irr::core::equals(99.0, 99.0)) - { - logTestString("irr::core::equals(f64, f64 (,default)) failed.\n"); - return false; - } - - if(!irr::core::equals(99.0, 98.0, 1.0)) - { - logTestString("irr::core::equals(f64, f64, f64) failed.\n"); - return false; - } - - // int tests - if(!irr::core::equals(99, 99)) - { - logTestString("irr::core::equals(s32, s32 (,default)) failed.\n"); - return false; - } - - if(!irr::core::equals(99, 98, 1)) - { - logTestString("irr::core::equals(s32, s32, s32) failed.\n"); - return false; - } - - if(irr::core::equals(99, 98, 0)) - { - logTestString("irr::core::equals(s32, s32, 0) failed.\n"); - return false; - } - - if(!irr::core::equals(-99, -99)) - { - logTestString("irr::core::equals(s32, s32 (,default)) failed.\n"); - return false; - } - - if(!irr::core::equals(-99, -98, 1)) - { - logTestString("irr::core::equals(s32, s32, s32) failed.\n"); - return false; - } - - if(irr::core::equals(-99, -98, 0)) - { - logTestString("irr::core::equals(s32, s32, 0) failed.\n"); - return false; - } - - // iszero is a specialized equals method - // float tests - if(!irr::core::iszero(.0f)) - { - logTestString("irr::core::iszero(f32 (,default)) failed.\n"); - return false; - } - - if(irr::core::iszero(-1.0f)) - { - logTestString("irr::core::iszero(f32 (,default)) failed.\n"); - return false; - } - - if(!irr::core::iszero(1.0f, 1.0f)) - { - logTestString("irr::core::iszero(f32, f32) failed.\n"); - return false; - } - - // double tests - if(!irr::core::iszero(0.0)) - { - logTestString("irr::core::iszero(f64 (,default)) failed.\n"); - return false; - } - - if(irr::core::iszero(-1.0)) - { - logTestString("irr::core::iszero(f64 (,default)) failed.\n"); - return false; - } - - if(!irr::core::iszero(-2.0, 2.0)) - { - logTestString("irr::core::iszero(f64, f64) failed.\n"); - return false; - } - - // int tests - if(!irr::core::iszero(0)) - { - logTestString("irr::core::iszero(s32 (,default)) failed.\n"); - return false; - } - - if(irr::core::iszero(-1)) - { - logTestString("irr::core::iszero(s32 (,default)) failed.\n"); - return false; - } - - if(!irr::core::iszero(1, 1)) - { - logTestString("irr::core::iszero(s32, s32) failed.\n"); - return false; - } - - - return true; -} - diff --git a/lib/irrlicht/tests/irrList.cpp b/lib/irrlicht/tests/irrList.cpp deleted file mode 100644 index de1ec9138..000000000 --- a/lib/irrlicht/tests/irrList.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "testUtils.h" -#include - -using namespace irr; -using namespace core; - -// list has no operator== currently so we have to check manually -// TODO: Add an operator== to core::list and the kick this function out -template -static bool compareLists(const core::list & a, const core::list & b) -{ - if ( a.size() != b.size() ) - return false; - // can't test allocator because we have no access to it here - typename core::list::ConstIterator iterA = a.begin(); - typename core::list::ConstIterator iterB = b.begin(); - for ( ; iterA != a.end(); ++iterA, ++iterB ) - { - if ( (*iterA) != (*iterB) ) - return false; - } - return true; -} - -// Make sure that we can get a const iterator from a non-const list -template -static void constIteratorCompileTest(core::list & a) -{ - typename core::list::ConstIterator iterA = a.begin(); - while (iterA != a.end() ) - { - ++iterA; - } -} - -static bool testSwap() -{ - bool result = true; - - core::list list1, list2, copy1, copy2; - for ( int i=0; i<99; ++i ) - { - list1.push_back(i); - if ( i < 10 ) // we want also different container sizes i < 50 ) - list2.push_back(99-i); - } - copy1 = list1; - copy2 = list2; - list1.swap(list2); - - - result &= compareLists(list1, copy2); - result &= compareLists(list2, copy1); - - assert_log( result ); - - return result; -} - -// Test the functionality of core::list -bool testIrrList(void) -{ - bool success = true; - - core::list compileThisList; - constIteratorCompileTest(compileThisList); - - success &= testSwap(); - - if(success) - logTestString("\nAll tests passed\n"); - else - logTestString("\nFAIL!\n"); - - return success; -} diff --git a/lib/irrlicht/tests/irrMap.cpp b/lib/irrlicht/tests/irrMap.cpp deleted file mode 100644 index 7ce85dfb0..000000000 --- a/lib/irrlicht/tests/irrMap.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "testUtils.h" -#include - -using namespace irr; -using namespace core; - -// map has no operator== currently so we have to check manually -// TODO: Add an operator== to core::map and the kick this function out -template -static bool compareMaps(core::map & a, core::map & b) -{ - if ( a.size() != b.size() ) - return false; - // can't test allocator because we have no access to it here - typename core::map::Iterator iterA = a.getIterator(); - typename core::map::Iterator iterB = b.getIterator(); - for ( ; !iterA.atEnd(); iterA++, iterB++ ) // TODO: only iter++, no ++iter in irr::map - { - if ( iterA->getValue() != iterB->getValue() ) - return false; - } - return true; -} - - -static bool testSwap() -{ - bool result = true; - - core::map map1, map2, copy1, copy2; - for ( int i=0; i<99; ++i ) - { - map1[i] = i; - copy1[i] = i; // TODO: whatever the reason - irr::map does not want operator= so we have to assign to identical values - if ( i < 10 ) // we want also different container sizes - { - map2[i] = 99-i; - copy2[i] = 99-i; // TODO: whatever the reason - irr::map does not want operator= so we have to assign to identical values - } - } - map1.swap(map2); - - result &= compareMaps(map1, copy2); - result &= compareMaps(map2, copy1); - - assert_log( result ); - - return result; -} - -// Test the functionality of core::list -bool testIrrMap(void) -{ - bool success = true; - - success &= testSwap(); - - if(success) - logTestString("\nAll tests passed\n"); - else - logTestString("\nFAIL!\n"); - - return success; -} diff --git a/lib/irrlicht/tests/irrString.cpp b/lib/irrlicht/tests/irrString.cpp deleted file mode 100644 index 08ff6728c..000000000 --- a/lib/irrlicht/tests/irrString.cpp +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" -#include - -using namespace irr; -using namespace core; - -static bool testSelfAssignment() -{ - core::stringw myString(L"foo"); - myString = myString; - return myString == core::stringw(L"foo"); -} - -static bool testSplit() -{ - logTestString("Test stringw::split()\n"); - core::stringw teststring(L"[b]this [/b] is a [color=0xff000000]test[/color]."); - core::list parts1; - teststring.split >(parts1, L"["); - core::list parts2; - teststring.split >(parts2, L"[", 1, false, true); - return (parts1.getSize()==4) && (parts2.getSize()==5); -} - -static bool testFastAlloc() -{ - core::string > FastString(L"abc"); - core::string > FastStringLong(L"longer"); - - FastString = L"test"; - - // cause a reallocation - FastString = FastStringLong; - - // this test should either not compile or crash when the allocaters are messed up - return true; -} - -static bool testReplace() -{ - // test string getting longer - core::stringw str = L"no"; - str.replace(L"no", L"yes"); - if ( str != L"yes" ) - return false; - str = L"nonono"; - str.replace(L"no", L"yes"); - if ( str != L"yesyesyes" ) - return false; - str = L"nomaybenomaybeno"; - str.replace(L"no", L"yes"); - if ( str != L"yesmaybeyesmaybeyes" ) - return false; - - // test string staying same length - str = L"one"; - str.replace(L"one", L"two"); - if ( str != L"two" ) - return false; - str = L"oneone"; - str.replace(L"one", L"two"); - if ( str != L"twotwo" ) - return false; - - // test string getting shorter - str = L"yes"; - str.replace(L"yes", L"no"); - if ( str != L"no" ) - return false; - - str = L"yesyes"; - str.replace(L"yes", L"no"); - if ( str != L"nono" ) - return false; - - // remove string-parts completely - str = L"killme"; - str.replace(L"killme", L""); - if ( str != L"" ) - return false; - - str = L"killmenow"; - str.replace(L"killme", L""); - if ( str != L"now" ) - return false; - - str = L"nowkillme"; - str.replace(L"killme", L""); - if ( str != L"now" ) - return false; - - // remove nothing - str = L"keepme"; - str.replace(L"", L"whatever"); - if ( str != L"keepme" ) - return false; - - str = L"keepme"; - str.replace(L"", L""); - if ( str != L"keepme" ) - return false; - - return true; -} - - -bool testAppendStringc() -{ - core::stringc str; - // Test with character - if (str != "") - return false; - str += 'W'; - if (str != "W") - return false; - str += 'i'; - if (str != "Wi") - return false; - str=""; - if (str != "") - return false; - - // Test with C-style string - str += "Another Test"; - if (str != "Another Test") - return false; - str=""; - str += 'A'; - str += "nother Test"; - if (str != "Another Test") - return false; - str=""; - - // Test with int - str += 10; - if (str != "10") - return false; - str += 0; - if (str != "100") - return false; - str=""; - str += "-32"; - if (str != "-32") - return false; - str=""; - - // Test with unsigned int - str += 21u; - if (str != "21") - return false; - str += 0u; - if (str != "210") - return false; - str=""; - - // Test with long int - str += 456l; - if (str != "456") - return false; - str += 0l; - if (str != "4560") - return false; - str=""; - str += -456l; - if (str != "-456") - return false; - str=""; - - // Test with unsigned long - str += 994ul; - if (str != "994") - return false; - str += 0ul; - if (str != "9940") - return false; - str=""; - return true; -} - -bool testLowerUpper() -{ - irr::core::array stringsOrig, targetLower, targetUpper; - stringsOrig.push_back("abc"); - targetLower.push_back("abc"); - targetUpper.push_back("ABC"); - stringsOrig.push_back("ABC"); - targetLower.push_back("abc"); - targetUpper.push_back("ABC"); - stringsOrig.push_back("Abc"); - targetLower.push_back("abc"); - targetUpper.push_back("ABC"); - stringsOrig.push_back("aBBc"); - targetLower.push_back("abbc"); - targetUpper.push_back("ABBC"); - stringsOrig.push_back("abC"); - targetLower.push_back("abc"); - targetUpper.push_back("ABC"); - stringsOrig.push_back(""); - targetLower.push_back(""); - targetUpper.push_back(""); - /* TODO: those are not supported so far - stringsOrig.push_back("ßäöü"); - targetLower.push_back("ßäöü"); - targetUpper.push_back("ßÄÖÜ"); - stringsOrig.push_back("ßÄÖÜ"); - targetLower.push_back("ßäöü"); - targetUpper.push_back("ßÄÖÜ"); - */ - - for ( irr::u32 i=0; i= 0 ) - return false; - - irr::core::stringc empty(""); - p = empty.findLastCharNotInList("x",1); - if ( p >= 0 ) - return false; - - p = empty.findLast('x'); - if ( p >= 0 ) - return false; - - p = dot.findLast('.'); - if ( p != 0 ) - return false; - - p = empty.findLastChar("ab", 2); - if ( p >= 0 ) - return false; - - p = dot.findLastChar("-.", 2); - if ( p != 0 ) - return false; - - return true; -} - -// Test the functionality of irrString -/** Validation is done with assert_log() against expected results. */ -bool testIrrString(void) -{ - bool allExpected = true; - - logTestString("Test stringc\n"); - { - // Check empty string - core::stringc empty; - assert_log(empty.size()==0); - assert_log(empty[0]==0); - assert_log(empty.c_str()!=0); - assert_log(*(empty.c_str())==0); - // Assign content - empty = "Test"; - assert_log(empty.size()==4); - assert_log(empty[0]=='T'); - assert_log(empty[3]=='t'); - assert_log(*(empty.c_str())=='T'); - //Assign empty string, should be same as in the beginning - empty = ""; - assert_log(empty.size()==0); - assert_log(empty[0]==0); - assert_log(*(empty.c_str())==0); - } - logTestString("Test stringw\n"); - { - core::stringw empty; - assert_log(empty.size()==0); - assert_log(empty[0]==0); - assert_log(empty.c_str()!=0); - assert_log(*(empty.c_str())==0); - empty = L"Test"; - assert_log(empty.size()==4); - assert_log(empty[0]==L'T'); - assert_log(empty[3]=='t'); - assert_log(*(empty.c_str())==L'T'); - empty = L""; - assert_log(empty.size()==0); - assert_log(empty[0]==0); - assert_log(*(empty.c_str())==0); - assert_log(allExpected &= testSplit()); - } - allExpected &= testAppendStringc(); - - logTestString("Test io::path\n"); - { - // Only test that this type exists, it's one from above - io::path myPath; - myPath = "Some text"; // Only to avoid wrong optimizations - } - - logTestString("Test self assignment\n"); - allExpected &= testSelfAssignment(); - - logTestString("test fast alloc\n"); - allExpected &= testFastAlloc(); - - logTestString("test replace\n"); - allExpected &= testReplace(); - - logTestString("test make_lower and make_uppers\n"); - allExpected &= testLowerUpper(); - - logTestString("test find functions\n"); - allExpected &= testFindFunctions(); - - if(allExpected) - logTestString("\nAll tests passed\n"); - else - logTestString("\nFAIL!\n"); - - return allExpected; -} diff --git a/lib/irrlicht/tests/lightMaps.cpp b/lib/irrlicht/tests/lightMaps.cpp deleted file mode 100644 index 05e6c3509..000000000 --- a/lib/irrlicht/tests/lightMaps.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -//! Tests lightmaps under all drivers that support them -static bool runTestWithDriver(E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - - logTestString("Testing driver %ls\n", driver->getName()); - if (driver->getDriverAttributes().getAttributeAsInt("MaxTextures")<2) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - bool result = true; - bool added = device->getFileSystem()->addFileArchive("../media/map-20kdm2.pk3"); - assert_log(added); - - if(added) - { - ISceneNode * node = smgr->addOctreeSceneNode(smgr->getMesh("20kdm2.bsp")->getMesh(0), 0, -1, 1024); - assert_log(node); - - if (node) - { - node->setMaterialFlag(EMF_LIGHTING, false); - node->setPosition(core::vector3df(-1300,-820,-1249)); - node->setScale(core::vector3df(1, 5, 1)); - - (void)smgr->addCameraSceneNode(0, core::vector3df(0,0,0), core::vector3df(40,100,30)); - - driver->beginScene(true, true, video::SColor(255,255,255,0)); - smgr->drawAll(); - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-lightmaps.png", 96); - } - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -bool lightMaps(void) -{ - bool result = true; - TestWithAllDrivers(runTestWithDriver); - return result; -} - diff --git a/lib/irrlicht/tests/lights.cpp b/lib/irrlicht/tests/lights.cpp deleted file mode 100644 index 7913d4e98..000000000 --- a/lib/irrlicht/tests/lights.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -static bool testLightTypes(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice (driverType, core::dimension2d(128,128)); - if (!device) - return true; // No error if device does not exist - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - if (!driver->getDriverAttributes().getAttributeAsInt("MaxLights")) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - -// smgr->setAmbientLight(video::SColorf(0.3f,0.3f,0.3f)); - scene::ICameraSceneNode* cam = smgr->addCameraSceneNode(); - cam->setPosition(core::vector3df(0,200,0)); - cam->setTarget(core::vector3df()); - smgr->addAnimatedMeshSceneNode(device->getSceneManager()->addHillPlaneMesh("plane", core::dimension2df(4,4), core::dimension2du(128,128))); - scene::ILightSceneNode* light1 = smgr->addLightSceneNode(0, core::vector3df(-100,30,-100)); - light1->setLightType(video::ELT_POINT); - light1->setRadius(100.f); - light1->getLightData().DiffuseColor.set(0,1,1); -// smgr->addCubeSceneNode(10, light1)->setMaterialFlag(video::EMF_LIGHTING, false); - scene::ILightSceneNode* light2 = smgr->addLightSceneNode(0, core::vector3df(100,30,100)); - light2->setRotation(core::vector3df(90,0,0)); - light2->setLightType(video::ELT_SPOT); - light2->setRadius(100.f); - light2->getLightData().DiffuseColor.set(1,0,0); - light2->getLightData().InnerCone=10.f; - light2->getLightData().OuterCone=30.f; -// smgr->addCubeSceneNode(10, light2)->setMaterialFlag(video::EMF_LIGHTING, false); - scene::ILightSceneNode* light3 = smgr->addLightSceneNode(); - light3->setRotation(core::vector3df(15,0,0)); - light3->setLightType(video::ELT_DIRECTIONAL); - light1->getLightData().DiffuseColor.set(0,1,0); - - driver->beginScene (true, true, 0); - smgr->drawAll(); - driver->endScene(); - - const bool result = takeScreenshotAndCompareAgainstReference(driver, "-lightType.png", 99.91f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool lights(void) -{ - bool result = true; - // no lights in sw renderer - TestWithAllDrivers(testLightTypes); - return result; -} diff --git a/lib/irrlicht/tests/loadTextures.cpp b/lib/irrlicht/tests/loadTextures.cpp deleted file mode 100644 index 4080607ac..000000000 --- a/lib/irrlicht/tests/loadTextures.cpp +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -/** This tests verifies that textures opened from different places in the - filesystem don't create duplicated textures. */ -bool loadFromFileFolder(void) -{ - IrrlichtDevice *device = - createDevice( video::EDT_NULL, dimension2du(160, 120)); - - if (!device) - { - logTestString("Unable to create EDT_NULL device\n"); - return false; - } - - IVideoDriver * driver = device->getVideoDriver(); - - u32 numTexs = driver->getTextureCount(); - - ITexture * tex1 = driver->getTexture("../media/tools.png"); - assert_log(tex1); - if(!tex1) - logTestString("Unable to open ../media/tools.png\n"); - if (driver->getTextureCount()!=numTexs+1) - { - logTestString("No additional texture in the texture cache %s:%d\n", __FILE__, __LINE__); - return false; - } - - IReadFile * readFile = device->getFileSystem()->createAndOpenFile("../media/tools.png"); - assert_log(readFile); - if(!readFile) - logTestString("Unable to open ../media/tools.png\n"); - if (driver->getTextureCount()!=numTexs+1) - { - logTestString("Additional texture in the texture cache %s:%d\n", __FILE__, __LINE__); - return false; - } - - ITexture * tex2 = driver->getTexture(readFile); - assert_log(tex2); - if(!readFile) - logTestString("Unable to create texture from ../media/tools.png\n"); - if (driver->getTextureCount()!=numTexs+1) - { - logTestString("Additional texture in the texture cache %s:%d\n", __FILE__, __LINE__); - return false; - } - - readFile->drop(); - - // adding a folder archive - device->getFileSystem()->addFileArchive( "../media/" ); - - ITexture * tex3 = driver->getTexture("tools.png"); - assert_log(tex3); - if(!tex3) - logTestString("Unable to open tools.png\n"); - if (driver->getTextureCount()!=numTexs+1) - { - logTestString("Additional texture in the texture cache %s:%d\n", __FILE__, __LINE__); - return false; - } - - ITexture * tex4 = driver->getTexture("tools.png"); - assert_log(tex4); - if(!tex4) - logTestString("Unable to open tools.png\n"); - if (driver->getTextureCount()!=numTexs+1) - { - logTestString("Additional texture in the texture cache %s:%d\n", __FILE__, __LINE__); - return false; - } - - device->closeDevice(); - device->run(); - device->drop(); - return ((tex1 == tex2) && (tex1 == tex3) && (tex1 == tex4)); -} - -bool loadTextures() -{ - bool result = true; - result &= loadFromFileFolder(); - return result; -} - diff --git a/lib/irrlicht/tests/main.cpp b/lib/irrlicht/tests/main.cpp deleted file mode 100644 index 06d820202..000000000 --- a/lib/irrlicht/tests/main.cpp +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald and Christian Stehno -// No rights reserved: this software is in the public domain. - -// This is the entry point for the Irrlicht test suite. - -// This is an MSVC pragma to link against the Irrlicht library. -// Other builds must link against it in the project files. -#if defined(_MSC_VER) -#pragma comment(lib, "Irrlicht.lib") -#define _CRT_SECURE_NO_WARNINGS 1 -#endif // _MSC_VER - -#include "testUtils.h" -#include -#include -#include - -struct STestDefinition -{ - //! The test entry point function - bool(*testSignature)(void); - - //! A descriptive name for the test - const char * testName; -}; - -//! This is the main entry point for the Irrlicht test suite. -/** \return The number of test that failed, i.e. 0 is success. */ -int main(int argumentCount, char * arguments[]) -{ - if(argumentCount > 3) - { - logTestString("\nUsage: %s [testNumber] [testCount]\n"); - return 9999; - } - - #define TEST(x)\ - {\ - extern bool x(void);\ - STestDefinition newTest;\ - newTest.testSignature = x;\ - newTest.testName = #x;\ - tests.push_back(newTest);\ - } - - // Use an STL vector so that we don't rely on Irrlicht. - std::vector tests; - - // Note that to interactively debug a test, you will generally want to move it - // (temporarily) to the beginning of the list, since each test runs in its own - // process. - - TEST(disambiguateTextures); // Normally you should run this first, since it validates the working directory. - // Now the simple tests without device - TEST(testIrrArray); - TEST(testIrrMap); - TEST(testIrrList); - TEST(exports); - TEST(irrCoreEquals); - TEST(testIrrString); - TEST(testLine2d); - TEST(matrixOps); - TEST(testDimension2d); - TEST(testVector2d); - TEST(testVector3d); - TEST(testQuaternion); - TEST(testS3DVertex); - TEST(testaabbox3d); - TEST(color); - TEST(testTriangle3d); - TEST(vectorPositionDimension2d); - // file system checks (with null driver) - TEST(filesystem); - TEST(archiveReader); - TEST(testXML); - TEST(serializeAttributes); - // null driver - TEST(fast_atof); - TEST(loadTextures); - TEST(collisionResponseAnimator); - TEST(enumerateImageManipulators); - TEST(removeCustomAnimator); - TEST(sceneCollisionManager); - TEST(sceneNodeAnimator); - TEST(meshLoaders); - TEST(testTimer); - // software drivers only - TEST(softwareDevice); - TEST(b3dAnimation); - TEST(burningsVideo); - TEST(billboards); - TEST(createImage); - TEST(cursorSetVisible); - TEST(flyCircleAnimator); - TEST(guiDisabledMenu); - TEST(makeColorKeyTexture); - TEST(md2Animation); - TEST(meshTransform); - TEST(skinnedMesh); - TEST(testGeometryCreator); - TEST(writeImageToFile); - TEST(ioScene); - // all driver checks - TEST(videoDriver); - TEST(screenshot); - TEST(drawPixel); - TEST(drawRectOutline); - TEST(drawVertexPrimitive); - TEST(material); - TEST(renderTargetTexture); - TEST(textureFeatures); - TEST(textureRenderStates); - TEST(transparentMaterials); - TEST(userclipplane); - TEST(antiAliasing); - TEST(draw2DImage); - TEST(lights); - TEST(twodmaterial); - TEST(viewPort); - TEST(mrt); - TEST(projectionMatrix); - // large scenes/long rendering - // shadows are slow -// TEST(orthoCam); -// TEST(stencilShadow); - // q3 maps are slow - TEST(planeMatrix); - TEST(terrainSceneNode); - TEST(lightMaps); - TEST(triangleSelector); - - unsigned int numberOfTests = tests.size(); - unsigned int testToRun = 0; - unsigned int fails = 0; - - bool firstRun=true; - const bool spawn=false; - // args: [testNumber] [testCount] - if(argumentCount > 1) - { - if (!strcmp(arguments[1],"--list")) - { - for (unsigned int i=0; i=0); - testToRun=abs(tmp); - if (!firstRun) - testToRun -= 1; - - if(argumentCount > 2) - { - numberOfTests = testToRun + abs(atoi(arguments[2])); - if (numberOfTests>=tests.size()) - numberOfTests=tests.size(); - } - } - - if(testToRun >= numberOfTests) - { - logTestString("\nError: invalid test %d (maximum %d)\n", - testToRun, numberOfTests-testToRun); - return 9999; - } - - const unsigned int testCount = numberOfTests-testToRun; - const bool logFileOpened = openTestLog(firstRun); - assert(logFileOpened); - - if (firstRun) - { - if (numberOfTests) - { - for (unsigned int i=testToRun; i(160, 120), 32); - if (!device) - return false; - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - - // Draw a cube background so that we can check that the keying is working. - ISceneNode * cube = smgr->addCubeSceneNode(50.f, 0, -1, vector3df(0, 0, 60)); - cube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - cube->setMaterialFlag(video::EMF_LIGHTING, false); - - ITexture * Texture = device->getVideoDriver()->getTexture("../media/portal2.bmp"); - - device->getVideoDriver()->makeColorKeyTexture(Texture, - position2d(64,64), - zeroTexels); - device->getVideoDriver()->makeColorKeyTexture(Texture, - position2d(64,64), - zeroTexels); - (void)smgr->addCameraSceneNode(); - - driver->beginScene(true, true, SColor(255,100,101,140)); - smgr->drawAll(); - - driver->draw2DImage(Texture, - position2di(40, 40), - rect(0, 0, Texture->getSize().Width, Texture->getSize().Height), - 0, - SColor(255,255,255,255), - true); - driver->endScene(); - - char screenshotName[256]; - (void)snprintf(screenshotName, 256, "-makeColorKeyTexture-%s.png", - zeroTexels? "old" : "new"); - - bool result = takeScreenshotAndCompareAgainstReference(driver, screenshotName); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool makeColorKeyTexture(void) -{ - bool result = true; - - result &= doTestWith(EDT_BURNINGSVIDEO, false); - result &= doTestWith(EDT_SOFTWARE, false); - result &= doTestWith(EDT_BURNINGSVIDEO, true); - result &= doTestWith(EDT_SOFTWARE, true); - - return result; -} diff --git a/lib/irrlicht/tests/material.cpp b/lib/irrlicht/tests/material.cpp deleted file mode 100644 index 947c61521..000000000 --- a/lib/irrlicht/tests/material.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#include "testUtils.h" - -using namespace irr; - -static bool polygonOffset(video::E_DRIVER_TYPE type) -{ - IrrlichtDevice* device = createDevice(type, core::dimension2d(160, 120)); - - if (device == 0) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - if (!driver->queryFeature(video::EVDF_POLYGON_OFFSET)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - scene::ISceneManager* smgr = device->getSceneManager(); - - // create first plane - scene::ISceneNode* plane = smgr->addMeshSceneNode(smgr->addHillPlaneMesh( - "plane", core::dimension2df(10,10), core::dimension2du(2,2)), 0, -1, - core::vector3df(0,0,20), core::vector3df(270,0,0)); - - if (plane) - { - plane->setMaterialTexture(0, driver->getTexture("../media/t351sml.jpg")); - plane->setMaterialFlag(video::EMF_LIGHTING, false); - plane->setMaterialFlag(video::EMF_BACK_FACE_CULLING, true); - } - - // create second plane exactly on top of the first one - scene::ISceneNode* plane2 = smgr->addMeshSceneNode(smgr->addHillPlaneMesh( - "plane2", core::dimension2df(5,5), core::dimension2du(2,2)), 0, -1, - core::vector3df(0,0,20), core::vector3df(270,0,0)); - plane2->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false); - - smgr->addCameraSceneNode(); - - // test back plane to back - plane->getMaterial(0).PolygonOffsetDirection=video::EPO_BACK; - plane->getMaterial(0).PolygonOffsetFactor=7; - - driver->beginScene(true, true, video::SColor(255,113,113,133)); - smgr->drawAll(); - driver->endScene(); - bool result = takeScreenshotAndCompareAgainstReference(driver, "-polygonBack.png"); - - //reset back plane - plane->getMaterial(0).PolygonOffsetFactor=0; - // test front plane to front - plane2->getMaterial(0).PolygonOffsetDirection=video::EPO_FRONT; - plane2->getMaterial(0).PolygonOffsetFactor=7; - driver->beginScene(true, true, video::SColor(255,113,113,133)); - smgr->drawAll(); - driver->endScene(); - result &= takeScreenshotAndCompareAgainstReference(driver, "-polygonFront.png"); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -bool material() -{ - bool result = true; - TestWithAllDrivers(polygonOffset); - return result; -} diff --git a/lib/irrlicht/tests/matrixOps.cpp b/lib/irrlicht/tests/matrixOps.cpp deleted file mode 100644 index 63a0877c9..000000000 --- a/lib/irrlicht/tests/matrixOps.cpp +++ /dev/null @@ -1,465 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -namespace -{ - -// Basic tests for identity matrix -bool identity(void) -{ - bool result = true; - matrix4 m; - // Check default init - result &= (m==core::IdentityMatrix); - result &= (core::IdentityMatrix==m); - assert_log(result); - // Since the last test can be made with isDefinitelyIdentityMatrix we set it to false here - m.setDefinitelyIdentityMatrix(false); - result &= (m==core::IdentityMatrix); - result &= (core::IdentityMatrix==m); - assert_log(result); - // also equals should see this - result &= m.equals(core::IdentityMatrix); - result &= core::IdentityMatrix.equals(m); - assert_log(result); - // Check inequality - m[12]=5.f; - result &= (m!=core::IdentityMatrix); - result &= (core::IdentityMatrix!=m); - result &= !m.equals(core::IdentityMatrix); - result &= !core::IdentityMatrix.equals(m); - assert_log(result); - - // Test multiplication - result &= (m==(core::IdentityMatrix*m)); - result &= m.equals(core::IdentityMatrix*m); - result &= (m==(m*core::IdentityMatrix)); - result &= m.equals(m*core::IdentityMatrix); - assert_log(result); - - return result; -} - -// Test rotations -bool transformations(void) -{ - bool result = true; - matrix4 m, s; - m.setRotationDegrees(core::vector3df(30,40,50)); - s.setScale(core::vector3df(2,3,4)); - m *= s; - m.setTranslation(core::vector3df(5,6,7)); - result &= (core::vector3df(5,6,7).equals(m.getTranslation())); - assert_log(result); - result &= (core::vector3df(2,3,4).equals(m.getScale())); - assert_log(result); - core::vector3df newRotation = m.getRotationDegrees(); - result &= (core::vector3df(30,40,50).equals(newRotation, 0.000004f)); - assert_log(result); - m.setRotationDegrees(vector3df(90.0001f, 270.85f, 180.0f)); - s.setRotationDegrees(vector3df(0,0, 0.860866f)); - m *= s; - newRotation = m.getRotationDegrees(); - result &= (core::vector3df(0,270,270).equals(newRotation, 0.0001f)); - assert_log(result); - m.setRotationDegrees(vector3df(270.0f, 89.8264f, 0.000100879f)); - s.setRotationDegrees(vector3df(0,0, 0.189398f)); - m *= s; - newRotation = m.getRotationDegrees(); - result &= (core::vector3df(0,90,90).equals(newRotation, 0.0001f)); - assert_log(result); - m.setRotationDegrees(vector3df(270.0f, 89.0602f, 359.999f)); - s.setRotationDegrees(vector3df(0,0, 0.949104f)); - m *= s; - newRotation = m.getRotationDegrees(); - result &= (core::vector3df(0,90,89.999f).equals(newRotation)); - assert_log(result); - - return result; -} - -// Test rotations -bool rotations(void) -{ - bool result = true; - matrix4 rot1,rot2,rot3,rot4,rot5; - core::vector3df vec1(1,2,3),vec12(1,2,3); - core::vector3df vec2(-5,0,0),vec22(-5,0,0); - core::vector3df vec3(20,0,-20), vec32(20,0,-20); - // Make sure the matrix multiplication and rotation application give same results - rot1.setRotationDegrees(core::vector3df(90,0,0)); - rot2.setRotationDegrees(core::vector3df(0,90,0)); - rot3.setRotationDegrees(core::vector3df(0,0,90)); - rot4.setRotationDegrees(core::vector3df(90,90,90)); - rot5 = rot3*rot2*rot1; - result &= (rot4.equals(rot5, ROUNDING_ERROR_f32)); - assert_log(result); - rot4.transformVect(vec1);rot5.transformVect(vec12); - rot4.transformVect(vec2);rot5.transformVect(vec22); - rot4.transformVect(vec3);rot5.transformVect(vec32); - result &= (vec1.equals(vec12)); - result &= (vec2.equals(vec22)); - result &= (vec3.equals(vec32)); - assert_log(result); - - vec1.set(1,2,3);vec12.set(1,2,3); - vec2.set(-5,0,0);vec22.set(-5,0,0); - vec3.set(20,0,-20);vec32.set(20,0,-20); - rot1.setRotationDegrees(core::vector3df(45,0,0)); - rot2.setRotationDegrees(core::vector3df(0,45,0)); - rot3.setRotationDegrees(core::vector3df(0,0,45)); - rot4.setRotationDegrees(core::vector3df(45,45,45)); - rot5 = rot3*rot2*rot1; - result &= (rot4.equals(rot5, ROUNDING_ERROR_f32)); - assert_log(result); - rot4.transformVect(vec1);rot5.transformVect(vec12); - rot4.transformVect(vec2);rot5.transformVect(vec22); - rot4.transformVect(vec3);rot5.transformVect(vec32); - result &= (vec1.equals(vec12)); - result &= (vec2.equals(vec22)); - result &= (vec3.equals(vec32, 2*ROUNDING_ERROR_f32)); - assert_log(result); - - vec1.set(1,2,3);vec12.set(1,2,3); - vec2.set(-5,0,0);vec22.set(-5,0,0); - vec3.set(20,0,-20);vec32.set(20,0,-20); - rot1.setRotationDegrees(core::vector3df(-60,0,0)); - rot2.setRotationDegrees(core::vector3df(0,-60,0)); - rot3.setRotationDegrees(core::vector3df(0,0,-60)); - rot4.setRotationDegrees(core::vector3df(-60,-60,-60)); - rot5 = rot3*rot2*rot1; - result &= (rot4.equals(rot5, ROUNDING_ERROR_f32)); - assert_log(result); - rot4.transformVect(vec1);rot5.transformVect(vec12); - rot4.transformVect(vec2);rot5.transformVect(vec22); - rot4.transformVect(vec3);rot5.transformVect(vec32); - result &= (vec1.equals(vec12)); - result &= (vec2.equals(vec22)); - // this one needs higher tolerance due to rounding issues - result &= (vec3.equals(vec32, 0.000002f)); - assert_log(result); - - vec1.set(1,2,3);vec12.set(1,2,3); - vec2.set(-5,0,0);vec22.set(-5,0,0); - vec3.set(20,0,-20);vec32.set(20,0,-20); - rot1.setRotationDegrees(core::vector3df(113,0,0)); - rot2.setRotationDegrees(core::vector3df(0,-27,0)); - rot3.setRotationDegrees(core::vector3df(0,0,193)); - rot4.setRotationDegrees(core::vector3df(113,-27,193)); - rot5 = rot3*rot2*rot1; - result &= (rot4.equals(rot5, ROUNDING_ERROR_f32)); - assert_log(result); - rot4.transformVect(vec1);rot5.transformVect(vec12); - rot4.transformVect(vec2);rot5.transformVect(vec22); - rot4.transformVect(vec3);rot5.transformVect(vec32); - // these ones need higher tolerance due to rounding issues - result &= (vec1.equals(vec12, 0.000002f)); - assert_log(result); - result &= (vec2.equals(vec22)); - assert_log(result); - result &= (vec3.equals(vec32, 0.000002f)); - assert_log(result); - - rot1.setRotationDegrees(core::vector3df(0,0,34)); - rot2.setRotationDegrees(core::vector3df(0,43,0)); - vec1=(rot2*rot1).getRotationDegrees(); - result &= (vec1.equals(core::vector3df(27.5400505f, 34.4302292f, 42.6845398f), 0.000002f)); - assert_log(result); - - // corner cases - rot1.setRotationDegrees(irr::core::vector3df(180.0f, 0.f, 0.f)); - vec1=rot1.getRotationDegrees(); - result &= (vec1.equals(core::vector3df(180.0f, 0.f, 0.f), 0.000002f)); - assert_log(result); - rot1.setRotationDegrees(irr::core::vector3df(0.f, 180.0f, 0.f)); - vec1=rot1.getRotationDegrees(); - result &= (vec1.equals(core::vector3df(180.0f, 360, 180.0f), 0.000002f)); - assert_log(result); - rot1.setRotationDegrees(irr::core::vector3df(0.f, 0.f, 180.0f)); - vec1=rot1.getRotationDegrees(); - result &= (vec1.equals(core::vector3df(0.f, 0.f, 180.0f), 0.000002f)); - assert_log(result); - - rot1.makeIdentity(); - rot1.setRotationDegrees(core::vector3df(270.f,0,0)); - rot2.makeIdentity(); - rot2.setRotationDegrees(core::vector3df(-90.f,0,0)); - vec1=(rot1*rot2).getRotationDegrees(); - result &= (vec1.equals(core::vector3df(180.f, 0.f, 0.0f))); - assert_log(result); - - return result; -} - -// Test isOrthogonal -bool isOrthogonal(void) -{ - matrix4 rotationMatrix; - if (!rotationMatrix.isOrthogonal()) - { - logTestString("irr::core::matrix4::isOrthogonal() failed with Identity.\n"); - return false; - } - - rotationMatrix.setRotationDegrees(vector3df(90, 0, 0)); - if (!rotationMatrix.isOrthogonal()) - { - logTestString("irr::core::matrix4::isOrthogonal() failed with rotation.\n"); - return false; - } - - matrix4 translationMatrix; - translationMatrix.setTranslation(vector3df(0, 3, 0)); - if (translationMatrix.isOrthogonal()) - { - logTestString("irr::core::matrix4::isOrthogonal() failed with translation.\n"); - return false; - } - - matrix4 scaleMatrix; - scaleMatrix.setScale(vector3df(1, 2, 3)); - if (!scaleMatrix.isOrthogonal()) - { - logTestString("irr::core::matrix4::isOrthogonal() failed with scale.\n"); - return false; - } - - return true; -} - -bool checkMatrixRotation(irr::core::matrix4& m, const vector3df& vector, const vector3df& expectedResult) -{ - vector3df v(vector); - m.rotateVect(v); - if ( expectedResult.equals(v) ) - return true; - logTestString("checkMatrixRotation failed for vector %f %f %f. Expected %f %f %f, got %f %f %f \n" - , vector.X, vector.Y, vector.Z, expectedResult.X, expectedResult.Y, expectedResult.Z, v.X, v.Y, v.Z); - logTestString("matrix: "); - for ( int i=0; i<16; ++i ) - logTestString("%.2f ", m[i]); - logTestString("\n"); - - return false; -} - -bool setRotationAxis() -{ - matrix4 m; - vector3df v; - - // y up, x right, z depth (as usual) - - // y rotated around x-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(1,0,0)), vector3df(0,1,0), vector3df(0, 0, 1)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - if ( !checkMatrixRotation( m.setRotationAxisRadians(180.f*DEGTORAD, vector3df(1,0,0)), vector3df(0,1,0), vector3df(0, -1, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // y rotated around negative x-axis - m.makeIdentity(); - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(-1,0,0)), vector3df(0,1,0), vector3df(0, 0, -1)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // x rotated around x-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(1,0,0)), vector3df(1,0,0), vector3df(1, 0, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // x rotated around y-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(0,1,0)), vector3df(1,0,0), vector3df(0, 0, -1)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - if ( !checkMatrixRotation( m.setRotationAxisRadians(180.f*DEGTORAD, vector3df(0,1,0)), vector3df(1,0,0), vector3df(-1, 0, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // x rotated around negative y-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(0,-1,0)), vector3df(1,0,0), vector3df(0, 0, 1)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // y rotated around y-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(0,1,0)), vector3df(0,1,0), vector3df(0, 1, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // x rotated around z-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(0,0,1)), vector3df(1,0,0), vector3df(0, 1, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - if ( !checkMatrixRotation( m.setRotationAxisRadians(180.f*DEGTORAD, vector3df(0,0,1)), vector3df(1,0,0), vector3df(-1, 0, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // x rotated around negative z-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(0,0,-1)), vector3df(1,0,0), vector3df(0, -1, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // y rotated around z-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(0,0,1)), vector3df(0,1,0), vector3df(-1, 0, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - if ( !checkMatrixRotation( m.setRotationAxisRadians(180.f*DEGTORAD, vector3df(0,0,1)), vector3df(0,1,0), vector3df(0, -1, 0)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - // z rotated around z-axis - if ( !checkMatrixRotation( m.setRotationAxisRadians(90.f*DEGTORAD, vector3df(0,0,1)), vector3df(0,0,1), vector3df(0, 0, 1)) ) - { - logTestString("%s:%d", __FILE__, __LINE__); - return false; - } - - - return true; -} - -// just calling each function once to find compile problems -void calltest() -{ - matrix4 mat; - matrix4 mat2(mat); - f32& f1 = mat(0,0); - const f32& f2 = mat(0,0); - f32& f3 = mat[0]; - const f32& f4 = mat[0]; - mat = mat; - mat = 1.f; - const f32 * pf1 = mat.pointer(); - f32 * pf2 = mat.pointer(); - bool b = mat == mat2; - b = mat != mat2; - mat = mat + mat2; - mat += mat2; - mat = mat - mat2; - mat -= mat2; - mat.setbyproduct(mat, mat2); - mat.setbyproduct_nocheck(mat, mat2); - mat = mat * mat2; - mat *= mat2; - mat = mat * 10.f; - mat *= 10.f; - mat.makeIdentity(); - b = mat.isIdentity(); - b = mat.isOrthogonal(); - b = mat.isIdentity_integer_base (); - mat.setTranslation(vector3df(1.f, 1.f, 1.f) ); - vector3df v1 = mat.getTranslation(); - mat.setInverseTranslation(vector3df(1.f, 1.f, 1.f) ); - mat.setRotationRadians(vector3df(1.f, 1.f, 1.f) ); - mat.setRotationDegrees(vector3df(1.f, 1.f, 1.f) ); - vector3df v2 = mat.getRotationDegrees(); - mat.setInverseRotationRadians(vector3df(1.f, 1.f, 1.f) ); - mat.setInverseRotationDegrees(vector3df(1.f, 1.f, 1.f) ); - mat.setRotationAxisRadians(1.f, vector3df(1.f, 1.f, 1.f) ); - mat.setScale(vector3df(1.f, 1.f, 1.f) ); - mat.setScale(1.f); - vector3df v3 = mat.getScale(); - mat.inverseTranslateVect(v1); - mat.inverseRotateVect(v1); - mat.rotateVect(v1); - mat.rotateVect(v1, v2); - f32 fv3[3]; - mat.rotateVect(fv3, v1); - mat.transformVect(v1); - mat.transformVect(v1, v1); - f32 fv4[4]; - mat.transformVect(fv4, v1); - mat.transformVec3(fv3, fv3); - mat.translateVect(v1); - plane3df p1; - mat.transformPlane(p1); - mat.transformPlane(p1, p1); - aabbox3df bb1; - mat.transformBox(bb1); - mat.transformBoxEx(bb1); - mat.multiplyWith1x4Matrix(fv4); - mat.makeInverse(); - b = mat.getInversePrimitive(mat2); - b = mat.getInverse(mat2); - mat.buildProjectionMatrixPerspectiveFovRH(1.f, 1.f, 1.f, 1000.f); - mat.buildProjectionMatrixPerspectiveFovLH(1.f, 1.f, 1.f, 1000.f); - mat.buildProjectionMatrixPerspectiveFovInfinityLH(1.f, 1.f, 1.f); - mat.buildProjectionMatrixPerspectiveRH(100.f, 100.f, 1.f, 1000.f); - mat.buildProjectionMatrixPerspectiveLH(10000.f, 10000.f, 1.f, 1000.f); - mat.buildProjectionMatrixOrthoLH(10000.f, 10000.f, 1.f, 1000.f); - mat.buildProjectionMatrixOrthoRH(10000.f, 10000.f, 1.f, 1000.f); - mat.buildCameraLookAtMatrixLH(vector3df(1.f, 1.f, 1.f), vector3df(0.f, 0.f, 0.f), vector3df(0.f, 1.f, 0.f) ); - mat.buildCameraLookAtMatrixRH(vector3df(1.f, 1.f, 1.f), vector3df(0.f, 0.f, 0.f), vector3df(0.f, 1.f, 0.f) ); - mat.buildShadowMatrix(vector3df(1.f, 1.f, 1.f), p1); - core::rect a1(0,0,100,100); - mat.buildNDCToDCMatrix(a1, 1.f); - mat.interpolate(mat2, 1.f); - mat = mat.getTransposed(); - mat.getTransposed(mat2); - mat.buildRotateFromTo(vector3df(1.f, 1.f, 1.f), vector3df(1.f, 1.f, 1.f)); - mat.setRotationCenter(vector3df(1.f, 1.f, 1.f), vector3df(1.f, 1.f, 1.f)); - mat.buildAxisAlignedBillboard(vector3df(1.f, 1.f, 1.f), vector3df(1.f, 1.f, 1.f), vector3df(1.f, 1.f, 1.f), vector3df(1.f, 1.f, 1.f), vector3df(1.f, 1.f, 1.f)); - mat.buildTextureTransform( 1.f,vector2df(1.f, 1.f), vector2df(1.f, 1.f), vector2df(1.f, 1.f)); - mat.setTextureRotationCenter( 1.f ); - mat.setTextureTranslate( 1.f, 1.f ); - mat.setTextureTranslateTransposed(1.f, 1.f); - mat.setTextureScale( 1.f, 1.f ); - mat.setTextureScaleCenter( 1.f, 1.f ); - f32 fv16[16]; - mat.setM(fv16); - mat.setDefinitelyIdentityMatrix(false); - b = mat.getDefinitelyIdentityMatrix(); - b = mat.equals(mat2); - f1 = f1+f2+f3+f4+*pf1+*pf2; // getting rid of unused variable warnings. -} - -} - -bool matrixOps(void) -{ - bool result = true; - calltest(); - result &= identity(); - result &= rotations(); - result &= isOrthogonal(); - result &= transformations(); - result &= setRotationAxis(); - return result; -} - diff --git a/lib/irrlicht/tests/md2Animation.cpp b/lib/irrlicht/tests/md2Animation.cpp deleted file mode 100644 index 9feebd909..000000000 --- a/lib/irrlicht/tests/md2Animation.cpp +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -namespace -{ -// Tests MD2 animations. -/** At the moment, this just verifies that the last frame of the animation produces the expected bitmap. */ -bool testLastFrame() -{ - // Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions. - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, dimension2d(160, 120), 32); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - scene::IAnimatedMesh* mesh = smgr->getMesh("./media/sydney.md2"); - - bool result = (mesh != 0); - if (mesh) - { - scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh); - - if (node) - { - node->setPosition(vector3df(20, 0, 30)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMaterialTexture(0, driver->getTexture("./media/sydney.bmp")); - node->setLoopMode(false); - - (void)smgr->addCameraSceneNode(); - - // Just jump to the last frame since that's all we're interested in. - node->setMD2Animation(scene::EMAT_DEATH_FALLBACK); - node->setCurrentFrame((f32)(node->getEndFrame())); - node->setAnimationSpeed(0); - device->run(); - driver->beginScene(true, true, video::SColor(255, 255, 255, 0)); - smgr->drawAll(); - driver->endScene(); - if (mesh->getBoundingBox() != mesh->getMesh(node->getEndFrame())->getBoundingBox()) - { - logTestString("bbox of md2 mesh not updated.\n"); - result = false; - } - //TODO: Does not yet work, not sure if this is correct or not -#if 0 - if (node->getBoundingBox() != mesh->getMesh(node->getFrameNr())->getBoundingBox()) - { - logTestString("bbox of md2 scene node not updated.\n"); - result = false; - } -#endif - if (node->getTransformedBoundingBox() == core::aabbox3df()) - { - logTestString("md2 node returns empty bbox.\n"); - result = false; - } - } - } - - result &= takeScreenshotAndCompareAgainstReference(driver, "-md2Animation.png"); - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// Tests MD2 normals. -bool testNormals() -{ - // Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions. - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, dimension2d(160, 120), 32); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - scene::IAnimatedMesh* mesh = smgr->getMesh("./media/sydney.md2"); - - bool result = (mesh != 0); - if (mesh) - { - scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh); - if (node) - { - node->setPosition(vector3df(20, 0, 30)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setDebugDataVisible(scene::EDS_NORMALS); - node->setMaterialTexture(0, driver->getTexture("./media/sydney.bmp")); - node->setLoopMode(false); - - (void)smgr->addCameraSceneNode(); - - node->setMD2Animation(scene::EMAT_STAND); - node->setAnimationSpeed(0); - device->run(); - driver->beginScene(true, true, video::SColor(255, 255, 255, 0)); - smgr->drawAll(); - driver->endScene(); - } - } - - result &= takeScreenshotAndCompareAgainstReference(driver, "-md2Normals.png"); - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -} - -// test md2 features -bool md2Animation(void) -{ - bool result = testLastFrame(); - result &= testNormals(); - return result; -} diff --git a/lib/irrlicht/tests/media/Burning's Video-2dmatFilter.png b/lib/irrlicht/tests/media/Burning's Video-2dmatFilter.png deleted file mode 100644 index 489386c08..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-2dmatFilter.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-addBlend2D.png b/lib/irrlicht/tests/media/Burning's Video-addBlend2D.png deleted file mode 100644 index 2122aa356..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-addBlend2D.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-ambient-lighting.png b/lib/irrlicht/tests/media/Burning's Video-ambient-lighting.png deleted file mode 100644 index a49b3071e..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-ambient-lighting.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-b3dAnimation.png b/lib/irrlicht/tests/media/Burning's Video-b3dAnimation.png deleted file mode 100644 index 52feb695c..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-b3dAnimation.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-b3dJointPosition.png b/lib/irrlicht/tests/media/Burning's Video-b3dJointPosition.png deleted file mode 100644 index fc33f23c4..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-b3dJointPosition.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-billboard.png b/lib/irrlicht/tests/media/Burning's Video-billboard.png deleted file mode 100644 index 9892076a6..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-billboard.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-billboardOrientation.png b/lib/irrlicht/tests/media/Burning's Video-billboardOrientation.png deleted file mode 100644 index fb99360ff..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-billboardOrientation.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-draw2DImage4cFilter.png b/lib/irrlicht/tests/media/Burning's Video-draw2DImage4cFilter.png deleted file mode 100644 index a245525bb..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-draw2DImage4cFilter.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-draw2DImageRTT.png b/lib/irrlicht/tests/media/Burning's Video-draw2DImageRTT.png deleted file mode 100644 index dde350ff4..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-draw2DImageRTT.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-draw2DImageRect.png b/lib/irrlicht/tests/media/Burning's Video-draw2DImageRect.png deleted file mode 100644 index 652e784a0..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-draw2DImageRect.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawLine.png b/lib/irrlicht/tests/media/Burning's Video-drawLine.png deleted file mode 100644 index b3b2ea41e..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawLine.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawPixel.png b/lib/irrlicht/tests/media/Burning's Video-drawPixel.png deleted file mode 100644 index b7539cf8f..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawPixel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawRectOutline.png b/lib/irrlicht/tests/media/Burning's Video-drawRectOutline.png deleted file mode 100644 index ab97c508d..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawRectOutline.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_a.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_a.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_a.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_b.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_b.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_b.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_c.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_c.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_c.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_d.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_d.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_d.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_e.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_e.png deleted file mode 100644 index 3407a3a84..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_e.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_f.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_f.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_f.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_g.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_g.png deleted file mode 100644 index 057a8ae0b..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_g.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_h.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_h.png deleted file mode 100644 index a40295a35..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_h.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_i.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_i.png deleted file mode 100644 index 3a25fd09b..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_i.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_j.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_j.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_j.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-drawVPL_k.png b/lib/irrlicht/tests/media/Burning's Video-drawVPL_k.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-drawVPL_k.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-flyCircleAnimator.png b/lib/irrlicht/tests/media/Burning's Video-flyCircleAnimator.png deleted file mode 100644 index b54b98e42..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-flyCircleAnimator.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-guiDisabledMenu.png b/lib/irrlicht/tests/media/Burning's Video-guiDisabledMenu.png deleted file mode 100644 index b25bb937c..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-guiDisabledMenu.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-lightType.png b/lib/irrlicht/tests/media/Burning's Video-lightType.png deleted file mode 100644 index 161513a18..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-lightType.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-lightmaps.png b/lib/irrlicht/tests/media/Burning's Video-lightmaps.png deleted file mode 100644 index f53a7e36f..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-lightmaps.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-loadScene.png b/lib/irrlicht/tests/media/Burning's Video-loadScene.png deleted file mode 100644 index b68c91446..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-loadScene.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-makeColorKeyTexture-new.png b/lib/irrlicht/tests/media/Burning's Video-makeColorKeyTexture-new.png deleted file mode 100644 index a49dfbfac..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-makeColorKeyTexture-new.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-makeColorKeyTexture-old.png b/lib/irrlicht/tests/media/Burning's Video-makeColorKeyTexture-old.png deleted file mode 100644 index d584cd41e..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-makeColorKeyTexture-old.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-md2Animation.png b/lib/irrlicht/tests/media/Burning's Video-md2Animation.png deleted file mode 100644 index b9c5be6c3..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-md2Animation.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-md2Normals.png b/lib/irrlicht/tests/media/Burning's Video-md2Normals.png deleted file mode 100644 index 709b97e9e..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-md2Normals.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-meshTransform.png b/lib/irrlicht/tests/media/Burning's Video-meshTransform.png deleted file mode 100644 index e8abb00a3..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-meshTransform.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-multiTexture.png b/lib/irrlicht/tests/media/Burning's Video-multiTexture.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-multiTexture.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-orthoCam.png b/lib/irrlicht/tests/media/Burning's Video-orthoCam.png deleted file mode 100644 index 15fa5b043..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-orthoCam.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-pixelAccuracy.png b/lib/irrlicht/tests/media/Burning's Video-pixelAccuracy.png deleted file mode 100644 index 24190ef8f..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-pixelAccuracy.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-planeMatrix-scaledClip.png b/lib/irrlicht/tests/media/Burning's Video-planeMatrix-scaledClip.png deleted file mode 100644 index 14f6dc35b..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-planeMatrix-scaledClip.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-projMat.png b/lib/irrlicht/tests/media/Burning's Video-projMat.png deleted file mode 100644 index c1ff258ab..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-projMat.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-renderMipmap.png b/lib/irrlicht/tests/media/Burning's Video-renderMipmap.png deleted file mode 100644 index 06fc37f0f..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-renderMipmap.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-rttAndAntiAlias.png b/lib/irrlicht/tests/media/Burning's Video-rttAndAntiAlias.png deleted file mode 100644 index 37d65bd32..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-rttAndAntiAlias.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-rttAndText.png b/lib/irrlicht/tests/media/Burning's Video-rttAndText.png deleted file mode 100644 index cf7eaf189..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-rttAndText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-rttWith2DImage.png b/lib/irrlicht/tests/media/Burning's Video-rttWith2DImage.png deleted file mode 100644 index 4bb33fd67..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-rttWith2DImage.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-terrainGap.png b/lib/irrlicht/tests/media/Burning's Video-terrainGap.png deleted file mode 100644 index 835a946c6..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-terrainGap.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-terrainSceneNode-1.png b/lib/irrlicht/tests/media/Burning's Video-terrainSceneNode-1.png deleted file mode 100644 index ba53a2886..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-terrainSceneNode-1.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-terrainSceneNode-2.png b/lib/irrlicht/tests/media/Burning's Video-terrainSceneNode-2.png deleted file mode 100644 index 4c92f024c..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-terrainSceneNode-2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-testGeometryCreator.png b/lib/irrlicht/tests/media/Burning's Video-testGeometryCreator.png deleted file mode 100644 index b53705185..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-testGeometryCreator.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-testImageFormats.png b/lib/irrlicht/tests/media/Burning's Video-testImageFormats.png deleted file mode 100644 index 7efc85a14..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-testImageFormats.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-testTerrainMesh.png b/lib/irrlicht/tests/media/Burning's Video-testTerrainMesh.png deleted file mode 100644 index 53d0aa56c..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-testTerrainMesh.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-textureRenderStates.png b/lib/irrlicht/tests/media/Burning's Video-textureRenderStates.png deleted file mode 100644 index 98282fa1a..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-textureRenderStates.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-transparentAddColor.png b/lib/irrlicht/tests/media/Burning's Video-transparentAddColor.png deleted file mode 100644 index 87261e59d..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-transparentAddColor.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-transparentAlphaChannel.png b/lib/irrlicht/tests/media/Burning's Video-transparentAlphaChannel.png deleted file mode 100644 index 0986ed446..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-transparentAlphaChannel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-transparentAlphaChannelRef.png b/lib/irrlicht/tests/media/Burning's Video-transparentAlphaChannelRef.png deleted file mode 100644 index 09ff338bf..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-transparentAlphaChannelRef.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-transparentReflection2Layer.png b/lib/irrlicht/tests/media/Burning's Video-transparentReflection2Layer.png deleted file mode 100644 index 7acfba649..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-transparentReflection2Layer.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-transparentVertexAlpha.png b/lib/irrlicht/tests/media/Burning's Video-transparentVertexAlpha.png deleted file mode 100644 index b8f268c66..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-transparentVertexAlpha.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-transparentVertexAlphaChannelMore.png b/lib/irrlicht/tests/media/Burning's Video-transparentVertexAlphaChannelMore.png deleted file mode 100644 index 4dfaff0c6..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-transparentVertexAlphaChannelMore.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Burning's Video-viewPortText.png b/lib/irrlicht/tests/media/Burning's Video-viewPortText.png deleted file mode 100644 index 797cdaf02..000000000 Binary files a/lib/irrlicht/tests/media/Burning's Video-viewPortText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-addBlend2D.png b/lib/irrlicht/tests/media/Direct3D 8.1-addBlend2D.png deleted file mode 100644 index 2c9bba58a..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-addBlend2D.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-drawPixel.png b/lib/irrlicht/tests/media/Direct3D 8.1-drawPixel.png deleted file mode 100644 index c045fafd4..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-drawPixel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-lightType.png b/lib/irrlicht/tests/media/Direct3D 8.1-lightType.png deleted file mode 100644 index d8589532e..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-lightType.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-lightmaps.png b/lib/irrlicht/tests/media/Direct3D 8.1-lightmaps.png deleted file mode 100644 index dd35dc8c7..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-lightmaps.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-orthoCam.png b/lib/irrlicht/tests/media/Direct3D 8.1-orthoCam.png deleted file mode 100644 index 54d4118fc..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-orthoCam.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-rttWith2DImage.png b/lib/irrlicht/tests/media/Direct3D 8.1-rttWith2DImage.png deleted file mode 100644 index 93cf64108..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-rttWith2DImage.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-stencilSelfShadow.png b/lib/irrlicht/tests/media/Direct3D 8.1-stencilSelfShadow.png deleted file mode 100644 index c816ef05f..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-stencilSelfShadow.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-stencilShadow.png b/lib/irrlicht/tests/media/Direct3D 8.1-stencilShadow.png deleted file mode 100644 index 7b222b4b8..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-stencilShadow.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-textureMatrixInMixedScenes.png b/lib/irrlicht/tests/media/Direct3D 8.1-textureMatrixInMixedScenes.png deleted file mode 100644 index 187d3b8e6..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-textureMatrixInMixedScenes.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 8.1-textureRenderStates.png b/lib/irrlicht/tests/media/Direct3D 8.1-textureRenderStates.png deleted file mode 100644 index 98282fa1a..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 8.1-textureRenderStates.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-2dmatFilter.png b/lib/irrlicht/tests/media/Direct3D 9.0-2dmatFilter.png deleted file mode 100644 index c4e366cf4..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-2dmatFilter.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-addBlend2D.png b/lib/irrlicht/tests/media/Direct3D 9.0-addBlend2D.png deleted file mode 100644 index 2c9bba58a..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-addBlend2D.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImage4cFilter.png b/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImage4cFilter.png deleted file mode 100644 index 2b64f445b..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImage4cFilter.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImagePNG.png b/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImagePNG.png deleted file mode 100644 index 49a4e2ee4..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImagePNG.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImageRTT.png b/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImageRTT.png deleted file mode 100644 index dde350ff4..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImageRTT.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImageRect.png b/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImageRect.png deleted file mode 100644 index c89b00b8f..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-draw2DImageRect.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawLine.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawLine.png deleted file mode 100644 index b3b2ea41e..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawLine.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawPixel.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawPixel.png deleted file mode 100644 index 55668effa..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawPixel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawRectOutline.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawRectOutline.png deleted file mode 100644 index b53eeacf5..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawRectOutline.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_a.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_a.png deleted file mode 100644 index 41a6f2772..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_a.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_b.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_b.png deleted file mode 100644 index d765eeddc..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_b.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_c.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_c.png deleted file mode 100644 index 3d65f2951..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_c.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_d.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_d.png deleted file mode 100644 index 48fbe1eeb..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_d.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_e.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_e.png deleted file mode 100644 index ff03af90e..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_e.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_f.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_f.png deleted file mode 100644 index 94728d2ec..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_f.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_g.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_g.png deleted file mode 100644 index 7080559c7..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_g.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_h.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_h.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_h.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_i.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_i.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_i.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_j.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_j.png deleted file mode 100644 index a5666b7cc..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_j.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_k.png b/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_k.png deleted file mode 100644 index 41a6f2772..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-drawVPL_k.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-lightType.png b/lib/irrlicht/tests/media/Direct3D 9.0-lightType.png deleted file mode 100644 index d8589532e..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-lightType.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-lightmaps.png b/lib/irrlicht/tests/media/Direct3D 9.0-lightmaps.png deleted file mode 100644 index f53a7e36f..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-lightmaps.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-lineAntiAliasing.png b/lib/irrlicht/tests/media/Direct3D 9.0-lineAntiAliasing.png deleted file mode 100644 index 7d93bceac..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-lineAntiAliasing.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-mrt.png b/lib/irrlicht/tests/media/Direct3D 9.0-mrt.png deleted file mode 100644 index c3b6598c0..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-mrt.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-mrt2.png b/lib/irrlicht/tests/media/Direct3D 9.0-mrt2.png deleted file mode 100644 index 88f4e2090..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-mrt2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-multiTexture.png b/lib/irrlicht/tests/media/Direct3D 9.0-multiTexture.png deleted file mode 100644 index 4b891f950..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-multiTexture.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-orthoCam.png b/lib/irrlicht/tests/media/Direct3D 9.0-orthoCam.png deleted file mode 100644 index 54d4118fc..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-orthoCam.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-orthoStencil.png b/lib/irrlicht/tests/media/Direct3D 9.0-orthoStencil.png deleted file mode 100644 index bc24e2064..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-orthoStencil.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-pixelAccuracy.png b/lib/irrlicht/tests/media/Direct3D 9.0-pixelAccuracy.png deleted file mode 100644 index 24190ef8f..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-pixelAccuracy.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-polygonBack.png b/lib/irrlicht/tests/media/Direct3D 9.0-polygonBack.png deleted file mode 100644 index 76fb2e2d1..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-polygonBack.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-polygonFront.png b/lib/irrlicht/tests/media/Direct3D 9.0-polygonFront.png deleted file mode 100644 index 76fb2e2d1..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-polygonFront.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-projMat.png b/lib/irrlicht/tests/media/Direct3D 9.0-projMat.png deleted file mode 100644 index 06022a792..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-projMat.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-renderMipmap.png b/lib/irrlicht/tests/media/Direct3D 9.0-renderMipmap.png deleted file mode 100644 index 86e4fda68..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-renderMipmap.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-rttAndAntiAlias.png b/lib/irrlicht/tests/media/Direct3D 9.0-rttAndAntiAlias.png deleted file mode 100644 index bb482c221..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-rttAndAntiAlias.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-rttAndText.png b/lib/irrlicht/tests/media/Direct3D 9.0-rttAndText.png deleted file mode 100644 index f162da7bd..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-rttAndText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-rttWith2DImage.png b/lib/irrlicht/tests/media/Direct3D 9.0-rttWith2DImage.png deleted file mode 100644 index 93cf64108..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-rttWith2DImage.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-stencilSelfShadow.png b/lib/irrlicht/tests/media/Direct3D 9.0-stencilSelfShadow.png deleted file mode 100644 index 5cb17d2f0..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-stencilSelfShadow.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-stencilShadow.png b/lib/irrlicht/tests/media/Direct3D 9.0-stencilShadow.png deleted file mode 100644 index 45a75531c..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-stencilShadow.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrix.png b/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrix.png deleted file mode 100644 index d561bbd98..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrix.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrix2.png b/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrix2.png deleted file mode 100644 index 30aabf05e..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrix2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrixInMixedScenes.png b/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrixInMixedScenes.png deleted file mode 100644 index 187d3b8e6..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-textureMatrixInMixedScenes.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-textureRenderStates.png b/lib/irrlicht/tests/media/Direct3D 9.0-textureRenderStates.png deleted file mode 100644 index 98282fa1a..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-textureRenderStates.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-transparentAddColor.png b/lib/irrlicht/tests/media/Direct3D 9.0-transparentAddColor.png deleted file mode 100644 index cb741c490..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-transparentAddColor.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-transparentAlphaChannel.png b/lib/irrlicht/tests/media/Direct3D 9.0-transparentAlphaChannel.png deleted file mode 100644 index be28cc561..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-transparentAlphaChannel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-transparentAlphaChannelRef.png b/lib/irrlicht/tests/media/Direct3D 9.0-transparentAlphaChannelRef.png deleted file mode 100644 index 4f40301fb..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-transparentAlphaChannelRef.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-transparentReflection2Layer.png b/lib/irrlicht/tests/media/Direct3D 9.0-transparentReflection2Layer.png deleted file mode 100644 index ed1b45d38..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-transparentReflection2Layer.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-transparentVertexAlpha.png b/lib/irrlicht/tests/media/Direct3D 9.0-transparentVertexAlpha.png deleted file mode 100644 index 88e035833..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-transparentVertexAlpha.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-transparentVertexAlphaChannelMore.png b/lib/irrlicht/tests/media/Direct3D 9.0-transparentVertexAlphaChannelMore.png deleted file mode 100644 index ceb2a810f..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-transparentVertexAlphaChannelMore.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-ucpsphere.png b/lib/irrlicht/tests/media/Direct3D 9.0-ucpsphere.png deleted file mode 100644 index 103987a92..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-ucpsphere.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Direct3D 9.0-viewPortText.png b/lib/irrlicht/tests/media/Direct3D 9.0-viewPortText.png deleted file mode 100644 index c1cd92475..000000000 Binary files a/lib/irrlicht/tests/media/Direct3D 9.0-viewPortText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-createImage.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-createImage.png deleted file mode 100644 index 0ccc2bc43..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-createImage.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-draw2DImageRTT.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-draw2DImageRTT.png deleted file mode 100644 index 58a6e7611..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-draw2DImageRTT.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-draw2DImageRect.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-draw2DImageRect.png deleted file mode 100644 index 7b9fab1f0..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-draw2DImageRect.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawLine.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawLine.png deleted file mode 100644 index 8bcb70f37..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawLine.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawPixel.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawPixel.png deleted file mode 100644 index 9002faf8d..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawPixel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawRectOutline.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawRectOutline.png deleted file mode 100644 index 452d1642b..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawRectOutline.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_a.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_a.png deleted file mode 100644 index a41c6c5df..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_a.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_b.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_b.png deleted file mode 100644 index f693b2176..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_b.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_c.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_c.png deleted file mode 100644 index aed06c1db..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_c.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_d.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_d.png deleted file mode 100644 index 18833bdc8..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_d.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_e.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_e.png deleted file mode 100644 index a41c6c5df..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_e.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_f.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_f.png deleted file mode 100644 index 1f318f7ca..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_f.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_g.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_g.png deleted file mode 100644 index c66042e52..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_g.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_h.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_h.png deleted file mode 100644 index a41c6c5df..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_h.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_i.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_i.png deleted file mode 100644 index a41c6c5df..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_i.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_j.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_j.png deleted file mode 100644 index a41c6c5df..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_j.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_k.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_k.png deleted file mode 100644 index a41c6c5df..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-drawVPL_k.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-makeColorKeyTexture-new.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-makeColorKeyTexture-new.png deleted file mode 100644 index 20cc84e00..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-makeColorKeyTexture-new.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-makeColorKeyTexture-old.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-makeColorKeyTexture-old.png deleted file mode 100644 index 87dc6624b..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-makeColorKeyTexture-old.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-multiTexture.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-multiTexture.png deleted file mode 100644 index 8b4f3527a..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-multiTexture.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-pixelAccuracy.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-pixelAccuracy.png deleted file mode 100644 index 70a441dfd..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-pixelAccuracy.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-projMat.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-projMat.png deleted file mode 100644 index 4cb549d8d..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-projMat.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-rttAndText.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-rttAndText.png deleted file mode 100644 index 6c1659047..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-rttAndText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-rttWith2DImage.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-rttWith2DImage.png deleted file mode 100644 index 1a994bd93..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-rttWith2DImage.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-softwareDevice-rotatedClip.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-softwareDevice-rotatedClip.png deleted file mode 100644 index 9f7535991..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-softwareDevice-rotatedClip.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-textureRenderStates.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-textureRenderStates.png deleted file mode 100644 index 81853f215..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-textureRenderStates.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-viewPortText.png b/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-viewPortText.png deleted file mode 100644 index 0c2234eb6..000000000 Binary files a/lib/irrlicht/tests/media/Irrlicht Software Driver 1.0-viewPortText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/Monty.zip b/lib/irrlicht/tests/media/Monty.zip deleted file mode 100644 index 956c33c98..000000000 Binary files a/lib/irrlicht/tests/media/Monty.zip and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-2dmatFilter.png b/lib/irrlicht/tests/media/OpenGL-2dmatFilter.png deleted file mode 100644 index 75b59df68..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-2dmatFilter.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-addBlend2D.png b/lib/irrlicht/tests/media/OpenGL-addBlend2D.png deleted file mode 100644 index 09fd9bad4..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-addBlend2D.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-draw2DImage4cFilter.png b/lib/irrlicht/tests/media/OpenGL-draw2DImage4cFilter.png deleted file mode 100644 index 57ef58a87..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-draw2DImage4cFilter.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-draw2DImagePNG.png b/lib/irrlicht/tests/media/OpenGL-draw2DImagePNG.png deleted file mode 100644 index 4bec69307..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-draw2DImagePNG.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-draw2DImageRTT.png b/lib/irrlicht/tests/media/OpenGL-draw2DImageRTT.png deleted file mode 100644 index dde350ff4..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-draw2DImageRTT.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-draw2DImageRect.png b/lib/irrlicht/tests/media/OpenGL-draw2DImageRect.png deleted file mode 100644 index c89b00b8f..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-draw2DImageRect.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawLine.png b/lib/irrlicht/tests/media/OpenGL-drawLine.png deleted file mode 100644 index b3b2ea41e..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawLine.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawPixel.png b/lib/irrlicht/tests/media/OpenGL-drawPixel.png deleted file mode 100644 index 2f9f5811c..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawPixel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawRectOutline.png b/lib/irrlicht/tests/media/OpenGL-drawRectOutline.png deleted file mode 100644 index 274fc3c31..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawRectOutline.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_a.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_a.png deleted file mode 100644 index a302aee33..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_a.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_b.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_b.png deleted file mode 100644 index bd65e67d2..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_b.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_c.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_c.png deleted file mode 100644 index cac8dcb19..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_c.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_d.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_d.png deleted file mode 100644 index 3abc99f02..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_d.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_e.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_e.png deleted file mode 100644 index 840333010..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_e.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_f.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_f.png deleted file mode 100644 index deecccf75..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_f.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_g.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_g.png deleted file mode 100644 index ad1bd0da7..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_g.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_h.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_h.png deleted file mode 100644 index 1207bc01c..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_h.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_i.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_i.png deleted file mode 100644 index d3a296b6b..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_i.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_j.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_j.png deleted file mode 100644 index deecccf75..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_j.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-drawVPL_k.png b/lib/irrlicht/tests/media/OpenGL-drawVPL_k.png deleted file mode 100644 index 8e8d9bcfb..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-drawVPL_k.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-lightType.png b/lib/irrlicht/tests/media/OpenGL-lightType.png deleted file mode 100644 index 5e994bd28..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-lightType.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-lightmaps.png b/lib/irrlicht/tests/media/OpenGL-lightmaps.png deleted file mode 100644 index f53a7e36f..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-lightmaps.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-lineAntiAliasing.png b/lib/irrlicht/tests/media/OpenGL-lineAntiAliasing.png deleted file mode 100644 index 754568818..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-lineAntiAliasing.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-mrt.png b/lib/irrlicht/tests/media/OpenGL-mrt.png deleted file mode 100644 index c3b6598c0..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-mrt.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-mrt2.png b/lib/irrlicht/tests/media/OpenGL-mrt2.png deleted file mode 100644 index 88f4e2090..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-mrt2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-multiTexture.png b/lib/irrlicht/tests/media/OpenGL-multiTexture.png deleted file mode 100644 index 5eb8ae924..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-multiTexture.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-octree_select1.png b/lib/irrlicht/tests/media/OpenGL-octree_select1.png deleted file mode 100644 index 8129b4554..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-octree_select1.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-octree_select2.png b/lib/irrlicht/tests/media/OpenGL-octree_select2.png deleted file mode 100644 index 2fb50ef58..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-octree_select2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-orthoCam.png b/lib/irrlicht/tests/media/OpenGL-orthoCam.png deleted file mode 100644 index e0a32eca5..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-orthoCam.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-orthoStencil.png b/lib/irrlicht/tests/media/OpenGL-orthoStencil.png deleted file mode 100644 index 7f81c32fd..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-orthoStencil.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-pixelAccuracy.png b/lib/irrlicht/tests/media/OpenGL-pixelAccuracy.png deleted file mode 100644 index 24190ef8f..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-pixelAccuracy.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-polygonBack.png b/lib/irrlicht/tests/media/OpenGL-polygonBack.png deleted file mode 100644 index b6d577079..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-polygonBack.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-polygonFront.png b/lib/irrlicht/tests/media/OpenGL-polygonFront.png deleted file mode 100644 index 2d3da542b..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-polygonFront.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-projMat.png b/lib/irrlicht/tests/media/OpenGL-projMat.png deleted file mode 100644 index b39703729..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-projMat.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-renderMipmap.png b/lib/irrlicht/tests/media/OpenGL-renderMipmap.png deleted file mode 100644 index 699bbf473..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-renderMipmap.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-rttAndAntiAlias.png b/lib/irrlicht/tests/media/OpenGL-rttAndAntiAlias.png deleted file mode 100644 index 947362fc4..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-rttAndAntiAlias.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-rttAndText.png b/lib/irrlicht/tests/media/OpenGL-rttAndText.png deleted file mode 100644 index ca6b8198c..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-rttAndText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-rttWith2DImage.png b/lib/irrlicht/tests/media/OpenGL-rttWith2DImage.png deleted file mode 100644 index 93cf64108..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-rttWith2DImage.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-stencilSelfShadow.png b/lib/irrlicht/tests/media/OpenGL-stencilSelfShadow.png deleted file mode 100644 index 2b21fd86c..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-stencilSelfShadow.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-stencilShadow.png b/lib/irrlicht/tests/media/OpenGL-stencilShadow.png deleted file mode 100644 index 96f8601c1..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-stencilShadow.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-textureMatrix.png b/lib/irrlicht/tests/media/OpenGL-textureMatrix.png deleted file mode 100644 index 4cd34dc72..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-textureMatrix.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-textureMatrix2.png b/lib/irrlicht/tests/media/OpenGL-textureMatrix2.png deleted file mode 100644 index 5faaad751..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-textureMatrix2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-textureMatrixInMixedScenes.png b/lib/irrlicht/tests/media/OpenGL-textureMatrixInMixedScenes.png deleted file mode 100644 index 9e52511e3..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-textureMatrixInMixedScenes.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-texturePointer.png b/lib/irrlicht/tests/media/OpenGL-texturePointer.png deleted file mode 100644 index 4fbbbf718..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-texturePointer.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-textureRenderStates.png b/lib/irrlicht/tests/media/OpenGL-textureRenderStates.png deleted file mode 100644 index 98282fa1a..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-textureRenderStates.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-transparentAddColor.png b/lib/irrlicht/tests/media/OpenGL-transparentAddColor.png deleted file mode 100644 index f590388fe..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-transparentAddColor.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-transparentAlphaChannel.png b/lib/irrlicht/tests/media/OpenGL-transparentAlphaChannel.png deleted file mode 100644 index a99ad2c12..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-transparentAlphaChannel.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-transparentAlphaChannelRef.png b/lib/irrlicht/tests/media/OpenGL-transparentAlphaChannelRef.png deleted file mode 100644 index 3091a66ca..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-transparentAlphaChannelRef.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-transparentReflection2Layer.png b/lib/irrlicht/tests/media/OpenGL-transparentReflection2Layer.png deleted file mode 100644 index ed1b45d38..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-transparentReflection2Layer.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-transparentVertexAlpha.png b/lib/irrlicht/tests/media/OpenGL-transparentVertexAlpha.png deleted file mode 100644 index 71d71df23..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-transparentVertexAlpha.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-transparentVertexAlphaChannelMore.png b/lib/irrlicht/tests/media/OpenGL-transparentVertexAlphaChannelMore.png deleted file mode 100644 index a2dae6954..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-transparentVertexAlphaChannelMore.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-tri_select1.png b/lib/irrlicht/tests/media/OpenGL-tri_select1.png deleted file mode 100644 index 7f0f772fe..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-tri_select1.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-tri_select2.png b/lib/irrlicht/tests/media/OpenGL-tri_select2.png deleted file mode 100644 index 6abed2514..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-tri_select2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-tri_select3.png b/lib/irrlicht/tests/media/OpenGL-tri_select3.png deleted file mode 100644 index 27c5d0b3f..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-tri_select3.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-ucpsphere.png b/lib/irrlicht/tests/media/OpenGL-ucpsphere.png deleted file mode 100644 index 89cbd00f8..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-ucpsphere.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/OpenGL-viewPortText.png b/lib/irrlicht/tests/media/OpenGL-viewPortText.png deleted file mode 100644 index adacf93ca..000000000 Binary files a/lib/irrlicht/tests/media/OpenGL-viewPortText.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/RedbrushAlpha-0.25.png b/lib/irrlicht/tests/media/RedbrushAlpha-0.25.png deleted file mode 100644 index e17d5be97..000000000 Binary files a/lib/irrlicht/tests/media/RedbrushAlpha-0.25.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/attributes.xml b/lib/irrlicht/tests/media/attributes.xml deleted file mode 100644 index b2c73f25f..000000000 --- a/lib/irrlicht/tests/media/attributes.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/lib/irrlicht/tests/media/cdata.xml b/lib/irrlicht/tests/media/cdata.xml deleted file mode 100644 index dfcfa0c77..000000000 --- a/lib/irrlicht/tests/media/cdata.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - ]]> - ]]> - - - - diff --git a/lib/irrlicht/tests/media/enc.zip b/lib/irrlicht/tests/media/enc.zip deleted file mode 100755 index db5bcc715..000000000 Binary files a/lib/irrlicht/tests/media/enc.zip and /dev/null differ diff --git a/lib/irrlicht/tests/media/file_with_path.npk b/lib/irrlicht/tests/media/file_with_path.npk deleted file mode 100644 index cda73db74..000000000 Binary files a/lib/irrlicht/tests/media/file_with_path.npk and /dev/null differ diff --git a/lib/irrlicht/tests/media/file_with_path.zip b/lib/irrlicht/tests/media/file_with_path.zip deleted file mode 100644 index 8d301e627..000000000 Binary files a/lib/irrlicht/tests/media/file_with_path.zip and /dev/null differ diff --git a/lib/irrlicht/tests/media/file_with_path/mypath/myfile.txt b/lib/irrlicht/tests/media/file_with_path/mypath/myfile.txt deleted file mode 100644 index 19fe4276a..000000000 --- a/lib/irrlicht/tests/media/file_with_path/mypath/myfile.txt +++ /dev/null @@ -1 +0,0 @@ -1est diff --git a/lib/irrlicht/tests/media/file_with_path/mypath/mypath/myfile.txt b/lib/irrlicht/tests/media/file_with_path/mypath/mypath/myfile.txt deleted file mode 100644 index 75845e160..000000000 --- a/lib/irrlicht/tests/media/file_with_path/mypath/mypath/myfile.txt +++ /dev/null @@ -1 +0,0 @@ -2est \ No newline at end of file diff --git a/lib/irrlicht/tests/media/file_with_path/test/test.txt b/lib/irrlicht/tests/media/file_with_path/test/test.txt deleted file mode 100644 index cd0875583..000000000 --- a/lib/irrlicht/tests/media/file_with_path/test/test.txt +++ /dev/null @@ -1 +0,0 @@ -Hello world! diff --git a/lib/irrlicht/tests/media/fireball.png b/lib/irrlicht/tests/media/fireball.png deleted file mode 100644 index 7f41b3f6a..000000000 Binary files a/lib/irrlicht/tests/media/fireball.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/grey.tga b/lib/irrlicht/tests/media/grey.tga deleted file mode 100644 index 5186a61a0..000000000 Binary files a/lib/irrlicht/tests/media/grey.tga and /dev/null differ diff --git a/lib/irrlicht/tests/media/licenses.txt b/lib/irrlicht/tests/media/licenses.txt deleted file mode 100644 index b8c06bcf1..000000000 --- a/lib/irrlicht/tests/media/licenses.txt +++ /dev/null @@ -1,7 +0,0 @@ -All assets of this test suite, except where noted below, are tkane from the main Irrlicht repository and are copyright/licensed as stated there. The source code is copyright by the authors, except where stated differently inside the files. - -title_font.xml and its png files are taken from SuperTuxKart. They are in the public domain. - -The image RedbrushAlpha-0.25.png is Copyright 1999 Pieter S. van der Meulen. This image, including the alpha channel, may be used, edited and reproduced freely. - Taken from http://www.libpng.org/pub/png/png-RedbrushAlpha.html - diff --git a/lib/irrlicht/tests/media/lzmadata.zip b/lib/irrlicht/tests/media/lzmadata.zip deleted file mode 100644 index 3c257b1e6..000000000 Binary files a/lib/irrlicht/tests/media/lzmadata.zip and /dev/null differ diff --git a/lib/irrlicht/tests/media/sample_pakfile.pak b/lib/irrlicht/tests/media/sample_pakfile.pak deleted file mode 100644 index aa90ccad5..000000000 Binary files a/lib/irrlicht/tests/media/sample_pakfile.pak and /dev/null differ diff --git a/lib/irrlicht/tests/media/scene.irr b/lib/irrlicht/tests/media/scene.irr deleted file mode 100644 index c686f8cec..000000000 Binary files a/lib/irrlicht/tests/media/scene.irr and /dev/null differ diff --git a/lib/irrlicht/tests/media/scene2.irr b/lib/irrlicht/tests/media/scene2.irr deleted file mode 100644 index 98afb28a2..000000000 Binary files a/lib/irrlicht/tests/media/scene2.irr and /dev/null differ diff --git a/lib/irrlicht/tests/media/ter1.png b/lib/irrlicht/tests/media/ter1.png deleted file mode 100644 index 0675b2751..000000000 Binary files a/lib/irrlicht/tests/media/ter1.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/test.xml b/lib/irrlicht/tests/media/test.xml deleted file mode 100644 index d311c1aab..000000000 --- a/lib/irrlicht/tests/media/test.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/lib/irrlicht/tests/media/title_font.png b/lib/irrlicht/tests/media/title_font.png deleted file mode 100644 index f075aa2fb..000000000 Binary files a/lib/irrlicht/tests/media/title_font.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/title_font.xml b/lib/irrlicht/tests/media/title_font.xml deleted file mode 100644 index 32a6b0da7..000000000 Binary files a/lib/irrlicht/tests/media/title_font.xml and /dev/null differ diff --git a/lib/irrlicht/tests/media/title_font_2.png b/lib/irrlicht/tests/media/title_font_2.png deleted file mode 100644 index 2f4b0fb0c..000000000 Binary files a/lib/irrlicht/tests/media/title_font_2.png and /dev/null differ diff --git a/lib/irrlicht/tests/media/tools.png b/lib/irrlicht/tests/media/tools.png deleted file mode 100644 index b7e86c93a..000000000 Binary files a/lib/irrlicht/tests/media/tools.png and /dev/null differ diff --git a/lib/irrlicht/tests/meshLoaders.cpp b/lib/irrlicht/tests/meshLoaders.cpp deleted file mode 100644 index 2a828c3d2..000000000 --- a/lib/irrlicht/tests/meshLoaders.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -// Tests mesh loading features and the mesh cache. -/** This won't test render results. Currently, not all mesh loaders are tested. */ -bool meshLoaders(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_NULL, core::dimension2d(160, 120), 32); - assert_log(device); - if (!device) - return false; - - scene::ISceneManager * smgr = device->getSceneManager(); - scene::IAnimatedMesh* mesh = smgr->getMesh("../media/ninja.b3d"); - assert_log(mesh); - - bool result = (mesh != 0); - - if (mesh) - { - if (mesh != smgr->getMesh("../media/ninja.b3d")) - { - logTestString("Loading from same file results in different meshes!"); - result=false; - } - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/meshTransform.cpp b/lib/irrlicht/tests/meshTransform.cpp deleted file mode 100644 index aa15794ce..000000000 --- a/lib/irrlicht/tests/meshTransform.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (C) 2009-2012 Christian Stehno -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -// Tests mesh transformations via mesh manipulator. -bool meshTransform(void) -{ - // Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions. - IrrlichtDevice *device = createDevice(EDT_BURNINGSVIDEO, dimension2d(160, 120), 32); - assert_log(device); - if (!device) - return false; - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - - IMeshSceneNode* node1 = smgr->addCubeSceneNode(50); - IAnimatedMesh* amesh = smgr->getMesh("../media/sydney.md2"); - IAnimatedMesh* smesh = smgr->getMesh("../media/ninja.b3d"); - assert_log(node1 && amesh && smesh); - - bool result = false; - if (!node1 || !amesh || !smesh) - return false; - -// node1->setPosition(core::vector3df(-60,0,150)); - node1->setDebugDataVisible(scene::EDS_BBOX_ALL); - - IMeshSceneNode* node2 = smgr->addMeshSceneNode(amesh->getMesh(10)); - assert_log(node2); - - if (!node2) - return false; - -// node2->setPosition(core::vector3df(30,10,150)); - node2->setDebugDataVisible(scene::EDS_BBOX_ALL); - node2->setMaterialFlag(EMF_LIGHTING, false); - - IMeshSceneNode* node3 = smgr->addMeshSceneNode(smesh->getMesh(10)); - assert_log(node3); - - if (!node3) - return false; - -// node3->setPosition(core::vector3df(10,0,0)); - node3->setDebugDataVisible(scene::EDS_BBOX_ALL); - node3->setMaterialFlag(EMF_LIGHTING, false); - - smgr->addCameraSceneNode()->setPosition(core::vector3df(0,0,-20)); - - // Just jump to the last frame since that's all we're interested in. - device->run(); - driver->beginScene(true, true, SColor(255, 60, 60, 60)); - smgr->drawAll(); - driver->endScene(); - - core::matrix4 mat; - mat.setTranslation(core::vector3df(-60,0,150)); - driver->getMeshManipulator()->transform(node1->getMesh(), mat); - - mat.setTranslation(core::vector3df(30,10,150)); - driver->getMeshManipulator()->transform(node2->getMesh(), mat); - - mat.setTranslation(core::vector3df(10,0,0)); - driver->getMeshManipulator()->transform(node3->getMesh(), mat); - - // Just jump to the last frame since that's all we're interested in. - device->run(); - driver->beginScene(true, true, SColor(255, 60, 60, 60)); - smgr->drawAll(); - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-meshTransform.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/mrt.cpp b/lib/irrlicht/tests/mrt.cpp deleted file mode 100644 index 28d91c6aa..000000000 --- a/lib/irrlicht/tests/mrt.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -//! Tests rendering MRTs -static bool testWithDriver(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice (driverType, core::dimension2d < u32 > (220, 80)); - if (!device) - return true; // No error if device does not exist - - video::IVideoDriver* driver = device->getVideoDriver(); - // We need at least GLSL 1.10 or HLSL 1.1 -// if (driver->getDriverAttributes().getAttributeAsInt("ShaderLanguageVersion")<=100) -// return true; - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - const char* const ps1="struct PS_INPUT\n {\n float4 Position : POSITION0;\n };\n\n struct PS_OUTPUT\n {\n float4 Color : COLOR0;\n float4 Normal : COLOR1;\n float4 Depth : COLOR2;\n };\n PS_OUTPUT pixelMain( PS_INPUT Input )\n {\n PS_OUTPUT Output;\n Output.Color = float4(1.0,1.0,1.0,1.0);\n Output.Normal = float4(0.0,1.0,0.0,1.0);\n Output.Depth = float4(0.0,0.0,1.0,1.0);\n return Output;\n }"; - const char* const ps2="void main(void)\n {\n gl_FragData[0] = vec4(1.0,1.0,1.0,1.0);\n gl_FragData[1] = vec4(0.0,1.0,0.0,1.0);\n gl_FragData[2] = vec4(0.0,0.0,1.0,1.0);\n }"; - - // variable - video::ITexture* gbuffer[3]; - core::array gbufferlist; - const core::dimension2du texsize(64,64); - bool result=true; - s32 newMaterialType = -1; - - if (device->getVideoDriver()->getDriverAttributes().getAttributeAsInt("MaxMultipleRenderTargets") > 2) - { - // allocate buffer - gbuffer[0] = driver->addRenderTargetTexture(texsize, "rta", video::ECF_A8R8G8B8); - gbuffer[1] = driver->addRenderTargetTexture(texsize, "rtb", video::ECF_A8R8G8B8); - gbuffer[2] = driver->addRenderTargetTexture(texsize, "rtc", video::ECF_A8R8G8B8); - for( u32 i = 0; i < 3; ++i ) - gbufferlist.push_back( video::IRenderTarget(gbuffer[i]) ); - - video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices(); - - if (gpu) - { - newMaterialType = gpu->addHighLevelShaderMaterial( - 0, "vertexMain", video::EVST_VS_1_1, - driverType==video::EDT_DIRECT3D9?ps1:ps2, "pixelMain", video::EPST_PS_1_1); - } - } - - // shader creation succeeded - if (newMaterialType!=-1) - { - scene::ISceneNode* node = device->getSceneManager()->addCubeSceneNode(); - node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType); - device->getSceneManager()->addCameraSceneNode(0, core::vector3df(0,0,-10)); - - driver->beginScene (true, true, video::SColor (255, 200, 200, 200)); - // render - driver->setRenderTarget( gbufferlist ); - device->getSceneManager()->drawAll(); - driver->setRenderTarget(0); - - // draw debug rt - driver->draw2DImage(gbuffer[0], core::position2d(0,0)); - driver->draw2DImage(gbuffer[1], core::position2d(64,0)); - driver->draw2DImage(gbuffer[2], core::position2d(128,0)); - - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-mrt.png"); - - driver->beginScene (true, true, video::SColor (255, 200, 200, 200)); - // render - device->getSceneManager()->getActiveCamera()->setPosition(core::vector3df(0,0,-15)); - driver->setRenderTarget( gbufferlist ); - device->getSceneManager()->drawAll(); - driver->setRenderTarget(0); - - // draw debug rt - driver->draw2DImage(gbuffer[0], core::position2d(0,0)); - driver->draw2DImage(gbuffer[1], core::position2d(64,0)); - driver->draw2DImage(gbuffer[2], core::position2d(128,0)); - - driver->endScene(); - - result &= takeScreenshotAndCompareAgainstReference(driver, "-mrt2.png"); - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -bool mrt(void) -{ - bool result = true; - - TestWithAllHWDrivers(testWithDriver); - - return result; -} diff --git a/lib/irrlicht/tests/orthoCam.cpp b/lib/irrlicht/tests/orthoCam.cpp deleted file mode 100644 index cc395a980..000000000 --- a/lib/irrlicht/tests/orthoCam.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -static bool testOrthoCam(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice (driverType, core::dimension2d(160,120)); - if (!device) - return true; // No error if device does not exist - - stabilizeScreenBackground(device->getVideoDriver()); - - scene::ICameraSceneNode* cam = device->getSceneManager()->addCameraSceneNode(); - cam->setPosition(core::vector3df(500,200,-500)); - cam->setTarget(core::vector3df()); - cam->setProjectionMatrix(core::matrix4().buildProjectionMatrixOrthoLH(240,180,0.9f,2000.f), true); - - device->getSceneManager()->addAnimatedMeshSceneNode(device->getSceneManager()->addHillPlaneMesh("plane", core::dimension2df(32,32), core::dimension2du(16,16)));//->setMaterialFlag(video::EMF_WIREFRAME, true); - device->getSceneManager()->addCubeSceneNode(20.f)->setPosition(core::vector3df(50,20,50)); - device->getSceneManager()->addCubeSceneNode(20.f)->setPosition(core::vector3df(50,20,-50)); - device->getSceneManager()->addCubeSceneNode(20.f)->setPosition(core::vector3df(50,50,0)); - - device->getSceneManager()->addCubeSceneNode(20.f)->setPosition(core::vector3df(-50,10,0)); - device->getSceneManager()->addCubeSceneNode(20.f)->setPosition(core::vector3df(100,10,-100)); - device->getSceneManager()->addCubeSceneNode(20.f)->setPosition(core::vector3df(150,10,0)); - - scene::IAnimatedMeshSceneNode* node = device->getSceneManager()->addAnimatedMeshSceneNode(device->getSceneManager()->getMesh("../media/ninja.b3d"), 0, -1, core::vector3df(-50,2,-50), core::vector3df(),core::vector3df(5,5,5)); - node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); - node->setAnimationSpeed(0.f); - - scene::ILightSceneNode* light = device->getSceneManager()->addLightSceneNode(0, core::vector3df(0,100,0)); - light->setLightType(video::ELT_POINT); - light->setRadius(500.f); - light->getLightData().DiffuseColor.set(0,1,1); - - device->getVideoDriver()->beginScene (true, true, 0); - device->getSceneManager()->drawAll(); - device->getVideoDriver()->endScene(); - - const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoCam.png", 99.91f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -static bool testOrthoStencil(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice (driverType, core::dimension2d(160,120), 16, false, true); - if (!device) - return true; // No error if device does not exist - - stabilizeScreenBackground(device->getVideoDriver()); - - scene::ICameraSceneNode* cam = device->getSceneManager()->addCameraSceneNode(); - cam->setPosition(core::vector3df(300,250,-300)); - cam->setTarget(core::vector3df(0,20,0)); - cam->setProjectionMatrix(core::matrix4().buildProjectionMatrixOrthoLH(120,90,0.9f,2000.f), true); - - device->getSceneManager()->addAnimatedMeshSceneNode(device->getSceneManager()->addHillPlaneMesh("plane", core::dimension2df(32,32), core::dimension2du(16,16)));//->setMaterialFlag(video::EMF_WIREFRAME, true); - - scene::IAnimatedMeshSceneNode* node = device->getSceneManager()->addAnimatedMeshSceneNode(device->getSceneManager()->getMesh("../media/ninja.b3d"), 0, -1, core::vector3df(0,2,0), core::vector3df(),core::vector3df(5,5,5)); - node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); - node->addShadowVolumeSceneNode(); - node->setAnimationSpeed(0.f); - - scene::ILightSceneNode* light = device->getSceneManager()->addLightSceneNode(0, core::vector3df(100,150,100)); - light->setLightType(video::ELT_POINT); - light->setRadius(500.f); - light->getLightData().DiffuseColor.set(0,1,1); - - device->getVideoDriver()->beginScene (true, true, 0); - device->getSceneManager()->drawAll(); - device->getVideoDriver()->endScene(); - - const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoStencil.png", 99.91f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool orthoCam(void) -{ - bool passed = true; - - passed &= testOrthoCam(video::EDT_OPENGL); - // no lights in sw renderer -// passed &= testOrthoCam(video::EDT_SOFTWARE); - passed &= testOrthoCam(video::EDT_BURNINGSVIDEO); - passed &= testOrthoCam(video::EDT_DIRECT3D9); - passed &= testOrthoCam(video::EDT_DIRECT3D8); - - passed &= testOrthoStencil(video::EDT_OPENGL); - passed &= testOrthoStencil(video::EDT_DIRECT3D9); - - return passed; -} diff --git a/lib/irrlicht/tests/planeMatrix.cpp b/lib/irrlicht/tests/planeMatrix.cpp deleted file mode 100644 index 702cd3ddf..000000000 --- a/lib/irrlicht/tests/planeMatrix.cpp +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -// There's all sorts of minor and inevitable FP accuracy errors here, so use a sloppy comparison. -static bool sloppyComparePlanes(const plane3df plane1, const plane3df plane2) -{ - return(equals(plane1.D, plane2.D, 0.001f) && - equals(plane1.Normal.X, plane2.Normal.X, 0.001f) && - equals(plane1.Normal.Y, plane2.Normal.Y, 0.001f) && - equals(plane1.Normal.Z, plane2.Normal.Z, 0.001f)); -} - -static bool transformPlane(const vector3df & point, const vector3df & normal, - const matrix4 & matrix, const plane3df & expected) -{ - plane3df plane(point, vector3df(normal).normalize()); - - logTestString("\n Pre: (%.3ff,%.3ff,%.3ff), %.3ff\n", - plane.Normal.X, plane.Normal.Y, plane.Normal.Z, plane.D); - - matrix.transformPlane(plane); - - logTestString(" Post: (%.3ff,%.3ff,%.3ff), %.3ff\n", - plane.Normal.X, plane.Normal.Y, plane.Normal.Z, plane.D); - - logTestString("Expected: (%.3ff,%.3ff,%.3ff), %.3ff\n", - expected.Normal.X, expected.Normal.Y, expected.Normal.Z, expected.D); - - if(!sloppyComparePlanes(plane, expected)) - { - logTestString("Unexpected result\n"); - assert_log(false); - return false; - } - - return true; -} - - -static bool drawScaledOctree(void) -{ - bool result = false; - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, dimension2d(160, 120), 32); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - - bool added = device->getFileSystem()->addFileArchive("../media/map-20kdm2.pk3"); - assert_log(added); - - if(added) - { - ISceneNode * node = smgr->addOctreeSceneNode(smgr->getMesh("20kdm2.bsp")->getMesh(0), 0, -1, 1024); - assert_log(node); - - if (node) - { - node->setMaterialFlag(EMF_LIGHTING, false); - node->setPosition(core::vector3df(-1300,-820,-1249)); - node->setScale(core::vector3df(1, 5, 1)); - - (void)smgr->addCameraSceneNode(0, core::vector3df(0,0,0), core::vector3df(40,100,30)); - - driver->beginScene(true, true, video::SColor(255,255,255,0)); - smgr->drawAll(); - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-planeMatrix-scaledClip.png"); - } - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -// Test the ability to transform a plane with a matrix. -bool planeMatrix(void) -{ - matrix4 rotationMatrix; - rotationMatrix.setRotationDegrees(vector3df(90, 0, 0)); - - matrix4 translationMatrix; - translationMatrix.setTranslation(vector3df(0, 3, 0)); - - matrix4 scaleMatrix; - scaleMatrix.setScale(vector3df(1, 2, 3)); - - bool success = true; - - matrix4 matrix = rotationMatrix; - logTestString("\nRotation matrix\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f\n", - matrix[0], matrix[1], matrix[2], matrix[3], - matrix[4], matrix[5], matrix[6], matrix[7], - matrix[8], matrix[9], matrix[10], matrix[11], - matrix[12], matrix[13], matrix[14], matrix[15]); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-.707f, 0.f, -.707f), 0.f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(.707f, 0.f, .707f), 0.f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-.707f, 0.f, .707f), 0.f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(.707f, 0.f, -.707f), 0.f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-.707f, 0.f, -.707f), .707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(.707f, 0.f, .707f), -.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-.707f, 0.f, .707f), -.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(.707f, 0.f, -.707f), .707f)); - - - matrix = translationMatrix; - logTestString("\nTranslation matrix\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f\n", - matrix[0], matrix[1], matrix[2], matrix[3], - matrix[4], matrix[5], matrix[6], matrix[7], - matrix[8], matrix[9], matrix[10], matrix[11], - matrix[12], matrix[13], matrix[14], matrix[15]); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,-0.707f,0.000f), 2.121f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,0.707f,0.000f), -2.121f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,0.707f,0.000f), -2.121f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,-0.707f,0.000f), 2.121f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,-0.707f,0.000f), 2.828f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,0.707f,0.000f), -2.828f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,0.707f,0.000f), -2.828f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,-0.707f,0.000f), 2.828f)); - - - matrix = scaleMatrix; - logTestString("\nScale matrix\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f\n", - matrix[0], matrix[1], matrix[2], matrix[3], - matrix[4], matrix[5], matrix[6], matrix[7], - matrix[8], matrix[9], matrix[10], matrix[11], - matrix[12], matrix[13], matrix[14], matrix[15]); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,-0.354f,0.000f), -0.000f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,0.354f,0.000f), -0.000f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,0.354f,0.000f), -0.000f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,-0.354f,0.000f), -0.000f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,-0.354f,0.000f), 0.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,0.354f,0.000f), -0.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,0.354f,0.000f), -0.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,-0.354f,0.000f), 0.707f)); - - matrix = rotationMatrix * translationMatrix; - logTestString("\nRotation * translation matrix\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f\n", - matrix[0], matrix[1], matrix[2], matrix[3], - matrix[4], matrix[5], matrix[6], matrix[7], - matrix[8], matrix[9], matrix[10], matrix[11], - matrix[12], matrix[13], matrix[14], matrix[15]); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,0.000f,-0.707f), 2.121f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,-0.000f,0.707f), -2.121f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,-0.000f,0.707f), -2.121f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,0.000f,-0.707f), 2.121f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,0.000f,-0.707f), 2.828f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,-0.000f,0.707f), -2.828f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,-0.000f,0.707f), -2.828f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,0.000f,-0.707f), 2.828f)); - - matrix = rotationMatrix * scaleMatrix; - logTestString("\nRotation * scale matrix\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f\n", - matrix[0], matrix[1], matrix[2], matrix[3], - matrix[4], matrix[5], matrix[6], matrix[7], - matrix[8], matrix[9], matrix[10], matrix[11], - matrix[12], matrix[13], matrix[14], matrix[15]); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,0.000f,-0.354f), -0.000f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,-0.000f,0.354f), -0.000f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,-0.000f,0.354f), -0.000f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,0.000f,-0.354f), -0.000f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,0.000f,-0.354f), 0.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,-0.000f,0.354f), -0.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,-0.000f,0.354f), -0.707f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,0.000f,-0.354f), 0.707f)); - - matrix = translationMatrix * scaleMatrix; - logTestString("\nTranslation * scale matrix\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f\n", - matrix[0], matrix[1], matrix[2], matrix[3], - matrix[4], matrix[5], matrix[6], matrix[7], - matrix[8], matrix[9], matrix[10], matrix[11], - matrix[12], matrix[13], matrix[14], matrix[15]); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,-0.354f,0.000f), 1.061f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,0.354f,0.000f), -1.061f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,0.354f,0.000f), -1.061f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,-0.354f,0.000f), 1.061f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,-0.354f,0.000f), 1.768f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,0.354f,0.000f), -1.768f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,0.354f,0.000f), -1.768f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,-0.354f,0.000f), 1.768f)); - - matrix = rotationMatrix * translationMatrix * scaleMatrix; - logTestString("\nRotation * translation * scale matrix\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f" - "\n%02.02f %02.02f %02.02f %02.02f\n", - matrix[0], matrix[1], matrix[2], matrix[3], - matrix[4], matrix[5], matrix[6], matrix[7], - matrix[8], matrix[9], matrix[10], matrix[11], - matrix[12], matrix[13], matrix[14], matrix[15]); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,0.000f,-0.354f), 1.061f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,-0.000f,0.354f), -1.061f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,-0.000f,0.354f), -1.061f)); - success &= transformPlane(vector3df(0, 0, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,0.000f,-0.354f), 1.061f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, -1, 0), matrix, plane3df(vector3df(-0.707f,0.000f,-0.354f), 1.768f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, 1, 0), matrix, plane3df(vector3df(0.707f,-0.000f,0.354f), -1.768f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(-1, 1, 0), matrix, plane3df(vector3df(-0.707f,-0.000f,0.354f), -1.768f)); - success &= transformPlane(vector3df(0, 1, 0), vector3df(1, -1, 0), matrix, plane3df(vector3df(0.707f,0.000f,-0.354f), 1.768f)); - - success &= drawScaledOctree(); - - return success; -} - diff --git a/lib/irrlicht/tests/projectionMatrix.cpp b/lib/irrlicht/tests/projectionMatrix.cpp deleted file mode 100644 index 3c85bedc8..000000000 --- a/lib/irrlicht/tests/projectionMatrix.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -//! Tests projection matrices -static bool runTestWithDriver(E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - bool result = true; - - driver->beginScene(true, false, SColor(255,0,0,0)); - - SMaterial mat; - mat.MaterialType = EMT_SOLID; - mat.Lighting = false; - mat.ZBuffer = false; - mat.ZWriteEnable = false; - mat.Thickness = 1; - - driver->setMaterial(mat); - - core::dimension2d dims(driver->getCurrentRenderTargetSize()); - //apply custom projection, no offset - core::matrix4 pmtx = matrix4().buildProjectionMatrixOrthoLH(dims.Width, dims.Height, 0, 100); - driver->setTransform(ETS_PROJECTION, pmtx); - driver->setTransform(ETS_VIEW, matrix4()); - driver->setTransform(ETS_WORLD, matrix4()); - - //the red cross appears at center - for (u32 i=0; i<10; ++i) - { - driver->draw3DLine(vector3df(0.f+i,-50.f,1.f), vector3df(0.f+i,50.f,1.f), SColor(255,255,0,0)); - driver->draw3DLine(vector3df(-50.f,0.f+i,1.f), vector3df(50.f,0.f+i,1.f), SColor(255,255,0,0)); - } - - //apply custom projection, offset to right-top - pmtx.setTranslation(vector3df(0.7f, 0.7f, 0.f)); - driver->setTransform(ETS_PROJECTION, pmtx); - driver->setTransform(ETS_VIEW, matrix4()); - driver->setTransform(ETS_WORLD, matrix4()); - - //The green cross must be in right-top corner. But for OpenGL driver it is in left-top corner - for (u32 i=0; i<10; ++i) - { - driver->draw3DLine(vector3df(0.f+i,-50,1), vector3df(0.f+i,50,1), SColor(255,0,255,0)); - driver->draw3DLine(vector3df(-50,0.f+i,1), vector3df(50,0.f+i,1), SColor(255,0,255,0)); - } - - driver->endScene(); - - result = takeScreenshotAndCompareAgainstReference(driver, "-projMat.png", 98.71f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -bool projectionMatrix(void) -{ - bool result = true; - - // TODO: Seems that software driver does not handle this projection matrix - TestWithAllDrivers(runTestWithDriver); - - return result; -} diff --git a/lib/irrlicht/tests/removeCustomAnimator.cpp b/lib/irrlicht/tests/removeCustomAnimator.cpp deleted file mode 100644 index 9a69e00b3..000000000 --- a/lib/irrlicht/tests/removeCustomAnimator.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; - -class CustomAnimator : public ISceneNodeAnimator -{ - void animateNode(ISceneNode* node, u32 timeMs) - { - // Check that I can remove myself from my node durings its animateNode() loop. - node->removeAnimator(this); - } - - ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0) { return 0 ; } -}; - - -/** Test that a custom animator can remove itself cleanly from an ISceneNode during its - * own animateNode() loop. - * http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=32271 */ -bool removeCustomAnimator(void) -{ - IrrlichtDevice * device = irr::createDevice(video::EDT_NULL, dimension2du(160, 120)); - assert_log(device); - if(!device) - return false; - - ISceneManager * smgr = device->getSceneManager(); - - ISceneNode * node = smgr->addEmptySceneNode(); - CustomAnimator * instantlyElapsing1 = new CustomAnimator(); - CustomAnimator * instantlyElapsing2 = new CustomAnimator(); - node->addAnimator(instantlyElapsing1); - node->addAnimator(instantlyElapsing2); - - // This should result in both custom animators being removed and - // deleted cleanly, without a crash. - node->OnAnimate(0); - - device->closeDevice(); - device->run(); - device->drop(); - - // If we didn't crash, then the test passed. - return true; -} - - diff --git a/lib/irrlicht/tests/renderTargetTexture.cpp b/lib/irrlicht/tests/renderTargetTexture.cpp deleted file mode 100644 index 93bfed1cc..000000000 --- a/lib/irrlicht/tests/renderTargetTexture.cpp +++ /dev/null @@ -1,588 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -//! Tests rendering RTTs with draw2DImage -/** This test is very special in its setup, problematic situation was found by stefbuet. */ -static bool testWith2DImage(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice(driverType, core::dimension2d (128, 128)); - if (!device) - return true; // No error if device does not exist - - video::IVideoDriver *driver = device->getVideoDriver (); - scene::ISceneManager *smgr = device->getSceneManager (); - - if (!driver->queryFeature(video::EVDF_RENDER_TO_TARGET)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - video::ITexture *image = driver->getTexture ("../media/irrlichtlogo2.png"); - video::ITexture *RTT_texture = driver->addRenderTargetTexture (core::dimension2d < u32 > (128, 128)); - - smgr->addCameraSceneNode (0, core::vector3df (100, 100, 100), - core::vector3df (0, 0, 0)); - - /*to reproduce the bug : - -draw the image : it's normal - -apply an RTT texture to a model - -remove the model - -draw the image again : it's flipped - */ - - video::SColor colors[4]={0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}; - //draw the image : - driver->beginScene (true, true, video::SColor (255, 200, 200, 200)); - driver->draw2DImage (image, - core::rect < s32 > - (64 - image->getSize ().Width / 2, - 64 - image->getSize ().Height / 2, - 64 + image->getSize ().Width / 2, - 64 + image->getSize ().Height / 2), - core::rect < s32 > (0, 0, image->getSize ().Width, - image->getSize ().Height), 0, colors, - true); - driver->endScene (); - - //then create a model and apply to it the RTT Texture - //rendering the model is important, if not rendered 1 time, bug won't appear. - //after the render, we remove the node : important, if not done, bug won't appear too. - scene::IMesh *modelMesh = smgr->getMesh ("../media/earth.x"); - scene::ISceneNode *modelNode = smgr->addMeshSceneNode(modelMesh); - modelNode->setMaterialTexture (0, RTT_texture); - - driver->beginScene (true, true, video::SColor (255, 200, 200, 200)); - smgr->drawAll(); - driver->endScene(); - - modelNode->remove(); - - //then we render the image normaly - //it's now fliped... - for (u32 i=0; i<10; ++i) - { - driver->beginScene (true, true, video::SColor (255, 200, 200, 200)); - - //draw img - driver->draw2DImage (image, - core::rect < s32 > - (64 - image->getSize ().Width / 2, - 64 - image->getSize ().Height / 2, - 64 + image->getSize ().Width / 2, - 64 + image->getSize ().Height / 2), - core::rect < s32 > (0, 0, image->getSize ().Width, - image->getSize ().Height), 0, - colors, true); - - //call this is important : - //if not called, the bug won't appear - smgr->drawAll(); - - driver->endScene(); - } - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-rttWith2DImage.png", 99.9f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -bool rttAndZBuffer(video::E_DRIVER_TYPE driverType) -{ - SIrrlichtCreationParameters cp; - cp.WindowSize.set(160,120); - cp.Bits = 32; - cp.AntiAlias = 4; - cp.DriverType = driverType; - - IrrlichtDevice* nullDevice = createDevice(video::EDT_NULL); - cp.WindowSize = nullDevice->getVideoModeList()->getDesktopResolution(); - nullDevice->closeDevice(); - nullDevice->run(); - nullDevice->drop(); - - cp.WindowSize -= core::dimension2d(100, 100); - - IrrlichtDevice* device = createDeviceEx(cp); - if (!device) - return true; - - video::IVideoDriver* vd = device->getVideoDriver(); - scene::ISceneManager* sm = device->getSceneManager(); - - if (!vd->queryFeature(video::EVDF_RENDER_TO_TARGET)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(vd); - - logTestString("Testing driver %ls\n", vd->getName()); - - video::ITexture* rt = vd->addRenderTargetTexture(cp.WindowSize, "rt", video::ECF_A32B32G32R32F); - video::S3DVertex vertices[4]; - vertices[0].Pos.Z = vertices[1].Pos.Z = vertices[2].Pos.Z = vertices[3].Pos.Z = 1.0f; - vertices[0].Pos.Y = vertices[1].Pos.Y = 1.0f; - vertices[2].Pos.Y = vertices[3].Pos.Y = -1.0f; - vertices[0].Pos.X = vertices[3].Pos.X = -1.0f; - vertices[1].Pos.X = vertices[2].Pos.X = 1.0f; - vertices[0].TCoords.Y = vertices[1].TCoords.Y = 0.0f; - vertices[2].TCoords.Y = vertices[3].TCoords.Y = 1.0f; - vertices[0].TCoords.X = vertices[3].TCoords.X = 1.0f; - vertices[1].TCoords.X = vertices[2].TCoords.X = 0.0f; - - u16 indices[6] = {0, 1, 3, 1, 2, 3}; - - video::SMaterial rtMat; - rtMat.BackfaceCulling = false; - rtMat.Lighting = false; - rtMat.TextureLayer[0].TextureWrapU = - rtMat.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE; - - sm->addLightSceneNode(NULL, core::vector3df(0, 50, 0), - video::SColorf(1, 1, 1), 100); - - sm->addCameraSceneNode(NULL, core::vector3df(0, 10, 0)); - - const scene::IGeometryCreator* geom = sm->getGeometryCreator(); - scene::IMeshManipulator* manip = sm->getMeshManipulator(); - scene::IMesh* mesh; - scene::ISceneNode* node; - - mesh = geom->createCubeMesh(core::vector3df(10, 10, 10)); - manip->setVertexColors(mesh, video::SColor(255, 0, 0, 255)); - node = sm->addMeshSceneNode(mesh, NULL, -1, core::vector3df(0, 0, 30)); - node->getMaterial(0).EmissiveColor = video::SColor(255, 0, 0, 30); - mesh->drop(); - - mesh = geom->createSphereMesh(5.0f, 32, 32); - node = sm->addMeshSceneNode(mesh, NULL, -1, core::vector3df(0, 0, 50)); - node->getMaterial(0).EmissiveColor = video::SColor(255, 30, 30, 30); - mesh->drop(); - - mesh = geom->createConeMesh(5.0f, 10.0f, 32, video::SColor(255, 255, 0, 0), video::SColor(255, 255, 0, 0)); - node = sm->addMeshSceneNode(mesh, NULL, -1, core::vector3df(0, 0, 70)); - node->getMaterial(0).EmissiveColor = video::SColor(255, 30, 0, 0); - mesh->drop(); - - { - vd->beginScene(true, true, video::SColor(255, 0, 0, 0)); - vd->setRenderTarget(rt); - sm->drawAll(); - vd->setRenderTarget(NULL); - vd->setTransform(video::ETS_WORLD, core::IdentityMatrix); - vd->setTransform(video::ETS_VIEW, core::IdentityMatrix); - vd->setTransform(video::ETS_PROJECTION, core::IdentityMatrix); - rtMat.setTexture(0, rt); - vd->setMaterial(rtMat); - vd->drawIndexedTriangleList(vertices, 4, indices, 2); - vd->endScene(); - } - bool result = takeScreenshotAndCompareAgainstReference(vd, "-rttAndZBuffer.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -// result should be two times the same blind text on the left side, and -// the fireball image (with a very small text inside) in the middle of the screen -// drivers that don't support image scaling will show a pink background instead -bool rttAndText(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice* device = createDevice(driverType, core::dimension2d(160, 120)); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - gui::IGUIEnvironment* guienv = device->getGUIEnvironment(); - - if (!driver->queryFeature(video::EVDF_RENDER_TO_TARGET)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - logTestString("Testing driver %ls\n", driver->getName()); - - //RTT - video::ITexture* rt = driver->addRenderTargetTexture(core::dimension2d(256, 256), "rt"); - if (!rt) - { - device->closeDevice(); - device->run(); - device->drop(); - return false; - } - - stabilizeScreenBackground(driver); - - driver->beginScene(true, true, video::SColor(255,255, 255, 255)); - driver->setRenderTarget(rt, true, true, video::SColor(255,255,0,255)); - driver->draw2DImage(driver->getTexture("../media/fireball.bmp"), core::recti(0, 0,rt->getSize().Width,rt->getSize().Height), core::recti(0,0,64,64)); - guienv->getBuiltInFont()->draw(L"OMGGG =!", core::rect(120, 100, 256, 256), video::SColor(255, 0, 0, 255)); - driver->setRenderTarget(0); - driver->endScene(); - - scene::ISceneManager* smgr = device->getSceneManager(); - - scene::ISceneNode* cube = smgr->addCubeSceneNode(20); - cube->setMaterialFlag(video::EMF_LIGHTING, false); - cube->setMaterialTexture(0, rt); // set material of cube to render target - - smgr->addCameraSceneNode(0, core::vector3df(0, 0, -30)); - - // create a long text to produce much difference in failing result pictures - gui::IGUIStaticText* text = guienv->addStaticText(L"asdddddddoamgmoasmgom\nfoaomsodommogdd\nddddddddd", core::rect(10, 20, 100, 160)); - - driver->beginScene(true, true, video::SColor(255,255, 255, 255)); - cube->setVisible(false); - smgr->drawAll(); - guienv->drawAll(); - - cube->setVisible(true); - smgr->drawAll(); - video::SMaterial mat(cube->getMaterial(0)); - driver->setMaterial(mat); - text->setRelativePosition(core::position2di(10,30)); - guienv->drawAll(); - - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-rttAndText.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -static void Render(IrrlichtDevice* device, video::ITexture* rt, core::vector3df& pos1, - core::vector3df& pos2, scene::IAnimatedMesh* sphereMesh, core::vector3df& pos3, core::vector3df& pos4) -{ - video::IVideoDriver* driver = device->getVideoDriver(); - driver->setRenderTarget(rt); - device->getSceneManager()->drawAll(); - - video::SMaterial mat; - mat.ColorMaterial=video::ECM_NONE; - mat.AmbientColor.set(255, 80, 80, 80); - mat.DiffuseColor.set(255, 120, 30, 210); - mat.SpecularColor.set(255,80,80,80); - mat.Shininess = 8.f; - - core::matrix4 m; - m.setTranslation(pos1); - driver->setTransform(video::ETS_WORLD, m); - driver->setMaterial(mat); - driver->drawMeshBuffer(sphereMesh->getMeshBuffer(0)); - - m.setTranslation(pos2); - mat.Shininess=0.f; - driver->setTransform(video::ETS_WORLD, m); - driver->setMaterial(mat); - driver->drawMeshBuffer(sphereMesh->getMeshBuffer(0)); - - m.setTranslation(pos3); - mat.Shininess=8.f; - driver->setTransform(video::ETS_WORLD, m); - driver->setMaterial(mat); - driver->drawMeshBuffer(sphereMesh->getMeshBuffer(0)); - - m.setTranslation(pos4); - mat.Shininess=0.f; - driver->setTransform(video::ETS_WORLD, m); - driver->setMaterial(mat); - driver->drawMeshBuffer(sphereMesh->getMeshBuffer(0)); -} - -bool rttAndAntiAliasing(video::E_DRIVER_TYPE driverType) -{ - SIrrlichtCreationParameters cp; - cp.DriverType = driverType; - cp.WindowSize = core::dimension2di(160, 120); - cp.AntiAlias = 2; - cp.Vsync = true; - - IrrlichtDevice* device = createDeviceEx(cp); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - if ((driver->getDriverAttributes().getAttributeAsInt("AntiAlias")<2) || - (!driver->queryFeature(video::EVDF_RENDER_TO_TARGET))) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - // sphere mesh - scene::IAnimatedMesh* sphereMesh = device->getSceneManager()->addSphereMesh("atom", 1, 32, 32); - - // cam - scene::ICameraSceneNode* cam = device->getSceneManager()->addCameraSceneNode(NULL, core::vector3df(0, 1, -5), core::vector3df(0, 0, 0)); - cam->setNearValue(0.01f); - cam->setFarValue(100.f); - cam->updateAbsolutePosition(); - device->getSceneManager()->setActiveCamera(cam); - device->getSceneManager()->addLightSceneNode(0, core::vector3df(10,10,10)); - device->getSceneManager()->setAmbientLight(video::SColorf(0.3f,0.3f,0.3f)); - - float radius = 3.f; - core::vector3df pos1(-radius,0,0); - core::vector3df pos2(radius,0,0); - core::vector3df pos3(0,0,radius); - core::vector3df pos4(0,0,-radius); - core::matrix4 m; - - gui::IGUIStaticText* st = device->getGUIEnvironment()->addStaticText(L"", core::recti(0,0,200,20), false, false); - st->setOverrideColor(video::SColor(255,255,255,0)); - - core::dimension2du dim_txt = core::dimension2du(160/2, 120/2); - - video::ITexture* rt1 = device->getVideoDriver()->addRenderTargetTexture(dim_txt, "rt1", device->getColorFormat()); - video::ITexture* rt2 = device->getVideoDriver()->addRenderTargetTexture(dim_txt, "rt2", device->getColorFormat()); - video::ITexture* rt3 = device->getVideoDriver()->addRenderTargetTexture(dim_txt, "rt3", video::ECF_A8R8G8B8); - video::ITexture* rt4 = device->getVideoDriver()->addRenderTargetTexture(dim_txt, "rt4", device->getColorFormat()); - - device->getSceneManager()->setActiveCamera(cam); - device->getVideoDriver()->beginScene(); -#if 1 - st->setText(L"Texture Rendering"); - Render(device, rt1, pos1, pos2, sphereMesh, pos3, pos4); - Render(device, rt2, pos1, pos2, sphereMesh, pos3, pos4); - Render(device, rt3, pos1, pos2, sphereMesh, pos3, pos4); - Render(device, rt4, pos1, pos2, sphereMesh, pos3, pos4); - - device->getVideoDriver()->setRenderTarget(0); - device->getVideoDriver()->draw2DImage(rt1, core::position2di(0,0)); - device->getVideoDriver()->draw2DImage(rt2, core::position2di(80,0)); - device->getVideoDriver()->draw2DImage(rt3, core::position2di(0,60)); - device->getVideoDriver()->draw2DImage(rt4, core::position2di(80,60)); -#else - ITexture* rt0 = NULL; - Render(device, rt0, pos1, pos2, sphereMesh, pos3, pos4); -#endif - st->draw(); - device->getVideoDriver()->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-rttAndAntiAlias.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool rttFormats(video::E_DRIVER_TYPE driverType) -{ - SIrrlichtCreationParameters cp; - cp.DriverType = driverType; - cp.WindowSize = core::dimension2di(160, 120); - - IrrlichtDevice* device = createDeviceEx(cp); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - - logTestString("Testing driver %ls\n", driver->getName()); - - video::ITexture* tex = 0; - - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_A1R5G5B5); - if (tex) - { - if (tex->getColorFormat() != video::ECF_A1R5G5B5) - logTestString("Format changed: ECF_A1R5G5B5 to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_A1R5G5B5\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_A1R5G5B5\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_R5G6B5); - if (tex) - { - if (tex->getColorFormat() != video::ECF_R5G6B5) - logTestString("Format changed: ECF_R5G6B5 to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_R5G6B5\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_R5G6B5\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_R8G8B8); - if (tex) - { - if (tex->getColorFormat() != video::ECF_R8G8B8) - logTestString("Format changed: ECF_R8G8B8 to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_R8G8B8\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_R8G8B8\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_A8R8G8B8); - if (tex) - { - if (tex->getColorFormat() != video::ECF_A8R8G8B8) - logTestString("Format changed: ECF_A8R8G8B8 to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_A8R8G8B8\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_A8R8G8B8\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_R16F); - if (tex) - { - if (tex->getColorFormat() != video::ECF_R16F) - logTestString("Format changed: ECF_R16F to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_R16F\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_R16F\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_G16R16F); - if (tex) - { - if (tex->getColorFormat() != video::ECF_G16R16F) - logTestString("Format changed: ECF_G16R16F to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_G16R16F\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_G16R16F\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_A16B16G16R16F); - if (tex) - { - if (tex->getColorFormat() != video::ECF_A16B16G16R16F) - logTestString("Format changed: ECF_A16B16G16R16F to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_A16B16G16R16F\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_A16B16G16R16F\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_R32F); - if (tex) - { - if (tex->getColorFormat() != video::ECF_R32F) - logTestString("Format changed: ECF_R32F to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_R32F\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_R32F\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_G32R32F); - if (tex) - { - if (tex->getColorFormat() != video::ECF_G32R32F) - logTestString("Format changed: ECF_G32R32F to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_G32R32F\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_G32R32F\n"); - } - { - tex = device->getVideoDriver()->addRenderTargetTexture(core::dimension2du(256,256), "rt", video::ECF_A32B32G32R32F); - if (tex) - { - if (tex->getColorFormat() != video::ECF_A32B32G32R32F) - logTestString("Format changed: ECF_A32B32G32R32F to %x\n", tex->getColorFormat()); - else - logTestString("Format supported: ECF_A32B32G32R32F\n"); - driver->removeTexture(tex); - tex=0; - } - else - logTestString("Format unsupported: ECF_A32B32G32R32F\n"); - } - - device->closeDevice(); - device->run(); - device->drop(); - - return true; -} - -bool renderTargetTexture(void) -{ - bool result = true; - - TestWithAllDrivers(testWith2DImage); - -#if 0 - TestWithAllDrivers(rttAndZBuffer); -#endif - - TestWithAllDrivers(rttAndAntiAliasing); - TestWithAllDrivers(rttAndText); - - logTestString("Test RTT format support\n"); - TestWithAllHWDrivers(rttFormats); - - return result; -} diff --git a/lib/irrlicht/tests/sceneCollisionManager.cpp b/lib/irrlicht/tests/sceneCollisionManager.cpp deleted file mode 100644 index 65b3e3cd9..000000000 --- a/lib/irrlicht/tests/sceneCollisionManager.cpp +++ /dev/null @@ -1,485 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; - -static bool testGetCollisionResultPosition(IrrlichtDevice * device, - ISceneManager * smgr, - ISceneCollisionManager * collMgr) -{ - IMeshSceneNode * cubeNode = smgr->addCubeSceneNode(10.f); - ITriangleSelector * cubeSelector = smgr->createTriangleSelectorFromBoundingBox(cubeNode); - - triangle3df triOut; - vector3df hitPosition; - bool falling; - ISceneNode* hitNode; - - vector3df resultPosition = - collMgr->getCollisionResultPosition(cubeSelector, - vector3df(0, 50, 0), - vector3df(10, 20, 10), - vector3df(0, -100, 0), - triOut, - hitPosition, - falling, - hitNode); - - bool result = true; - - if(hitNode != cubeNode) - { - logTestString("Unexpected collision node\n"); - result = false; - } - - if(!equals(resultPosition.Y, 25.f, 0.01f)) - { - logTestString("Unexpected collision response position\n"); - result = false; - } - - if(!equals(hitPosition.Y, 5.f, 0.01f)) - { - logTestString("Unexpected collision position\n"); - result = false; - } - - resultPosition = - collMgr->getCollisionResultPosition(cubeSelector, - vector3df(-20, 0, 0), - vector3df(10, 20, 10), - vector3df(100, 0, 0), - triOut, - hitPosition, - falling, - hitNode); - - if(hitNode != cubeNode) - { - logTestString("Unexpected collision node\n"); - result = false; - } - - if(!equals(resultPosition.X, -15.f, 0.01f)) - { - logTestString("Unexpected collision response position\n"); - result = false; - } - - if(!equals(hitPosition.X, -5.f, 0.01f)) - { - logTestString("Unexpected collision position\n"); - result = false; - } - - assert_log(result); - - cubeSelector->drop(); - smgr->clear(); - - return result; -} - - -// Test that getCollisionPoint() actually uses the closest point, not the closest triangle. -static bool getCollisionPoint_ignoreTriangleVertices(IrrlichtDevice * device, - ISceneManager * smgr, - ISceneCollisionManager * collMgr) -{ - // Create a cube with a Z face at 5, but corners close to 0 - ISceneNode * farSmallCube = smgr->addCubeSceneNode(10, 0, -1, vector3df(0, 0, 10)); - - // Create a cube with a Z face at 0, but corners far from 0 - ISceneNode * nearBigCube = smgr->addCubeSceneNode(100, 0, -1, vector3df(0, 0, 50)); - - IMetaTriangleSelector * meta = smgr->createMetaTriangleSelector(); - - ITriangleSelector * selector = smgr->createTriangleSelectorFromBoundingBox(farSmallCube); - meta->addTriangleSelector(selector); - selector->drop(); - - // We should expect a hit on this cube - selector = smgr->createTriangleSelectorFromBoundingBox(nearBigCube); - meta->addTriangleSelector(selector); - selector->drop(); - - line3df ray(0, 0, -5, 0, 0, 100); - vector3df hitPosition; - triangle3df hitTriangle; - ISceneNode* hitNode; - - bool collision = collMgr->getCollisionPoint(ray, meta, hitPosition, hitTriangle, hitNode); - - meta->drop(); - - if(hitNode != nearBigCube) - { - logTestString("getCollisionPoint_ignoreTriangleVertices: hit the wrong node.\n"); - return false; - } - - if(!collision) - { - logTestString("getCollisionPoint_ignoreTriangleVertices: didn't get a hit.\n"); - return false; - } - - if(hitPosition != vector3df(0, 0, 0)) - { - logTestString("getCollisionPoint_ignoreTriangleVertices: unexpected hit position %f %f %f.\n", - hitPosition.X, hitPosition.Y, hitPosition.Z ); - return false; - } - - smgr->clear(); - - return true; -} - - -static bool testGetSceneNodeFromScreenCoordinatesBB(IrrlichtDevice * device, - ISceneManager * smgr, - ISceneCollisionManager * collMgr) -{ - // Create 3 nodes. The nearest node actually contains the camera. - IMeshSceneNode * cubeNode1 = smgr->addCubeSceneNode(10.f, 0, -1, vector3df(0, 0, 4)); - IMeshSceneNode * cubeNode2 = smgr->addCubeSceneNode(10.f, 0, -1, vector3df(0, 0, 30)); - cubeNode2->setRotation(vector3df(90.f, 90.f, 90.f)); // Just check that rotation doesn't stop us hitting it. - IMeshSceneNode * cubeNode3 = smgr->addCubeSceneNode(10.f, 0, -1, vector3df(0, 0, 40)); - cubeNode3->setRotation(vector3df(180.f, 180.f, 180.f)); // Just check that rotation doesn't stop us hitting it. - - ICameraSceneNode * camera = smgr->addCameraSceneNode(); - device->run(); - smgr->drawAll(); // Get the camera in a good state - - ISceneNode * hitNode = collMgr->getSceneNodeFromScreenCoordinatesBB(position2d(80, 60)); - - // Expect the first node to be hit, since we're starting the check from inside it. - bool result = true; - if(hitNode != cubeNode1) - { - logTestString("Unexpected node hit. Expected cubeNode1.\n"); - result = false; - } - - // Now make cubeNode1 invisible and check that cubeNode2 is hit. - cubeNode1->setVisible(false); - hitNode = collMgr->getSceneNodeFromScreenCoordinatesBB(position2d(80, 60)); - if(hitNode != cubeNode2) - { - logTestString("Unexpected node hit. Expected cubeNode2.\n"); - result = false; - } - - // Make cubeNode1 the parent of cubeNode2. - cubeNode2->setParent(cubeNode1); - - // Check visibility. - bool visible = cubeNode2->isVisible(); - if(!visible) - { - logTestString("cubeNode2 should think that it (in isolation) is visible.\n"); - result = false; - } - - visible = cubeNode2->isTrulyVisible(); - if(visible) - { - logTestString("cubeNode2 should know that it (recursively) is invisible.\n"); - result = false; - } - - // cubeNode2 should now be an invalid target as well, and so the final cube node should be hit. - hitNode = collMgr->getSceneNodeFromScreenCoordinatesBB(position2d(80, 60)); - if(hitNode != cubeNode3) - { - logTestString("Unexpected node hit. Expected cubeNode3.\n"); - result = false; - } - - - // Make cubeNode3 invisible and check that the camera node is hit (since it has a valid bounding box). - cubeNode3->setVisible(false); - hitNode = collMgr->getSceneNodeFromScreenCoordinatesBB(position2d(80, 60)); - if(hitNode != camera) - { - logTestString("Unexpected node hit. Expected the camera node.\n"); - result = false; - } - - // Now verify bitmasking - camera->setID(0xAAAAAAAA); // == 101010101010101010101010101010 - hitNode = collMgr->getSceneNodeFromScreenCoordinatesBB(position2d(80, 60), 0x02); - if(hitNode != camera) - { - logTestString("Unexpected node hit. Expected the camera node.\n"); - result = false; - } - - // Test the 01010101010101010101010101010101 bitmask (0x55555555) - hitNode = collMgr->getSceneNodeFromScreenCoordinatesBB(position2d(80, 60), 0x55555555); - if(hitNode != 0) - { - logTestString("A node was hit when none was expected.\n"); - result = false; - } - assert_log(result); - - smgr->clear(); - - return result; -} - - -static bool getScaledPickedNodeBB(IrrlichtDevice * device, - ISceneManager * smgr, - ISceneCollisionManager * collMgr) -{ - ISceneNode* farTarget = smgr->addCubeSceneNode(1.f); - farTarget->setScale(vector3df(100.f, 100.f, 10.f)); - farTarget->setPosition(vector3df(0.f, 0.f, 500.f)); - farTarget->updateAbsolutePosition(); - - // Create a node that's slightly further away than the closest node, - // but thinner. Its furthest corner is closer, but the collision - // position is further, so it should not be selected. - ISceneNode* middleTarget = smgr->addCubeSceneNode(10.f); - middleTarget->setPosition(vector3df(0.f, 0.f, 101.f)); - middleTarget->setScale(vector3df(1.f, 1.f, 0.5f)); - middleTarget->updateAbsolutePosition(); - - ISceneNode* nearTarget = smgr->addCubeSceneNode(10.f); - nearTarget->setPosition(vector3df(0.f, 0.f, 100.f)); - nearTarget->updateAbsolutePosition(); - // We'll rotate this node 90 degrees to show that we can hit its side. - nearTarget->setRotation(vector3df(0.f, 90.f, 0.f)); - - line3df ray(0.f, 0.f, 0.f, 0.f, 0.f, 500.f); - - const ISceneNode * const hit = collMgr->getSceneNodeFromRayBB(ray); - - bool result = (hit == nearTarget); - - if(hit == 0) - logTestString("getSceneNodeFromRayBB() didn't hit anything.\n"); - else if(hit == farTarget) - logTestString("getSceneNodeFromRayBB() hit the far (scaled) target.\n"); - else if(hit == middleTarget) - logTestString("getSceneNodeFromRayBB() hit the middle (scaled) target.\n"); - - assert_log(result); - - smgr->clear(); - - return result; -} - - -// box intersection according to Kay et al., code from gamedev.net -static bool IntersectBox(const core::vector3df& origin, const core::vector3df& dir, const core::aabbox3df& box) -{ - core::vector3df minDist = (box.MinEdge - origin)/dir; - core::vector3df maxDist = (box.MaxEdge - origin)/dir; - - core::vector3df realMin(core::min_(minDist.X, maxDist.X),core::min_(minDist.Y, maxDist.Y),core::min_(minDist.Z, maxDist.Z)); - core::vector3df realMax(core::max_(minDist.X, maxDist.X),core::max_(minDist.Y, maxDist.Y),core::max_(minDist.Z, maxDist.Z)); - - f32 minmax = core::min_(realMax.X, realMax.Y, realMax.Z); - // nearest distance to intersection - f32 maxmin = core::max_(realMin.X, realMin.Y, realMin.Z); - - return (maxmin >=0 && minmax >= maxmin); -} - -static bool checkBBoxIntersection(IrrlichtDevice * device, - ISceneManager * smgr) -{ - video::IVideoDriver* driver = device->getVideoDriver(); - - // add camera - scene::ICameraSceneNode* camera = smgr->addCameraSceneNode(); - camera->setPosition(core::vector3df(30, 30, 30)); - camera->setTarget(core::vector3df(8.f, 8.f, 8.f)); - camera->setID(0); - - // add a cube to pick - scene::ISceneNode* cube = smgr->addCubeSceneNode(30, 0, -1, core::vector3df(0,0,0),core::vector3df(30,40,50)); - - bool result=true; - for (u32 round=0; round<2; ++round) - { - driver->beginScene(true, true, video::SColor(100, 50, 50, 100)); - smgr->drawAll(); - driver->endScene(); - - core::matrix4 invMat = cube->getAbsoluteTransformation(); - invMat.makeInverse(); - - s32 hits=0; - u32 start = device->getTimer()->getRealTime(); - for (u32 i=10; i<150; ++i) - { - for (u32 j=10; j<110; ++j) - { - const core::position2di pos(i, j); - - // get the line used for picking - core::line3df ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates(pos, camera); - - invMat.transformVect(ray.start); - invMat.transformVect(ray.end); - - hits += (cube->getBoundingBox().intersectsWithLine(ray)?1:0); - } - } - u32 duration = device->getTimer()->getRealTime()-start; - logTestString("bbox intersection checks %d hits (of 14000).\n", hits); - hits = -hits; - - start = device->getTimer()->getRealTime(); - for (u32 i=10; i<150; ++i) - { - for (u32 j=10; j<110; ++j) - { - const core::position2di pos(i, j); - - // get the line used for picking - core::line3df ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates(pos, camera); - - invMat.transformVect(ray.start); - invMat.transformVect(ray.end); - - hits += (IntersectBox(ray.start, (ray.end-ray.start).normalize(), cube->getBoundingBox())?1:0); - } - } - u32 duration2 = device->getTimer()->getRealTime()-start; - logTestString("bbox intersection resulted in %d misses at a speed of %d (old) compared to %d (new).\n", abs(hits), duration, duration2); - if (duration>(duration2*1.2f)) - logTestString("Consider replacement of bbox intersection test.\n"); - - result &= (hits==0); - assert_log(result); - // second round without any hits, so check opposite direction - camera->setTarget(core::vector3df(80.f, 80.f, 80.f)); - } - - ISceneNode* node = smgr->addSphereSceneNode(5.f, 16, 0, -1, core::vector3df(0, 0, 1), core::vector3df(), core::vector3df(0.3f, 0.3f, 0.3f)); - cube->remove(); - cube = smgr->addCubeSceneNode(10.f, 0, -1, core::vector3df(0, 6.5f, 1), core::vector3df(), core::vector3df(10, 0.1f, 1.f)); - camera->setPosition(core::vector3df(0, 0, 10)); - camera->setTarget(core::vector3df()); - - u32 count=0; - for (u32 i=0; i<30; ++i) - { - driver->beginScene(true, true, video::SColor(100, 50, 50, 100)); - smgr->drawAll(); - driver->endScene(); - - count += node->getTransformedBoundingBox().intersectsWithBox(cube->getTransformedBoundingBox())?1:0; - node->setPosition(node->getPosition()+core::vector3df(.5f,.5f,0)); - if (i==8 && count != 0) - result=false; - if (i==17 && count != 9) - result=false; - } - if (count != 9) - result=false; - - smgr->clear(); - - return result; -} - - -static bool compareGetSceneNodeFromRayBBWithBBIntersectsWithLine(IrrlichtDevice * device, - ISceneManager * smgr, - ISceneCollisionManager * collMgr) -{ - video::IVideoDriver* driver = device->getVideoDriver(); - - // add camera - scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); - camera->setPosition(core::vector3df(30, 30, 30)); - camera->setTarget(core::vector3df(-8.f, 8.f, -8.f)); - camera->setID(0); - - // add a dynamic light (this causes weirdness) - smgr->addLightSceneNode(0, core::vector3df(4, 4, 4), video::SColorf(.2f, .3f, .2f)); - - // add a cube to pick - scene::ISceneNode* cube = smgr->addCubeSceneNode(15); - - driver->beginScene(true, true, video::SColor(100, 50, 50, 100)); - smgr->drawAll(); - driver->endScene(); - - core::matrix4 invMat = cube->getAbsoluteTransformation(); - invMat.makeInverse(); - - bool result = true; - for (u32 i=76; i<82; ++i) - { - for (u32 j=56; j<64; ++j) - { - const core::position2di pos(i, j); - - // get the line used for picking - core::line3df ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates(pos, camera); - - // find a selected node - scene::ISceneNode* pick = smgr->getSceneCollisionManager()->getSceneNodeFromRayBB(ray, 1); - - invMat.transformVect(ray.start); - invMat.transformVect(ray.end); - - const int a_hit = (pick == cube); - const int b_hit = cube->getBoundingBox().intersectsWithLine(ray); - result = (a_hit==b_hit); - } - } - - assert_log(result); - - smgr->clear(); - - return result; -} - - -/** Test functionality of the sceneCollisionManager */ -bool sceneCollisionManager(void) -{ - IrrlichtDevice * device = irr::createDevice(video::EDT_NULL, dimension2d(160, 120)); - assert_log(device); - if(!device) - return false; - - ISceneManager * smgr = device->getSceneManager(); - ISceneCollisionManager * collMgr = smgr->getSceneCollisionManager(); - - bool result = testGetCollisionResultPosition(device, smgr, collMgr); - - smgr->clear(); - - result &= testGetSceneNodeFromScreenCoordinatesBB(device, smgr, collMgr); - - result &= getScaledPickedNodeBB(device, smgr, collMgr); - - result &= getCollisionPoint_ignoreTriangleVertices(device, smgr, collMgr); - - result &= checkBBoxIntersection(device, smgr); - - result &= compareGetSceneNodeFromRayBBWithBBIntersectsWithLine(device, smgr, collMgr); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} diff --git a/lib/irrlicht/tests/sceneNodeAnimator.cpp b/lib/irrlicht/tests/sceneNodeAnimator.cpp deleted file mode 100644 index 1016f4e48..000000000 --- a/lib/irrlicht/tests/sceneNodeAnimator.cpp +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; - -/** Test functionality of the ISceneNodeAnimator implementations. */ -bool sceneNodeAnimator(void) -{ - IrrlichtDevice * device = irr::createDevice(video::EDT_NULL, dimension2d(160, 120)); - assert_log(device); - if(!device) - return false; - - ISceneManager * smgr = device->getSceneManager(); - - // Test the hasFinished() method. - ISceneNodeAnimatorCollisionResponse* collisionResponseAnimator - = smgr->createCollisionResponseAnimator(0, 0); - - ISceneNodeAnimator* deleteAnimator = smgr->createDeleteAnimator(1); - - ISceneNodeAnimator* flyCircleAnimator = smgr->createFlyCircleAnimator(); - - ISceneNodeAnimator* flyStraightAnimator - = smgr->createFlyStraightAnimator(vector3df(0, 0, 0), vector3df(0, 0, 0), 1, false); - - ISceneNodeAnimator* flyStraightAnimatorLooping - = smgr->createFlyStraightAnimator(vector3df(0, 0, 0), vector3df(0, 0, 0), 1, true); - - ISceneNodeAnimator* rotationAnimator = smgr->createRotationAnimator(vector3df(0, 0, 0)); - - array points; - points.push_back(vector3df(0, 0, 0)); - points.push_back(vector3df(0, 0, 0)); - ISceneNodeAnimator* followSplineAnimator = smgr->createFollowSplineAnimator(0, points, 1000.f); - - array textures; - textures.push_back(0); - textures.push_back(0); - - ISceneNodeAnimator* textureAnimator = smgr->createTextureAnimator(textures, 1, false); - ISceneNodeAnimator* textureAnimatorLooping = smgr->createTextureAnimator(textures, 1, true); - - bool result = true; - - ISceneNode * deletedNode = smgr->addEmptySceneNode(); - deletedNode->addAnimator(deleteAnimator); - - ISceneNode * testNode = smgr->addEmptySceneNode(); - testNode->addAnimator(collisionResponseAnimator); - testNode->addAnimator(deleteAnimator); - testNode->addAnimator(flyCircleAnimator); - testNode->addAnimator(flyStraightAnimator); - testNode->addAnimator(flyStraightAnimatorLooping); - testNode->addAnimator(rotationAnimator); - testNode->addAnimator(followSplineAnimator); - testNode->addAnimator(textureAnimator); - testNode->addAnimator(textureAnimatorLooping); - - result &= !collisionResponseAnimator->hasFinished(); - result &= !deleteAnimator->hasFinished(); - result &= !flyCircleAnimator->hasFinished(); - result &= !flyStraightAnimator->hasFinished(); - result &= !flyStraightAnimatorLooping->hasFinished(); - result &= !rotationAnimator->hasFinished(); - result &= !followSplineAnimator->hasFinished(); - result &= !textureAnimator->hasFinished(); - result &= !textureAnimatorLooping->hasFinished(); - - device->run(); - device->sleep(10); - device->run(); - smgr->drawAll(); - - // These animators don't have an endpoint. - result &= !collisionResponseAnimator->hasFinished(); - result &= !flyCircleAnimator->hasFinished(); - result &= !rotationAnimator->hasFinished(); - result &= !followSplineAnimator->hasFinished(); - - // These animators are looping and so can't finish. - result &= !flyStraightAnimatorLooping->hasFinished(); - result &= !textureAnimatorLooping->hasFinished(); - - // These have an endpoint and have reached it. - result &= deleteAnimator->hasFinished(); - result &= flyStraightAnimator->hasFinished(); - result &= textureAnimator->hasFinished(); - - collisionResponseAnimator->drop(); - deleteAnimator->drop(); - flyCircleAnimator->drop(); - flyStraightAnimator->drop(); - flyStraightAnimatorLooping->drop(); - rotationAnimator->drop(); - followSplineAnimator->drop(); - textureAnimator->drop(); - textureAnimatorLooping->drop(); - - device->closeDevice(); - device->run(); - device->drop(); - - if(!result) - { - logTestString("One or more animators has a bad hasFinished() state\n."); - assert_log(false); - } - - return result; -} - - diff --git a/lib/irrlicht/tests/screenshot.cpp b/lib/irrlicht/tests/screenshot.cpp deleted file mode 100644 index c674a17c8..000000000 --- a/lib/irrlicht/tests/screenshot.cpp +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - - - -// Tests screenshots features -bool testShots(video::E_DRIVER_TYPE type) -{ - IrrlichtDevice *device = createDevice(type, core::dimension2d(160, 120), 32); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::IAnimatedMesh* mesh = smgr->getMesh("../media/sydney.md2"); - scene::IAnimatedMeshSceneNode* node; - - if (!mesh) - return false; - node = smgr->addAnimatedMeshSceneNode(mesh); - if (!node) - return false; - - stabilizeScreenBackground(driver); - - node->setPosition(core::vector3df(20, 0, 30)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMaterialTexture(0, driver->getTexture("../media/sydney.bmp")); - node->setLoopMode(false); - - smgr->addCameraSceneNode(); - - node->setMD2Animation(scene::EMAT_DEATH_FALLBACK); - node->setCurrentFrame((f32)(node->getEndFrame())); - node->setAnimationSpeed(0); - - device->run(); - driver->beginScene(true, true, video::SColor(255, 255, 255, 0)); - smgr->drawAll(); - driver->endScene(); - - for (s32 i=0; icreateScreenShot((video::ECOLOR_FORMAT)i); - logTestString("Color Format %d %ssupported\n", i, (img && img->getColorFormat() == i)?"":"un"); - -#if 0 // Enable for a quick check while testing. - // If someone adds comparison images please use another scene without animation - // and maybe a texture using the full color spectrum. - if ( img ) - { - irr::core::stringc screenshotFilename = "results/"; - screenshotFilename += shortDriverName(driver); - screenshotFilename += "screenshot"; - screenshotFilename += core::stringc(i); - screenshotFilename += ".png"; - driver->writeImageToFile(img, screenshotFilename.c_str()); - } -#endif - - if (img) - img->drop(); - } - device->closeDevice(); - device->run(); - device->drop(); - - return true; -} - -bool screenshot() -{ - bool result = true; - TestWithAllHWDrivers(testShots); - return result; -} diff --git a/lib/irrlicht/tests/serializeAttributes.cpp b/lib/irrlicht/tests/serializeAttributes.cpp deleted file mode 100644 index 00fc9b9c3..000000000 --- a/lib/irrlicht/tests/serializeAttributes.cpp +++ /dev/null @@ -1,335 +0,0 @@ -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace io; - -#define COMPARE(a, b) if ( (a) != (b) ) { logTestString("Not identical %s in %s:%d\n", #a, __FILE__, __LINE__ ); return false; } - -const u32 BINARY_BLOCK_SIZE = 10; - -enum EMockEnum -{ - EME_NONE, - EME_ONE, - EME_COUNT -}; - -const c8* const MockEnumNames[EME_COUNT+1] = -{ - "none", - "one", - 0, -}; - -class SerializableMock : public virtual io::IAttributeExchangingObject -{ -public: - SerializableMock(bool comparePointers=true) : ComparePointers(comparePointers) - { - } - - virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const - { - out->addInt("ValInt", ValInt); - out->addFloat("ValFloat", ValFloat); - out->addString("ValString", ValString.c_str()); - out->addString("ValStringW", ValStringW.c_str()); - out->addBinary("ValBinary", (void*)ValBinary, BINARY_BLOCK_SIZE); - out->addArray("ValStringWArray", ValStringWArray); - out->addBool("ValBool", ValBool); - out->addEnum("ValEnum", ValEnum, MockEnumNames); - out->addColor("ValColor", ValColor); - out->addColorf("ValColorf", ValColorf); - out->addVector3d("ValVector3df", ValVector3df); - out->addVector2d("ValVector2df", ValVector2df); - out->addDimension2d("ValDimension2du", ValDimension2du); - out->addPosition2d("ValPosition2di", ValPosition2di); - out->addRect("ValRect", ValRect); - out->addMatrix("ValMatrix", ValMatrix); - out->addQuaternion("ValQuaternion", ValQuaternion); - out->addBox3d("ValAabbox3df", ValAabbox3df); - out->addPlane3d("ValPlane3df", ValPlane3df); - out->addTriangle3d("ValTriangle3df", ValTriangle3df); - out->addLine2d("ValLine2df", ValLine2df); - out->addLine3d("ValLine3df", ValLine3df); - out->addTexture("ValTexture", ValTexture ); - out->addUserPointer("ValPointer", ValPointer); - } - - virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) - { - ValInt = in->getAttributeAsInt("ValInt"); - ValFloat = in->getAttributeAsFloat("ValFloat"); - ValString = in->getAttributeAsString("ValString"); - ValStringW = in->getAttributeAsStringW("ValStringW"); - in->getAttributeAsBinaryData("ValBinary", ValBinary, BINARY_BLOCK_SIZE); - ValStringWArray = in->getAttributeAsArray("ValStringWArray"); - ValBool = in->getAttributeAsBool("ValBool"); - ValEnum = (EMockEnum)in->getAttributeAsEnumeration("ValEnum", MockEnumNames); - ValColor = in->getAttributeAsColor("ValColor"); - ValColorf = in->getAttributeAsColorf("ValColorf"); - ValVector3df = in->getAttributeAsVector3d("ValVector3df"); - ValVector2df = in->getAttributeAsVector2d("ValVector2df"); - ValDimension2du = in->getAttributeAsDimension2d("ValDimension2du"); - ValPosition2di = in->getAttributeAsPosition2d("ValPosition2di"); - ValRect = in->getAttributeAsRect("ValRect"); - ValMatrix = in->getAttributeAsMatrix("ValMatrix"); - ValQuaternion = in->getAttributeAsQuaternion("ValQuaternion"); - ValAabbox3df = in->getAttributeAsBox3d("ValAabbox3df"); - ValPlane3df = in->getAttributeAsPlane3d("ValPlane3df"); - ValTriangle3df = in->getAttributeAsTriangle3d("ValTriangle3df"); - ValLine2df = in->getAttributeAsLine2d("ValLine2df"); - ValLine3df = in->getAttributeAsLine3d("ValLine3df"); - ValTexture = in->getAttributeAsTexture("ValTexture"); - ValPointer = in->getAttributeAsUserPointer("ValPointer"); - } - - bool operator==(const SerializableMock& other) - { - COMPARE(ValInt, other.ValInt); - COMPARE(ValFloat, other.ValFloat); - COMPARE(ValString, other.ValString); - COMPARE(ValStringW, other.ValStringW); - if ( memcmp( ValBinary, other.ValBinary, BINARY_BLOCK_SIZE) != 0 ) - { - logTestString("Not identical %s in %s:%d", "ValBinary", __FILE__, __LINE__ ); - return false; - } - COMPARE(ValStringWArray, other.ValStringWArray); - COMPARE(ValBool, other.ValBool); - COMPARE(ValEnum, other.ValEnum); - COMPARE(ValColor, other.ValColor); - if ( ValColorf.r != other.ValColorf.r || ValColorf.g != other.ValColorf.g || ValColorf.b != other.ValColorf.b || ValColorf.a != other.ValColorf.a ) - { - logTestString("Not identical %s in %s:%d", "ValColorf", __FILE__, __LINE__ ); - return false; - } - COMPARE(ValVector3df, other.ValVector3df); - COMPARE(ValVector2df, other.ValVector2df); - COMPARE(ValDimension2du, other.ValDimension2du); - COMPARE(ValPosition2di, other.ValPosition2di); - COMPARE(ValRect, other.ValRect); - COMPARE(ValMatrix, other.ValMatrix); - COMPARE(ValQuaternion, other.ValQuaternion); - COMPARE(ValAabbox3df, other.ValAabbox3df); - COMPARE(ValPlane3df, other.ValPlane3df); - COMPARE(ValTriangle3df, other.ValTriangle3df); - COMPARE(ValLine2df, other.ValLine2df); - COMPARE(ValLine3df, other.ValLine3df); -// ValTexture; // TODO - if ( ComparePointers ) - COMPARE(ValPointer, other.ValPointer); - return true; - } - - void reset() - { - ValInt = 0; - ValFloat = 0.f; - ValString = ""; - ValStringW = L""; - memset(ValBinary, 0, BINARY_BLOCK_SIZE); - ValStringWArray.clear(); - ValBool = false; - ValEnum = EME_NONE; - ValColor.set(0,0,0,0); - ValColorf.set(0.f, 0.f, 0.f, 0.f); - ValVector3df.set(0.f, 0.f, 0.f); - ValVector2df.set(0.f, 0.f); - ValDimension2du.set(0, 0); - ValPosition2di.set(0,0); - ValRect = core::rect(0,0,0,0); - ValMatrix.makeIdentity(); - ValQuaternion.set(0,0,0,0); - ValAabbox3df.reset(0,0,0); - ValPlane3df.setPlane(vector3df(0.f,0.f,0.f), 0.f); - ValTriangle3df.set( vector3df(0.f,0.f,0.f), vector3df(0.f,0.f,0.f), vector3df(0.f,0.f,0.f) ); - ValLine2df.setLine(0.f, 0.f, 0.f, 0.f); - ValLine3df.setLine(0.f, 0.f, 0.f, 0.f, 0.f, 0.f); - ValTexture = NULL; - ValPointer = 0; - } - - void set() - { - ValInt = 152722522; - ValFloat = 1.f; - ValString = "one"; - ValStringW = L"ONE"; - memset(ValBinary, 0xff, BINARY_BLOCK_SIZE); - ValStringWArray.push_back( stringw("ONE") ); - ValStringWArray.push_back( stringw("TWO") ); - ValStringWArray.push_back( stringw("THREE") ); - ValBool = true; - ValEnum = EME_ONE; - ValColor.set(1,2,3,4); - ValColorf.set(1.f, 2.f, 3.f, 4.f); - ValVector3df.set(1.f, 2.f, 3.f); - ValVector2df.set(1.f, 2.f); - ValDimension2du.set(1, 2); - ValPosition2di.set(1,2); - ValRect = core::rect(1,2,3,4); - ValMatrix = 99.9f; - ValQuaternion.set(1,2,3,4); - ValAabbox3df.reset(1,2,3); - ValPlane3df.setPlane(vector3df(1.f,2.f,3.f), 4.f); - ValTriangle3df.set( vector3df(1.f,2.f,3.f), vector3df(4.f,5.f,6.f), vector3df(7.f,8.f,9.f) ); - ValLine2df.setLine(1.f, 2.f, 3.f, 4.f); - ValLine3df.setLine(1.f, 2.f, 3.f, 4.f, 5.f, 6.f); - ValTexture = NULL; // TODO - ValPointer = (void*)0xffffff; - } - - s32 ValInt; - f32 ValFloat; - core::stringc ValString; - core::stringw ValStringW; - char ValBinary[BINARY_BLOCK_SIZE]; - core::array ValStringWArray; - bool ValBool; - EMockEnum ValEnum; - video::SColor ValColor; - video::SColorf ValColorf; - core::vector3df ValVector3df; - core::vector2df ValVector2df; - core::dimension2du ValDimension2du; - core::position2di ValPosition2di; - core::rect ValRect; - core::matrix4 ValMatrix; - core::quaternion ValQuaternion; - core::aabbox3df ValAabbox3df; - core::plane3df ValPlane3df; - core::triangle3df ValTriangle3df; - core::line2df ValLine2df; - core::line3df ValLine3df; - video::ITexture* ValTexture; - void* ValPointer; - - bool ComparePointers; -}; - -// Serialization in memory -bool MemorySerialization(io::IFileSystem * fs ) -{ - SerializableMock origMock, copyMock; - origMock.set(); - copyMock.reset(); - - io::IAttributes* attr = fs->createEmptyAttributes(); - origMock.serializeAttributes(attr, 0); - copyMock.deserializeAttributes(attr, 0); - attr->drop(); - - return origMock == copyMock; -} - -// Serialization to/from an xml-file -bool XmlSerialization(io::IFileSystem * fs, video::IVideoDriver * driver ) -{ - const io::path XML_FILENAME("results/attributeSerialization.xml"); - SerializableMock origMock(false), copyMock; - origMock.set(); - copyMock.reset(); - - // write to xml - io::IWriteFile* fileWrite = fs->createAndWriteFile(XML_FILENAME); - if (!fileWrite) - { - logTestString("Could not create xml in %s:%d\n", __FILE__, __LINE__ ); - return false; - } - io::IXMLWriter* writer = fs->createXMLWriter(fileWrite); - if (!writer) - { - logTestString("Could not create xml-writer in %s:%d\n", __FILE__, __LINE__ ); - return false; - } - writer->writeXMLHeader(); - writer->writeLineBreak(); - io::IAttributes* attrToXml = fs->createEmptyAttributes(); - origMock.serializeAttributes(attrToXml, 0); - attrToXml->write(writer); - attrToXml->drop(); - writer->writeLineBreak(); - writer->drop(); - fileWrite->drop(); - - // read from xml - io::IReadFile* fileRead = fs->createAndOpenFile(XML_FILENAME); - if (!fileRead) - { - logTestString("Could not open xml-file in %s:%d\n", __FILE__, __LINE__ ); - return false; - } - io::IXMLReader* reader = fs->createXMLReader(fileRead); - if (!reader) - { - logTestString("createXMLReader failed in %s:%d\n", __FILE__, __LINE__ ); - return false; - } - while(reader->read()) - { - switch (reader->getNodeType()) - { - case EXN_ELEMENT: - { - // read attributes - io::IAttributes* attr = fs->createEmptyAttributes(driver); - if ( attr->read(reader, true) ) - { - copyMock.deserializeAttributes(attr, 0); - } - else - { - logTestString("attr->read failed in %s:%d\n", __FILE__, __LINE__ ); - } - attr->drop(); - } - break; - default: - break; - } - } - reader->drop(); - fileRead->drop(); - - return origMock == copyMock; -} - -bool serializeAttributes() -{ - bool result = true; - - IrrlichtDevice * device = irr::createDevice(video::EDT_NULL, dimension2d(1, 1)); - assert(device); - if(!device) - { - logTestString("device creation failed in %s:%d\n", __FILE__, __LINE__ ); - return false; - } - - io::IFileSystem * fs = device->getFileSystem (); - if ( !fs ) - { - return false; - } - - result &= MemorySerialization(fs); - if ( !result ) - { - logTestString("MemorySerialization failed in %s:%d\n", __FILE__, __LINE__ ); - } - - result &= XmlSerialization(fs, device->getVideoDriver()); - if ( !result ) - { - logTestString("XmlSerialization failed in %s:%d\n", __FILE__, __LINE__ ); - } - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/skinnedMesh.cpp b/lib/irrlicht/tests/skinnedMesh.cpp deleted file mode 100644 index 68bb61868..000000000 --- a/lib/irrlicht/tests/skinnedMesh.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -// Tests skinned meshes. -bool skinnedMesh(void) -{ - // Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions. - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, core::dimension2d(160, 120), 32); - if (!device) - return false; - - scene::ISceneManager * smgr = device->getSceneManager(); - - logTestString("Testing setMesh()\n"); - - scene::ISkinnedMesh* mesh = (scene::ISkinnedMesh*)smgr->getMesh("../media/ninja.b3d"); - if (!mesh) - { - logTestString("Could not load ninja.\n"); - return false; - } - - scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh); - if (!node) - { - logTestString("Could not add ninja node.\n"); - return false; - } - - // test if certain joint is found - bool result = (node->getJointNode("Joint1") != 0); - if (!result) - logTestString("Could not find joint in ninja.\n"); - - mesh = (scene::ISkinnedMesh*)smgr->getMesh("../media/dwarf.x"); - if (!mesh) - { - logTestString("Could not load dwarf.\n"); - return false; - } - node->setMesh(mesh); - - // make sure old joint is non-existant anymore - logTestString("Ignore error message in log, this is intended.\n"); - result &= (node->getJointNode("Joint1")==0); - if (!result) - logTestString("Found non-existing joint in dwarf.\n"); - - // and check that a new joint can be found - // we use a late one, in order to see also inconsistencies in the joint cache - result &= (node->getJointNode("hit") != 0); - if (!result) - logTestString("Could not find joint in dwarf.\n"); - - node = smgr->addAnimatedMeshSceneNode(mesh); - if (!node) - { - logTestString("Could not add dwarf node.\n"); - return false; - } - // check that a joint can really be found - result &= (node->getJointNode("hit") != 0); - if (!result) - logTestString("Could not find joint in dwarf.\n"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/softwareDevice.cpp b/lib/irrlicht/tests/softwareDevice.cpp deleted file mode 100644 index 9ed67a178..000000000 --- a/lib/irrlicht/tests/softwareDevice.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; - -//! Tests the basic functionality of the software device. -bool softwareDevice(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_SOFTWARE, dimension2d(160, 120), 32); - if (!device) - return false; - - video::IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - - // Test a particular rotation that highlighted a clipping issue from matrix::transformPlane() - video::S3DVertex vertices[3]; - vertices[0] = video::S3DVertex(10,0,-10, 1,0,0, - video::SColor(255,255,0,255), 1, 1); - vertices[1] = video::S3DVertex(0,20,0, 0,1,1, - video::SColor(255,255,255,0), 1, 0); - vertices[2] = video::S3DVertex(-10,0,-10, 0,0,1, - video::SColor(255,0,255,0), 0, 0); - - video::SMaterial material; - material.Lighting = false; - material.Wireframe = false; - const u16 indices[] = { 1,0,2, }; - - matrix4 transform(matrix4::EM4CONST_IDENTITY); - vector3df rotations(290, 0, 290); // <-- This rotation used to clip the triangle incorrectly - transform.setRotationDegrees(rotations); - - (void)smgr->addCameraSceneNode(0, core::vector3df(0,0,-40), core::vector3df(0,0,0)); - - driver->beginScene(true, true, video::SColor(255,255,255,0)); - smgr->drawAll(); - - driver->setMaterial(material); - - driver->setTransform(video::ETS_WORLD, transform); - driver->drawIndexedTriangleList(&vertices[0], 3, &indices[0], 1); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-softwareDevice-rotatedClip.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/stencilshadow.cpp b/lib/irrlicht/tests/stencilshadow.cpp deleted file mode 100644 index 2b09b3755..000000000 --- a/lib/irrlicht/tests/stencilshadow.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -static bool shadows(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice (driverType, core::dimension2d(160,120), 16, false, true); - if (!device) - return true; // No error if device does not exist - - stabilizeScreenBackground(device->getVideoDriver()); - - scene::ICameraSceneNode* cam = device->getSceneManager()->addCameraSceneNodeFPS(); - cam->setPosition(core::vector3df(-15,55,10)); - cam->setTarget(core::vector3df(-5,-5,-15)); - - device->getSceneManager()->setAmbientLight(video::SColorf(.5f,.5f,.5f)); - scene::IMeshSceneNode* cube = device->getSceneManager()->addCubeSceneNode(100, 0, -1, core::vector3df(0,50,0)); - cube->setScale(core::vector3df(-1,-1,-1)); - - scene::IAnimatedMeshSceneNode* node = device->getSceneManager()->addAnimatedMeshSceneNode(device->getSceneManager()->getMesh("../media/ninja.b3d"), 0, -1, core::vector3df(0,2,0), core::vector3df(),core::vector3df(5,5,5)); - node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); - node->addShadowVolumeSceneNode(); - node->setAnimationSpeed(0.f); - - scene::ILightSceneNode* light = device->getSceneManager()->addLightSceneNode(0, core::vector3df(10,10,10)); - light->setLightType(video::ELT_POINT); - light->setRadius(500.f); - light->getLightData().DiffuseColor.set(0,1,1); - - device->getVideoDriver()->beginScene (true, true, 0); - device->getSceneManager()->drawAll(); - device->getVideoDriver()->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilShadow.png", 99.91f); - - node->remove(); - cube->remove(); - // test self-shadowing - node = device->getSceneManager()->addAnimatedMeshSceneNode(device->getSceneManager()->getMesh("../media/dwarf.x")); - node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); - node->addShadowVolumeSceneNode(); - node->setAnimationSpeed(0.f); - - cam->setPosition(core::vector3df(0,55,-30)); - cam->setTarget(core::vector3df(60,45,150)); - - device->getVideoDriver()->beginScene (true, true, 0); - device->getSceneManager()->drawAll(); - device->getVideoDriver()->endScene(); - - result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilSelfShadow.png", 99.41f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool stencilShadow(void) -{ - bool passed = true; - - passed &= shadows(video::EDT_OPENGL); - // no shadows in these renderers -// passed &= shadows(video::EDT_SOFTWARE); -// passed &= shadows(video::EDT_BURNINGSVIDEO); - passed &= shadows(video::EDT_DIRECT3D9); - passed &= shadows(video::EDT_DIRECT3D8); - - return passed; -} diff --git a/lib/irrlicht/tests/terrainSceneNode.cpp b/lib/irrlicht/tests/terrainSceneNode.cpp deleted file mode 100644 index 181dc68d4..000000000 --- a/lib/irrlicht/tests/terrainSceneNode.cpp +++ /dev/null @@ -1,128 +0,0 @@ - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -namespace -{ - -// test camera changes with terrain scene node recalculation -bool terrainRecalc(void) -{ - IrrlichtDevice *device = - createDevice(video::EDT_BURNINGSVIDEO, dimension2du(160, 120), 32); - - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode( - "../media/terrain-heightmap.bmp"); - terrain->setScale(core::vector3df(40.f, .1f, 40.f)); - - terrain->setMaterialFlag(video::EMF_LIGHTING, false); - terrain->setMaterialTexture(0, driver->getTexture("../media/terrain-texture.jpg")); - terrain->setDebugDataVisible(scene::EDS_FULL); - - scene::ICameraSceneNode* camera = smgr->addCameraSceneNode(); - - const core::vector3df center(terrain->getBoundingBox().getCenter()); - camera->setTarget(center); - - // yes, Y is intentionally being set to X here - const core::vector3df above (center.X, center.X, center.Z); - camera->setPosition (above); - camera->setUpVector(vector3df(1.f, 0.f, 0.f)); - camera->setFarValue(above.Y); - - device->run(); - smgr->drawAll(); - - - // This shouldn't cause a recalc - camera->setUpVector(vector3df(1.f, 0.f, .01f).normalize()); - device->run(); - driver->beginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->endScene(); - - // Note that this has to be a slightly fuzzier than usual compare to satisfy multiple OpenGL environments - bool result = takeScreenshotAndCompareAgainstReference(driver, "-terrainSceneNode-1.png", 97.98f); - if(!result) - { - logTestString("Small camera up rotation caused bad recalc.\n"); - } - - // This is big enough to cause a recalc - camera->setUpVector(vector3df(1.f, 0.f, .1f).normalize()); - device->run(); - driver->beginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->endScene(); - - result &= takeScreenshotAndCompareAgainstReference(driver, "-terrainSceneNode-2.png", 98.38f); - if(!result) - { - logTestString("Large camera up rotation caused bad recalc.\n"); - } - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -bool terrainGaps() -{ - IrrlichtDevice* device = createDevice(video::EDT_BURNINGSVIDEO, dimension2d(160, 120)); - if (!device) - return true; - - video::IVideoDriver * irrVideo = device->getVideoDriver(); - scene::ISceneManager* irrScene = device->getSceneManager(); - - // Add camera - scene::ICameraSceneNode* camera = irrScene->addCameraSceneNode(); - camera->setPosition(vector3df(20000, 500, 12800)); - camera->setTarget(vector3df(16800, 0, 12800)); - camera->setFarValue(42000.0f); - - // Add terrain scene node - for (u32 i = 0; i < 2; i++) - { - const char* name="media/ter1.png"; - scene::ITerrainSceneNode* terrain = irrScene->addTerrainSceneNode( - name, 0, -1, - vector3df((f32)(256*50), 0.f, (f32)(i*256*50)),// position 12800(==imgsize*scale) - vector3df(0.f, 0.f, 0.f), // rotation - vector3df(50.f, 15.0f, 50.f) // scale 50 15 50 - ); - - terrain->setMaterialFlag(video::EMF_LIGHTING, false); - terrain->setMaterialFlag(video::EMF_WIREFRAME, !terrain->getMaterial(0).Wireframe); - } - - irrVideo->beginScene(true, true, video::SColor(0,150,150,150)); - irrScene->drawAll(); - irrVideo->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(irrVideo, "-terrainGap.png"); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -} - -bool terrainSceneNode() -{ - bool result = terrainRecalc(); - result &= terrainGaps(); - return result; -} - diff --git a/lib/irrlicht/tests/testDimension2d.cpp b/lib/irrlicht/tests/testDimension2d.cpp deleted file mode 100644 index 801c2cfea..000000000 --- a/lib/irrlicht/tests/testDimension2d.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -/** Some very basic testing of dimension2df: - operator+= - operator!= (and thus implicitly operator==) */ -bool testDimension2d(void) -{ - dimension2df dimension(100.f, 100.f); - const dimension2df addDimension(200.f, -200.f); - - (void)(dimension += addDimension); - - if(dimension != dimension2df(300.f, -100.f)) - { - logTestString("dimension2df != produced unexpected result.\n"); - assert_log(false); - return false; - } - - (void)(dimension -= addDimension); - if(dimension != dimension2df(100.f, 100.f)) - { - logTestString("dimension2df -= produced unexpected result.\n"); - assert_log(false); - return false; - } - - return true; -} - diff --git a/lib/irrlicht/tests/testGeometryCreator.cpp b/lib/irrlicht/tests/testGeometryCreator.cpp deleted file mode 100644 index 0248b991f..000000000 --- a/lib/irrlicht/tests/testGeometryCreator.cpp +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; - -/** Tests that the geometry creator does what it says it does. */ -bool testGeometryCreator(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_BURNINGSVIDEO, - core::dimension2du(160,120), 32); - if (!device) - return false; - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager* smgr = device->getSceneManager(); - (void)smgr->addCameraSceneNode(0, vector3df(0, 0, -50)); - - const IGeometryCreator * geom = smgr->getGeometryCreator(); - - ITexture * wall = driver->getTexture("../media/wall.bmp"); - - SMaterial material; - material.Lighting = false; - material.TextureLayer[0].Texture = wall; - - irr::scene::IMesh * meshHill = geom->createHillPlaneMesh(dimension2df(10, 5), dimension2du(5, 5), - &material, 10, dimension2df(2, 2), dimension2df(3, 3) ); - IMeshSceneNode * node = smgr->addMeshSceneNode(meshHill, 0, -1, - vector3df(0, 10, 0), vector3df(-60, 0, 0)); - meshHill->drop(); - - irr::scene::IMesh * meshArrow = geom->createArrowMesh(4, 8, 10, 6, 3, 6, - SColor(255, 255, 0, 0), SColor(255, 0, 255, 0)); - node = smgr->addMeshSceneNode(meshArrow, 0, -1, vector3df(-10, -20, 0)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - meshArrow->drop(); - - irr::scene::IMesh * meshCone = geom->createConeMesh(5.f, 10.f, 16); - node = smgr->addMeshSceneNode(meshCone, 0, -1, vector3df(-35, -20, 0)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMaterialTexture(0, wall); - meshCone->drop(); - - irr::scene::IMesh * meshCube = geom->createCubeMesh(); - node = smgr->addMeshSceneNode(meshCube, 0, -1, vector3df(-20, -20, 0)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMaterialTexture(0, wall); - meshCube->drop(); - - irr::scene::IMesh * meshCylinder = geom->createCylinderMesh(3, 10, 16); - node = smgr->addMeshSceneNode(meshCylinder, 0, -1, vector3df(0, -20, 10), core::vector3df(45,0,0)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMaterialTexture(0, wall); - meshCylinder->drop(); - - irr::scene::IMesh * meshSphere = geom->createSphereMesh(); - node = smgr->addMeshSceneNode(meshSphere, 0, -1, vector3df(10, -15, 0)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMaterialTexture(0, wall); - meshSphere->drop(); - - irr::scene::IMesh * meshVolumeLight = geom->createVolumeLightMesh(); - node = smgr->addMeshSceneNode(meshVolumeLight, 0, -1, vector3df(20, -20, -10)); - node->setMaterialFlag(video::EMF_LIGHTING, false); - node->setMaterialTexture(0, wall); - node->setScale(core::vector3df(4.f,4.f,4.f)); - meshVolumeLight->drop(); - - bool result = false; - device->run(); - if (driver->beginScene(true, true, video::SColor(0, 80, 80, 80))) - { - smgr->drawAll(); - driver->endScene(); - result = takeScreenshotAndCompareAgainstReference(driver, "-testGeometryCreator.png", 99.994f); - } - - smgr->clear(); - - driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); - - // add camera - scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(0,100.0f,2.0f); - camera->setPosition(core::vector3df(2000.0f,5000.f,0.0f)); - camera->setTarget(core::vector3df(0.0f,0.0f,0.0f)); - camera->setFarValue(20000.0f); - device->getCursorControl()->setVisible(false); // disable mouse cursor - - video::IImage* colorMapImage = driver->createImageFromFile("../media/terrain-texture.jpg"); - video::IImage* heightMapImage = driver->createImageFromFile("../media/terrain-heightmap.bmp"); - - scene::IAnimatedMesh* terrain = smgr->addTerrainMesh("TerrainMeshName", colorMapImage, heightMapImage, - core::dimension2d(40, 40), // size of a pixel - 8*40); // maximum height - colorMapImage->drop(); - colorMapImage = 0; - heightMapImage->drop(); - heightMapImage = 0; - - scene::IAnimatedMeshSceneNode* anode = smgr->addAnimatedMeshSceneNode(terrain); - if (anode) - { - anode->setMaterialFlag(video::EMF_LIGHTING, false); - anode->setPosition(core::vector3df(-5000,0,-5000)); - } - - driver->beginScene(); - smgr->drawAll(); - driver->endScene(); - - // This screenshot shows some mipmap problems, but this seems to be - // no fault of the mesh - result = takeScreenshotAndCompareAgainstReference(driver, "-testTerrainMesh.png", 99.989f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} diff --git a/lib/irrlicht/tests/testLine2d.cpp b/lib/irrlicht/tests/testLine2d.cpp deleted file mode 100644 index f8fe1f39e..000000000 --- a/lib/irrlicht/tests/testLine2d.cpp +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -static bool testLines(line2df const & line1, - line2df const & line2, - bool expectedHit, - const vector2df & expectedIntersection) -{ - bool gotExpectedResult = true; - - logTestString("\nLine 1 = %.1f %.1f to %.1f %.1f \n", - line1.start.X, line1.start.Y, - line1.end.X, line1.end.Y); - logTestString("Line 2 = %.1f %.1f to %.1f %.1f\n", - line2.start.X, line2.start.Y, - line2.end.X, line2.end.Y); - - vector2df intersection; - logTestString("line1 with line2 = "); - if(line1.intersectWith(line2, intersection)) - { - logTestString("hit at %.1f %.1f - ", - intersection.X, intersection.Y); - - if(!line1.isPointOnLine(intersection) || !line2.isPointOnLine(intersection)) - { - logTestString("ERROR! point is not on both lines - "); - gotExpectedResult = false; - } - - if(expectedHit) - { - if(intersection == expectedIntersection) - { - logTestString("expected\n"); - } - else - { - logTestString("unexpected intersection (expected %.1f %.1f)\n", - expectedIntersection.X, expectedIntersection.Y); - gotExpectedResult = false; - } - } - else - { - logTestString("UNEXPECTED\n"); - gotExpectedResult = false; - } - } - else - { - logTestString("miss - "); - if(!expectedHit) - { - logTestString("expected\n"); - } - else - { - logTestString("UNEXPECTED\n"); - gotExpectedResult = false; - } - } - - logTestString("line2 with line1 = "); - if(line2.intersectWith(line1, intersection)) - { - logTestString("hit at %.1f %.1f - ", - intersection.X, intersection.Y); - if(!line1.isPointOnLine(intersection) || !line2.isPointOnLine(intersection)) - { - logTestString("ERROR! point is not on both lines - "); - gotExpectedResult = false; - } - - if(expectedHit) - { - if(intersection == expectedIntersection) - { - logTestString("expected\n"); - } - else - { - logTestString("unexpected intersection (expected %.1f %.1f)\n", - expectedIntersection.X, expectedIntersection.Y); - gotExpectedResult = false; - } - } - else - { - logTestString("UNEXPECTED\n"); - gotExpectedResult = false; - } - } - else - { - logTestString("miss - "); - if(!expectedHit) - { - logTestString("expected\n"); - } - else - { - logTestString("UNEXPECTED\n"); - gotExpectedResult = false; - } - } - - return gotExpectedResult; -} - -// Test the functionality of line2d>T>::intersectWith(). -/** Validation is done with assert_log() against expected results. */ -bool line2dIntersectWith(void) -{ - bool allExpected = true; - - // Crossing lines, horizontal and vertical - allExpected &= testLines(line2df(vector2df(1,1),vector2df(1,3)), - line2df(vector2df(0,2),vector2df(2,2)), - true, vector2df(1,2)); - assert_log(allExpected); - - // Crossing lines, both diagonal - allExpected &= testLines(line2df(vector2df(0,0),vector2df(2,2)), - line2df(vector2df(0,2),vector2df(2,0)), - true, vector2df(1,1)); - assert_log(allExpected); - - // Non-crossing lines, horizontal and vertical - allExpected &= testLines(line2df(vector2df(1,1),vector2df(1,3)), - line2df(vector2df(0,4),vector2df(2,4)), - false, vector2df()); - assert_log(allExpected); - - // Non-crossing lines, both diagonal - allExpected &= testLines(line2df(vector2df(0,0),vector2df(2,2)), - line2df(vector2df(3,4),vector2df(4,3)), - false, vector2df()); - assert_log(allExpected); - - // Meeting at a common point - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(1,0),vector2df(2,0)), - true, vector2df(1,0)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(1,0),vector2df(0,1)), - true, vector2df(1,0)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(1,0),vector2df(0,-1)), - true, vector2df(1,0)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(0,1)), - line2df(vector2df(0,1),vector2df(1,1)), - true, vector2df(0,1)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(0,1)), - line2df(vector2df(0,1),vector2df(1,-1)), - true, vector2df(0,1)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(0,1)), - line2df(vector2df(0,1),vector2df(0,2)), - true, vector2df(0,1)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(1,0),vector2df(2,0)), - true, vector2df(1,0)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,1)), - line2df(vector2df(1,1),vector2df(0,2)), - true, vector2df(1,1)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,1)), - line2df(vector2df(1,1),vector2df(2,0)), - true, vector2df(1,1)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,1)), - line2df(vector2df(1,1),vector2df(2,2)), - true, vector2df(1,1)); - assert_log(allExpected); - - - // Parallel lines, no intersection - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(0,1),vector2df(1,1)), - false, vector2df()); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(0,1)), - line2df(vector2df(1,0),vector2df(1,1)), - false, vector2df()); - assert_log(allExpected); - - // Non parallel lines, no intersection - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(0,1),vector2df(0,2)), - false, vector2df()); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(0,1)), - line2df(vector2df(1,0),vector2df(2,0)), - false, vector2df()); - assert_log(allExpected); - - // Coincident (and thus parallel) lines - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(0,0),vector2df(1,0)), - true, vector2df(0,0)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(2,0),vector2df(0,2)), - line2df(vector2df(2,0),vector2df(0,2)), - true, vector2df(2,0)); - assert_log(allExpected); - - // Two segments of the same unlimited line, but no intersection - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,1)), - line2df(vector2df(2,2),vector2df(3,3)), - false, vector2df()); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(1,0)), - line2df(vector2df(2,0),vector2df(3,0)), - false, vector2df()); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(0,1)), - line2df(vector2df(0,2),vector2df(0,3)), - false, vector2df()); - assert_log(allExpected); - - // Overlapping parallel lines - allExpected &= testLines(line2df(vector2df(1,0),vector2df(2,0)), - line2df(vector2df(0,0),vector2df(3,0)), - true, vector2df(1.5f, 0)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,1),vector2df(0,2)), - line2df(vector2df(0,0),vector2df(0,3)), - true, vector2df(0, 1.5f)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(1,0),vector2df(2,0)), - line2df(vector2df(0,0),vector2df(3,0)), - true, vector2df(1.5f, 0)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,1),vector2df(0,2)), - line2df(vector2df(0,0),vector2df(0,3)), - true, vector2df(0, 1.5f)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(1,1),vector2df(2,2)), - line2df(vector2df(0,0),vector2df(3,3)), - true, vector2df(1.5f, 1.5f)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(1,2),vector2df(2,1)), - line2df(vector2df(0,3),vector2df(3,0)), - true, vector2df(1.5f, 1.5f)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(10,8)), - line2df(vector2df(2.5f,2.0f),vector2df(5.0f,4.0f)), - true, vector2df(3.75f, 3.0f)); - assert_log(allExpected); - allExpected &= testLines(line2df(vector2df(0,0),vector2df(2000,1000)), - line2df(vector2df(2,1),vector2df(2.2f,1.4f)), - true, vector2df(2.0f, 1.0f)); - assert_log(allExpected); - - if(!allExpected) - logTestString("\nline2dIntersectWith failed\n"); - - return allExpected; -} - -bool getClosestPoint(void) -{ - // testcase that fails when integers are handled like floats - irr::core::line2di line(-283, -372, 374, 289); - irr::core::vector2di p1 = line.getClosestPoint( irr::core::vector2di(290,372) ); - irr::core::vector2di p2 = line.getClosestPoint( irr::core::vector2di(135,372) ); - if( p1 == p2 ) - { - logTestString("getClosestPoint failed\n"); - return false; - } - - return true; -} - -bool testLine2d(void) -{ - bool allExpected = true; - - allExpected &= line2dIntersectWith(); - allExpected &= getClosestPoint(); - - if(allExpected) - logTestString("\nAll tests passed\n"); - else - logTestString("\nFAIL!\n"); - - return allExpected; -} diff --git a/lib/irrlicht/tests/testQuaternion.cpp b/lib/irrlicht/tests/testQuaternion.cpp deleted file mode 100644 index dc04d3052..000000000 --- a/lib/irrlicht/tests/testQuaternion.cpp +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -namespace -{ -inline bool compareQ(const core::vector3df& v, const core::vector3df& turn=core::vector3df(0,0,1)) -{ - core::quaternion q(v*core::DEGTORAD); - core::vector3df v2; - - const core::vector3df v3=v.rotationToDirection(turn); - if (!v3.equals(q*turn, 0.002f)) - { - logTestString("Inequality before quat.toEuler(): %f,%f,%f\n", v.X,v.Y,v.Z); - return false; - } - - q.toEuler(v2); - v2*=core::RADTODEG; - v2=v2.rotationToDirection(turn); - - // this yields pretty far values sometimes, so don't be too picky - if (!v3.equals(v2, 0.0035f)) - { - logTestString("Inequality: %f,%f,%f != %f,%f,%f\n", v.X,v.Y,v.Z, v2.X,v2.Y,v2.Z); - return false; - } - return true; -} - -const core::vector3df vals[] = { - core::vector3df(0.f, 0.f, 0.f), - core::vector3df(0.f, 0.f, 24.04f), - core::vector3df(0.f, 0.f, 71.f), - core::vector3df(0.f, 0.f, 71.19f), - core::vector3df(0.f, 0.f, 80.f), - core::vector3df(0.f, 0.f, 103.99f), - core::vector3df(0.f, 0.f, 261.73f), - core::vector3df(0.f, 0.f, 276.f), - core::vector3df(0.f, 0.f, 286.29f), - core::vector3df(0.f, 0.f, 295.f), - core::vector3df(0.f, 0.f, 318.3f), - core::vector3df(360.f, 75.55f, 155.89f), - core::vector3df(0.f, 90.f, 159.51f), - core::vector3df(0.f, 90.f, 249.48f), - core::vector3df(0.f, 90.f, 269.91f), - core::vector3df(0.f, 90.f, 270.f), - core::vector3df(0.f, 284.45f, 155.89f), - core::vector3df(0.01f, 0.42f, 90.38f), - core::vector3df(0.04f, 359.99f, 9.5f), - core::vector3df(0.34f, 89.58f, 360.f), - core::vector3df(0.58f, 4.36f, 334.36f), - core::vector3df(3.23f, 359.65f, 10.17f), - core::vector3df(3.23f, 359.65f, 10.21f), - core::vector3df(4.85f, 359.3f, 94.33f), - core::vector3df(8.90f, 6.63f, 9.27f), - core::vector3df(11.64f, 311.52f, 345.35f), - core::vector3df(12.1f, 4.72f, 11.24f), - core::vector3df(14.63f, 48.72f, 31.79f), - core::vector3df(76.68f, 1.11f, 18.65f), - core::vector3df(90.f, 0.f, 0.f), - core::vector3df(90.01f, 270.49f, 360.f), - core::vector3df(90.95f, 0.f, 0.f), - core::vector3df(173.58f, 348.13f, 132.25f), - core::vector3df(115.52f, 89.04f, 205.51f), - core::vector3df(179.3f, 359.18f, 0.58f), - core::vector3df(180.09f, 270.06f, 0.f), - core::vector3df(180.41f, 359.94f, 179.69f), - core::vector3df(180.92f, 10.79f, 144.53f), - core::vector3df(181.95f, 270.03f, 0.f), - core::vector3df(269.05f, 0.f, 0.f), - core::vector3df(269.99f, 270.49f, 360.f), - core::vector3df(283.32f, 358.89f, 18.65f), - core::vector3df(347.9f, 355.28f, 11.24f), - core::vector3df(351.1f, 353.37f, 9.27f), - core::vector3df(355.82f, 345.96f, 273.26f), - core::vector3df(358.24f, 358.07f, 342.82f), - core::vector3df(359.78f, 357.69f, 7.52f), - core::vector3df(359.96f, 0.01f, 9.5f), - core::vector3df(-57.197479f,-90.f,0.f), - core::vector3df(-57.187481f,-90.f,0.f) -}; - -bool testQuatEulerMatrix() -{ - // Test fromAngleAxis - core::vector3df v4; - core::quaternion q1; - f32 angle = 60.f; - q1.fromAngleAxis(angle*core::DEGTORAD, core::vector3df(1, 0, 0)); - q1.toEuler(v4); - bool result = v4.equals(core::vector3df(angle*core::DEGTORAD,0,0)); - - // Test maxtrix constructor - core::vector3df v5; - core::matrix4 mx4; - mx4.setRotationDegrees(core::vector3df(angle,0,0)); - core::quaternion q2(mx4); - q2.toEuler(v5); - result &= q1.equals(q2); - result &= v4.equals(v5); - - // Test matrix conversion via getMatrix - core::matrix4 mat; - mat.setRotationDegrees(core::vector3df(angle,0,0)); - core::vector3df v6 = mat.getRotationDegrees()*core::DEGTORAD; - // make sure comparison matrix is correct - result &= v4.equals(v6); - - core::matrix4 mat2 = q1.getMatrix(); - result &= mat.equals(mat2, 0.0005f); - - // test for proper handedness - angle=90; - q1.fromAngleAxis(angle*core::DEGTORAD, core::vector3df(0,0,1)); - // check we have the correct quat - result &= q1.equals(core::quaternion(0,0,sqrtf(2)/2,sqrtf(2)/2)); - q1.toEuler(v4); - // and the correct rotation vector - result &= v4.equals(core::vector3df(0,0,90*core::DEGTORAD)); - mat.setRotationRadians(v4); - mat2=q1.getMatrix(); - // check matrix - result &= mat.equals(mat2, 0.0005f); - // and to be absolutely sure, check rotation results - v5.set(1,0,0); - mat.transformVect(v5); - v6.set(1,0,0); - mat2.transformVect(v6); - result &= v5.equals(v6); - - return result; -} - -bool testEulerConversion() -{ - bool result = true; - for (u32 i=0; i testmap; - video::S3DVertex v; - v.Pos = core::vector3df(1.000000f, -1.000000f, 1.000000f); - v.Normal = core::vector3df(0.577350f, -0.577350f, 0.577350f); - v.Color = SColor(255,204,204,204); - v.TCoords = core::vector2d(0.f, 0.f); - testmap.insert(v, 0); - - v.Pos = core::vector3df(-1.000000f, -1.000000f, 1.000000f); - v.Normal = core::vector3df(-0.577350f, -0.577350f, 0.577350f); - v.Color = SColor(255,204,204,204); - v.TCoords = core::vector2d(0.f, 0.f); - testmap.insert(v, 1); - - v.Pos = core::vector3df(1.000000f, 1.000000f, 1.000000f); - v.Normal = core::vector3df(0.577350f, 0.577350f, 0.577350f); - v.Color = SColor(255,204,204,204); - v.TCoords = core::vector2d(0.f, 0.f); - testmap.insert(v, 2); - - v.Pos = core::vector3df(1.000000f, -1.000000f, 1.000000f); - v.Normal = core::vector3df(0.577350f, -0.577350f, 0.577350f); - v.Color = SColor(255,204,204,204); - v.TCoords = core::vector2d(0.f, 0.f); - - core::map::Node* n = testmap.find(v); // look for the vertex just inserted - return n ? true : false; -} - -bool testS3DVertex(void) -{ - bool result = true; - result &= testSorting(); - return result; -} diff --git a/lib/irrlicht/tests/testUtils.cpp b/lib/irrlicht/tests/testUtils.cpp deleted file mode 100644 index aecdf06b0..000000000 --- a/lib/irrlicht/tests/testUtils.cpp +++ /dev/null @@ -1,524 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#if defined(_MSC_VER) -#define _CRT_SECURE_NO_WARNINGS 1 -#define TESTING_ON_WINDOWS -#endif // _MSC_VER - -#include "testUtils.h" -#include -#include -#include -#include - -#if defined(TESTING_ON_WINDOWS) -#include // For OutputDebugString() -#endif // #if defined(TESTING_ON_WINDOWS) - -using namespace irr; - -bool binaryCompareFiles(const char * fileName1, const char * fileName2) -{ - assert(fileName1); - assert(fileName2); - if(!fileName1 || !fileName2) - return false; - - FILE * file1 = fopen(fileName1, "rb"); - if(!file1) - { - logTestString("binaryCompareFiles: File '%s' cannot be opened\n", fileName1); - assert(file1); - return false; - } - - FILE * file2 = fopen(fileName2, "rb"); - if(!file2) - { - logTestString("binaryCompareFiles: File '%s' cannot be opened\n", fileName2); - (void)fclose(file1); - assert(file2); - return false; - } - - - (void)fseek(file1, 0, SEEK_END); - (void)fseek(file2, 0, SEEK_END); - const size_t file1Size = ftell(file1); - const size_t file2Size = ftell(file2); - if(file1Size != file2Size) - { - logTestString("binaryCompareFiles: Files are different sizes: %d vs %d\n", - file1Size, file2Size); - (void)fclose(file1); - (void)fclose(file2); - return false; - } - - (void)fseek(file1, 0, SEEK_SET); - (void)fseek(file2, 0, SEEK_SET); - - char file1Buffer[8196]; - char file2Buffer[8196]; - - while(!feof(file1)) - { - if(feof(file2) - ||(fread(file1Buffer, sizeof(file1Buffer), 1, file1) != - fread(file2Buffer, sizeof(file2Buffer), 1, file2))) - { - logTestString("binaryCompareFiles: Error during file reading\n"); - break; - } - - if(memcmp(file1Buffer, file2Buffer, sizeof(file1Buffer))) - { - logTestString("binaryCompareFiles: files are different\n"); - break; - } - } - - bool filesAreIdentical = feof(file1) && feof(file2); - (void)fclose(file1); - (void)fclose(file2); - - return filesAreIdentical; -} - -bool xmlCompareFiles(irr::io::IFileSystem * fs, const char * fileName1, const char * fileName2) -{ - if(!fileName1 || !fileName2) - return false; - - io::IXMLReaderUTF8* reader1 = fs->createXMLReaderUTF8(fileName1); - if (!reader1) - { - logTestString("xmlCompareFiles: Could not create a XML reader for '%s'\n", fileName1); - return false; - } - io::IXMLReaderUTF8* reader2 = fs->createXMLReaderUTF8(fileName2); - if (!reader2) - { - logTestString("xmlCompareFiles: Could not create a XML reader for '%s'\n", fileName2); - reader1->drop(); - return false; - } - - bool different = false; - bool read1 = reader1->read(); - bool read2 = reader2->read(); - if ( !read1 && !read2 ) - { - logTestString("xmlCompareFiles: Both files have no nodes: '%s' %s - is this ok?\n", fileName1, fileName2); - reader1->drop(); - reader2->drop(); - return true; - } - - while (read1 && read2) - { - io::EXML_NODE type1 = reader1->getNodeType(); - io::EXML_NODE type2 = reader2->getNodeType(); - if ( type1 != type2 ) - { - const c8* name1 = reader1->getNodeName(); - const c8* name2 = reader2->getNodeName(); - logTestString("xmlCompareFiles: file '%s' has different nodes than %s in nodes \"%s\" and \"%s\"\n" - , fileName1, fileName2, name1 ? name1 : "NULL", name2 ? name2 : "NULL"); - different = true; - break; - } - - if ( reader1->isEmptyElement() != reader2->isEmptyElement() ) - { - logTestString("xmlCompareFiles: file '%s' has different empty elements than %s\n", fileName1, fileName2); - different = true; - break; - } - - switch ( type1 ) - { - case io::EXN_NONE: - case io::EXN_ELEMENT_END: - break; - - case io::EXN_ELEMENT: - { - core::stringc name1(reader1->getNodeName()); - core::stringc name2(reader2->getNodeName()); - if ( name1 != name2 ) - { - logTestString("xmlCompareFiles: %s has node %s where %s has node %s\n" - , fileName1, name1.c_str(), fileName2, name2.c_str() ); - different = true; - break; - } - - unsigned int numAttributes1 = reader1->getAttributeCount(); - unsigned int numAttributes2 = reader2->getAttributeCount(); - if ( numAttributes1 != numAttributes2 ) - { - logTestString("xmlCompareFiles: %s node %s has %d attributes where %s node %s has %d attributes\n" - , fileName1, name1.c_str(), numAttributes1 - , fileName2, name2.c_str(), numAttributes2); - different = true; - break; - } - - for ( unsigned int i=0; i < numAttributes1; ++i ) - { - core::stringc attribName1(reader1->getAttributeName(int(i))); - core::stringc attribName2(reader2->getAttributeName(int(i))); - - if ( attribName1 != attribName2 ) - { - logTestString("xmlCompareFiles: %s node %s has attribute-name \"%s\" where %s node %s has name \"%s\"\n" - , fileName1, name1.c_str(), attribName1.c_str() - , fileName2, name2.c_str(), attribName2.c_str()); - different = true; - break; - } - - core::stringc attribVal1(reader1->getAttributeValue(int(i))); - core::stringc attribVal2(reader2->getAttributeValue(int(i))); - if ( attribName1 != attribName2 ) - { - logTestString("xmlCompareFiles: %s node %s has attribute-value \"%s\" where %s node %s has value \"%s\"\n" - , fileName1, name1.c_str(), attribVal1.c_str() - , fileName2, name2.c_str(), attribVal2.c_str()); - different = true; - break; - } - } - - break; - } - - case io::EXN_TEXT: - case io::EXN_UNKNOWN: - case io::EXN_COMMENT: - case io::EXN_CDATA: - { - core::stringc nodeData1( reader1->getNodeData() ); - core::stringc nodeData2( reader1->getNodeData() ); - - // removeChars('\r') needed because irrXML doesn't do that (as it probably should) - nodeData1.removeChars(core::stringc('\r')); - nodeData2.removeChars(core::stringc('\r')); - - if ( nodeData1 != nodeData2 ) - { - logTestString("xmlCompareFiles: %s has data \"%s\" where %s has data \"%s\"\n" - , fileName1, nodeData1.c_str() - , fileName2, nodeData2.c_str()); - different = true; - } - break; - } - } - - if ( different ) - break; - - read1 = reader1->read(); - read2 = reader2->read(); - } - - if ( !different && !read1 && !read2 ) - { - reader1->drop(); - reader2->drop(); - return true; - } - - if ( !different && read1 ) - { - logTestString("xmlCompareFiles: file '%s' has more nodes than %s\n", fileName1, fileName2); - } - if ( !different && read2 ) - { - logTestString("xmlCompareFiles: file '%s' has more nodes than %s\n", fileName2, fileName1); - } - - reader1->drop(); - reader2->drop(); - - return false; -} - - -//! Compare two images, returning the degree to which they match. -/** \param image1 The first image to compare. - \param image2 The second image to compare. - \return The match, from 0.f to 100.f */ -static float fuzzyCompareImages(irr::video::IImage * image1, - irr::video::IImage * image2) -{ - assert(image1); - assert(image2); - if(!image1 || !image2) - return 0.f; - - if(image1->getDimension() != image2->getDimension()) - { - logTestString("fuzzyCompareImages: images are different sizes\n"); - return 0.f; - } - - video::ECOLOR_FORMAT format1 = image1->getColorFormat(); - if(video::ECF_A8R8G8B8 != format1 && video::ECF_R8G8B8 != format1) - { - logTestString("fuzzyCompareImages: image 1 must be ECF_AR8G8B8 or ECF_R8G8B8\n"); - return 0.f; - } - - video::ECOLOR_FORMAT format2 = image2->getColorFormat(); - if(video::ECF_A8R8G8B8 != format2 && video::ECF_R8G8B8 != format2) - { - logTestString("fuzzyCompareImages: image 2 must be ECF_AR8G8B8 or ECF_R8G8B8\n"); - return 0.f; - } - - u8 * image1Data = (u8*)image1->lock(); - u8 * image2Data = (u8*)image2->lock(); - - const u32 pixels = (image1->getPitch() * image1->getDimension().Height) / 4; - u32 mismatchedColours = 0; - for(u32 pixel = 0; pixel < pixels; ++pixel) - { - if(video::ECF_A8R8G8B8 == format1) - image1Data++; - - const u8 r1 = *(image1Data++); - const u8 g1 = *(image1Data++); - const u8 b1 = *(image1Data++); - - if(video::ECF_A8R8G8B8 == format2) - image2Data++; - - const u8 r2 = *(image2Data++); - const u8 g2 = *(image2Data++); - const u8 b2 = *(image2Data++); - - mismatchedColours += abs(r1 - r2) + abs(g1 - g2) + abs(b1 - b2); - } - - image1->unlock(); - image2->unlock(); - - const u32 totalColours = pixels * 255*3; - return 100.f * (totalColours - mismatchedColours) / totalColours; -} - - -//! Compare two images, returning the degree to which they match. -/** \param image1 The first image to compare. - \param image2 The second image to compare. - \return The match, from 0.f to 100.f */ -float fuzzyCompareImages(irr::video::IVideoDriver * driver, - const char * fileName1, const char * fileName2) -{ - assert(fileName1); - assert(fileName2); - irr::video::IImage * img1 = driver->createImageFromFile(fileName1); - if (!img1) - return 0; - irr::video::IImage * img2 = driver->createImageFromFile(fileName2); - const float result = fuzzyCompareImages(img1, img2); - logTestString("Image match: %f%%\n", result); - img1->drop(); - if (img2) - img2->drop(); - return result; -} - -void stabilizeScreenBackground(irr::video::IVideoDriver * driver, - irr::video::SColor color) -{ - for(int i = 0; i < 100; ++i) // 100 - max checks - { - driver->beginScene(true, true, color); - driver->endScene(); - - irr::video::IImage * screenshot = driver->createScreenShot(); - if(!screenshot) - return; - - const video::ECOLOR_FORMAT format = screenshot->getColorFormat(); - if(format != video::ECF_R8G8B8) - { - irr::video::IImage * fixedScreenshot = driver->createImage(video::ECF_R8G8B8, screenshot->getDimension()); - screenshot->copyTo(fixedScreenshot); - screenshot->drop(); - - if(!fixedScreenshot) - return; - - screenshot = fixedScreenshot; - } - - u8 * image1Data = (u8*)screenshot->lock(); - - const u32 pixels = (screenshot->getPitch() * screenshot->getDimension().Height) / 4; - bool status = true; - for(u32 pixel = 0; pixel < pixels; ++pixel) - { - const u8 r = *(image1Data++); - const u8 g = *(image1Data++); - const u8 b = *(image1Data++); - - if(r != color.getRed() || g != color.getGreen() || b != color.getBlue()) - { - status = false; - break; - } - } - - if(status) - { - screenshot->drop(); - return; - } - screenshot->drop(); - } -} - -irr::core::stringc shortDriverName(irr::video::IVideoDriver * driver) -{ - irr::core::stringc driverName = driver->getName(); - - // For OpenGL and Burning, chop the version number out. Other drivers have more stable version numbers. - // TA: Sorry Rogerborg. burnings video also has the version number inside;-) - // maybe you sould take the getDriverType Info for this - if(driverName.find("OpenGL") > -1) - driverName = "OpenGL"; - else if(driverName.find("Burning's Video") > -1) - driverName = "Burning's Video"; - - return driverName; -} - -bool takeScreenshotAndCompareAgainstReference(irr::video::IVideoDriver * driver, - const char * fileName, - irr::f32 requiredMatch) -{ - irr::video::IImage * screenshot = driver->createScreenShot(); - if(!screenshot) - { - logTestString("Failed to take screenshot\n"); - assert(false); - return false; - } - - const video::ECOLOR_FORMAT format = screenshot->getColorFormat(); - if(format != video::ECF_R8G8B8) - { - irr::video::IImage * fixedScreenshot = driver->createImage(video::ECF_R8G8B8, screenshot->getDimension()); - screenshot->copyTo(fixedScreenshot); - screenshot->drop(); - - if(!fixedScreenshot) - { - logTestString("Failed to convert screenshot to ECF_A8R8G8B8\n"); - assert(false); - return false; - } - - screenshot = fixedScreenshot; - } - - irr::core::stringc driverName = shortDriverName(driver); - - irr::core::stringc referenceFilename = "media/"; - referenceFilename += driverName; - referenceFilename += fileName; - irr::video::IImage * reference = driver->createImageFromFile(referenceFilename.c_str()); - if(!reference) - { - logTestString("\n*** Failed to load reference image '%s'\n*** Creating from screenshot - please check this image.\n\n", - referenceFilename.c_str()); - (void)driver->writeImageToFile(screenshot, referenceFilename.c_str()); - screenshot->drop(); - return false; - } - - const float match = fuzzyCompareImages(screenshot, reference); - logTestString("Image match: %f%%\n", match); - - if (match < requiredMatch) - { - irr::core::stringc mismatchFilename = "results/"; - mismatchFilename += driverName; - mismatchFilename += fileName; - logTestString("Writing mismatched image to '%s'\n", mismatchFilename.c_str()); - (void)driver->writeImageToFile(screenshot, mismatchFilename.c_str()); - } - - - screenshot->drop(); - reference->drop(); - - return (match >= requiredMatch); -} - -static FILE * logFile = 0; - -bool openTestLog(bool startNewLog, const char * filename) -{ - closeTestLog(); - - if(startNewLog) - logFile = fopen(filename, "w"); - else - logFile = fopen(filename, "a"); - - assert(logFile); - if(!logFile) - logTestString("\nWARNING: unable to open the test log file %s\n", filename); - - return (logFile != 0); -} - -void closeTestLog(void) -{ - if (logFile) - { - (void)fclose(logFile); - logFile = 0; - } -} - - -void logTestString(const char * format, ...) -{ - char logString[1024]; - - va_list arguments; - va_start(arguments, format); - vsprintf(logString, format, arguments); - va_end(arguments); - -#if defined(_IRR_WINDOWS_API_) -#if defined (_WIN32_WCE ) - core::stringw tmp(logString); - tmp += L"\n"; - OutputDebugStringW(tmp.c_str()); -#else - OutputDebugStringA(logString); - OutputDebugStringA("\n"); -#endif -#endif - - (void)printf(logString); - if(logFile) - { - (void)fprintf(logFile, logString); - (void)fflush(logFile); - } - -#if defined(TESTING_ON_WINDOWS) - OutputDebugStringA(logString); -#endif // #if defined(TESTING_ON_WINDOWS) -} - diff --git a/lib/irrlicht/tests/testUtils.h b/lib/irrlicht/tests/testUtils.h deleted file mode 100644 index 9be69eb15..000000000 --- a/lib/irrlicht/tests/testUtils.h +++ /dev/null @@ -1,83 +0,0 @@ - -#ifndef _TEST_UTILS_H_ -#define _TEST_UTILS_H_ 1 - -#include "irrlicht.h" -#include - -#define TestWithAllDrivers(X) \ - logTestString("Running test " #X "\n"); \ - for (u32 i=1; i -static bool compareVectors(const core::vector2d & compare, - const core::vector2d & with) -{ - if (!compare.equals(with)) - { - logTestString("\nERROR: vector2d %.16f, %.16f != vector2d %.16f, %.16f\n", - (f64)compare.X, (f64)compare.Y, (f64)with.X, (f64)with.Y); - assert_log(compare == with); - return false; - } - - return true; -} - -template -static bool doTests() -{ - #define COMPARE_VECTORS(compare, with)\ - if(!compareVectors(compare, with)) return false; - - vector2d vec(5, 5); - vector2d otherVec(10, 20); - if(!equals(vec.getDistanceFrom(otherVec), (T)15.8113883)) - { - logTestString("vector2d::getDistanceFrom() failed\n"); - assert_log(0); - return false; - } - - - vec.rotateBy(45); // Test implicit (0, 0) center - COMPARE_VECTORS(vec, vector2d(0, (T)7.0710678118654755)); - - vec.normalize(); - COMPARE_VECTORS(vec, vector2d(0, (T)1.0000000461060017)); - - vec.set(10, 10); - vector2d center(5, 5); - vec.rotateBy(-5, center); - // -5 means rotate clockwise slightly, so expect the X to increase - // slightly and the Y to decrease slightly. - COMPARE_VECTORS(vec, vector2d((T)10.416752204197017, (T)9.5451947767204359)); - - vec.set(5, 5); - vec.normalize(); - COMPARE_VECTORS(vec, vector2d((T)0.7071068137884140, (T)0.7071068137884140)); - - vec.set(5, 5); - otherVec.set(10, 20); - - logTestString("vector2d interpolation\n"); - vector2d interpolated; - (void)interpolated.interpolate(vec, otherVec, 0.f); - COMPARE_VECTORS(interpolated, otherVec); // 0.f means all the second vector - - (void)interpolated.interpolate(vec, otherVec, 0.25f); - COMPARE_VECTORS(interpolated, vector2d((T)8.75, (T)16.25)); - - (void)interpolated.interpolate(vec, otherVec, 0.75f); - COMPARE_VECTORS(interpolated, vector2d((T)6.25, (T)8.75)); - - (void)interpolated.interpolate(vec, otherVec, 1.f); - COMPARE_VECTORS(interpolated, vec); // 1.f means all the first vector - - - interpolated = vec.getInterpolated(otherVec, 0.f); - COMPARE_VECTORS(interpolated, otherVec); // 0.f means all the second vector - - interpolated = vec.getInterpolated(otherVec, 0.25f); - COMPARE_VECTORS(interpolated, vector2d((T)8.75, (T)16.25)); - - interpolated = vec.getInterpolated(otherVec, 0.75f); - COMPARE_VECTORS(interpolated, vector2d((T)6.25, (T)8.75)); - - interpolated = vec.getInterpolated(otherVec, 1.f); - COMPARE_VECTORS(interpolated, vec); // 1.f means all the first vector - - - logTestString("vector2d quadratic interpolation\n"); - vector2d thirdVec(20, 10); - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.f); - COMPARE_VECTORS(interpolated, vec); // 0.f means all the 1st vector - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.25f); - COMPARE_VECTORS(interpolated, vector2d((T)7.8125, (T)10.9375)); - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.5f); - COMPARE_VECTORS(interpolated, vector2d((T)11.25, (T)13.75)); - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.75f); - COMPARE_VECTORS(interpolated, vector2d((T)15.3125, (T)13.4375)); - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 1.f); - COMPARE_VECTORS(interpolated, thirdVec); // 1.f means all the 3rd vector - - // check if getAngle returns values matching those of the double precision version - logTestString("vector2d getAngle\n"); - for (s32 i=0; i<200; ++i) - { - core::vector2d tmp((T)-1, (T)(-100+i)); - core::vector2d ref(-1, -100+i); - if (!equals(tmp.getAngle(),ref.getAngle(), 0.0003)) - { - logTestString("\nERROR: angle %.16f != angle %.16f\n", - tmp.getAngle(), ref.getAngle()); - return false; - } - f32 val = atan2f((float)tmp.Y, (float)tmp.X)*core::RADTODEG; - if (val<=0) - val=-val; - else - val=360-val; - if (!equals((f32)tmp.getAngle(),val, 0.5f)) - { - logTestString("\nERROR: angle %.16f != atan2 %.16f\n vector %.16f, %.16f\n", - tmp.getAngle(), val, tmp.X, tmp.Y); - return false; - } - tmp = core::vector2d((T)1, (T)(-100+i)); - ref = core::vector2d(1, -100+i); - if (!equals(tmp.getAngle(),ref.getAngle(), 0.0003)) - { - logTestString("\nERROR: angle %.16f != angle %.16f\n", - tmp.getAngle(), ref.getAngle()); - return false; - } - val = atan2f((f32)tmp.Y, (f32)tmp.X)*core::RADTODEG; - if (val<=0) - val=-val; - else - val=360-val; - if (!equals((f32)tmp.getAngle(),val, 0.5f)) - { - logTestString("\nERROR: angle %.16f != atan2 %.16f\n vector %.16f, %.16f\n", - tmp.getAngle(), val, tmp.X, tmp.Y); - return false; - } - } - core::vector2d tmp(0, -100); - core::vector2d ref(0, -100); - if (!equals(tmp.getAngle(),ref.getAngle())) - { - logTestString("\nERROR: angle %.16f != angle %.16f\n", - tmp.getAngle(), ref.getAngle()); - return false; - } - tmp = core::vector2d(0, 100); - ref = core::vector2d(0, 100); - if (!equals(tmp.getAngle(),ref.getAngle())) - { - logTestString("\nERROR: angle %.16f != angle %.16f\n", - tmp.getAngle(), ref.getAngle()); - return false; - } - tmp = core::vector2d(static_cast(-1.53080559e-16), static_cast(2.49999523)); - ref = core::vector2d(-1.53080559e-16, 2.49999523); - if (!equals(tmp.getAngle(),ref.getAngle())) - { - logTestString("\nERROR: angle %.16f != angle %.16f\n", - tmp.getAngle(), ref.getAngle()); - return false; - } - - core::vector2d zeroZero(0, 0); - core::vector2d oneOne(1, 1); - // Check if comparing (0.0, 0.0) with (1.0, 1.0) returns false. - if(zeroZero == oneOne) - { - logTestString("\nERROR: vector2d %.16f, %.16f == vector2d %.16f, %.16f\n", - (f64)zeroZero.X, (f64)zeroZero.Y, (f64)oneOne.X, (f64)oneOne.Y); - return false; - } - - return true; -} - -/** Test the functionality of vector2d, particularly methods that - involve calculations done using different precision than . - Note that all reference vector2ds are creating using double precision - values cast to (T), as we need to test . */ -bool testVector2d(void) -{ - bool f32Success = doTests(); - if(f32Success) - logTestString("vector2df tests passed\n\n"); - else - logTestString("\n*** vector2df tests failed ***\n\n"); - - bool f64Success = doTests(); - if(f64Success) - logTestString("vector2d tests passed\n\n"); - else - logTestString("\n*** vector2d tests failed ***\n\n"); - - bool s32Success = doTests(); - if(s32Success) - logTestString("vector2di tests passed\n\n"); - else - logTestString("\n*** vector2di tests failed ***\n\n"); - - return f32Success && f64Success && s32Success; -} - diff --git a/lib/irrlicht/tests/testVector3d.cpp b/lib/irrlicht/tests/testVector3d.cpp deleted file mode 100644 index fa22b9c2f..000000000 --- a/lib/irrlicht/tests/testVector3d.cpp +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -#define EQUAL_VECTORS(compare, with)\ - if(!equalVectors(cmp_equal >(compare), with)) {assert(false); return false;} - -#define LESS_VECTORS(compare, with)\ - if(!equalVectors(cmp_less >(compare), with)) return false; - -#define LESS_EQUAL_VECTORS(compare, with)\ - if(!equalVectors(cmp_less_equal >(compare), with)) return false; - -#define MORE_VECTORS(compare, with)\ - if(!equalVectors(cmp_more >(compare), with)) return false; - -#define MORE_EQUAL_VECTORS(compare, with)\ - if(!equalVectors(cmp_more_equal >(compare), with)) return false; - -// check if the vector contains a NAN (a==b is guaranteed to return false in this case) -template -static bool is_nan(const core::vector3d &vec ) -{ - return ( !(vec.X == vec.X) - || !(vec.Y == vec.Y) - || !(vec.Z == vec.Z) ); -} - -template -struct cmp_less -{ - cmp_less(const T& a) : val(a) {} - bool operator()(const T& other) const - { - return val -struct cmp_less_equal -{ - cmp_less_equal(const T& a) : val(a) {} - bool operator()(const T& other) const - { - return val<=other; - } - const char* getName() const {return "<=";} - const T val; -}; - -template -struct cmp_more -{ - cmp_more(const T& a) : val(a) {} - bool operator()(const T& other) const - { - return val>other; - } - const char* getName() const {return ">";} - const T val; -}; - -template -struct cmp_more_equal -{ - cmp_more_equal(const T& a) : val(a) {} - bool operator()(const T& other) const - { - return val>=other; - } - const char* getName() const {return ">=";} - const T val; -}; - -template -struct cmp_equal -{ - cmp_equal(const T& a) : val(a) {} - bool operator()(const T& other) const - { - return val.equals(other); - } - const char* getName() const {return "==";} - const T val; -}; - -template -static bool equalVectors(const S& compare, - const core::vector3d & with) -{ - if (!compare(with)) - { - logTestString("\nERROR: vector3d %.16f, %.16f, %.16f %s vector3d %.16f, %.16f, %.16f\n", - (f64)compare.val.X, (f64)compare.val.Y, (f64)compare.val.Z, compare.getName(), - (f64)with.X, (f64)with.Y, (f64)with.Z); - assert_log(compare(with)); - return false; - } - - return true; -} - -template -static bool checkInterpolation() -{ - core::vector3d vec(5, 5, 0); - core::vector3d otherVec(10, 20, 40); - - vector3d interpolated; - (void)interpolated.interpolate(vec, otherVec, 0.f); - EQUAL_VECTORS(interpolated, otherVec); // 0.f means all the second vector - - (void)interpolated.interpolate(vec, otherVec, 0.25f); - EQUAL_VECTORS(interpolated, vector3d((T)8.75, (T)16.25, 30)); - - (void)interpolated.interpolate(vec, otherVec, 0.75f); - EQUAL_VECTORS(interpolated, vector3d((T)6.25, (T)8.75, 10)); - - (void)interpolated.interpolate(vec, otherVec, 1.f); - EQUAL_VECTORS(interpolated, vec); // 1.f means all the first vector - - - interpolated = vec.getInterpolated(otherVec, 0.f); - EQUAL_VECTORS(interpolated, otherVec); // 0.f means all the second vector - - interpolated = vec.getInterpolated(otherVec, 0.25f); - EQUAL_VECTORS(interpolated, vector3d((T)8.75, (T)16.25, 30)); - - interpolated = vec.getInterpolated(otherVec, 0.75f); - EQUAL_VECTORS(interpolated, vector3d((T)6.25, (T)8.75, 10)); - - interpolated = vec.getInterpolated(otherVec, 1.f); - EQUAL_VECTORS(interpolated, vec); // 1.f means all the first vector - - - vector3d thirdVec(20, 10, -30); - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.f); - EQUAL_VECTORS(interpolated, vec); // 0.f means all the 1st vector - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.25f); - EQUAL_VECTORS(interpolated, vector3d((T)7.8125, (T)10.9375, (T)13.125)); - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.5f); - EQUAL_VECTORS(interpolated, vector3d((T)11.25, (T)13.75, (T)12.5)); - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.75f); - EQUAL_VECTORS(interpolated, vector3d((T)15.3125, (T)13.4375, (T)-1.875)); - - interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 1.f); - EQUAL_VECTORS(interpolated, thirdVec); // 1.f means all the 3rd vector - return true; -} - -template -static bool checkAngleCalculations() -{ - core::vector3d vec(5, 5, 0); - EQUAL_VECTORS(vec.getHorizontalAngle(), vector3d(315, (T)90.0, 0)); - EQUAL_VECTORS(vec.getSphericalCoordinateAngles(), vector3d((T)45.0, 0, 0)); - return true; -} - -template -static bool checkRotations() -{ - core::vector3d vec(5, 5, 0); - vector3d center(0, 0, 0); - - vec.rotateXYBy(45, center); - EQUAL_VECTORS(vec, vector3d(0, (T)7.0710678118654755, 0)); - - vec.normalize(); - // TODO: This breaks under Linux/gcc due to FP differences, but is no bug - if (((T)0.5f)>0.f) - EQUAL_VECTORS(vec, vector3d(0, (T)1.0, 0)); - - vec.set(10, 10, 10); - center.set(5, 5, 10); - vec.rotateXYBy(-5, center); - // -5 means rotate clockwise slightly, so expect the X to increase - // slightly and the Y to decrease slightly. - EQUAL_VECTORS(vec, vector3d((T)10.416752204197017, (T)9.5451947767204359, 10)); - - vec.set(10, 10, 10); - center.set(5, 10, 5); - vec.rotateXZBy(-5, center); - EQUAL_VECTORS(vec, vector3d((T)10.416752204197017, 10, (T)9.5451947767204359)); - - vec.set(10, 10, 10); - center.set(10, 5, 5); - vec.rotateYZBy(-5, center); - EQUAL_VECTORS(vec, vector3d(10, (T)10.416752204197017, (T)9.5451947767204359)); - - vec.set(5, 5, 0); - vec.normalize(); - EQUAL_VECTORS(vec, vector3d((T)0.70710681378841400, (T)0.70710681378841400, 0)); - return true; -} - -template -static bool doTests() -{ - vector3d vec(-5, 5, 0); - vector3d otherVec((T)-5.1, 5, 0); - if(!vec.equals(otherVec, (T)0.1)) - { - logTestString("vector3d::equals failed\n"); - assert_log(0); - return false; - } - - vec.set(5, 5, 0); - otherVec.set(10, 20, 0); - if(!equals(vec.getDistanceFrom(otherVec), (T)15.8113883)) - { - logTestString("vector3d::getDistanceFrom() failed\n"); - assert_log(0); - return false; - } - - if (!checkRotations()) - return false; - - if (!checkInterpolation()) - return false; - - if (!checkAngleCalculations()) - return false; - - vec.set(0,0,0); - vec.setLength(99); - if ( is_nan(vec) ) - return false; - - core::vector3d zeroZero(0, 0, 0); - core::vector3d oneOne(1, 1, 1); - // Check if comparing (0.0, 0.0, 0.0) with (1.0, 1.0, 1.0) returns false. - if(zeroZero == oneOne) - { - logTestString("\nERROR: vector3d %.16f, %.16f, %.16f == vector3d %.16f, %.16f, %.16f\n", - (f64)zeroZero.X, (f64)zeroZero.Y, (f64)zeroZero.Z, - (f64)oneOne.X, (f64)oneOne.Y, (f64)oneOne.Z); - return false; - } - - vec.set(5, 5, 0); - - otherVec.set(10, 20, 40); - LESS_VECTORS(vec, otherVec); - LESS_EQUAL_VECTORS(vec, otherVec); - MORE_VECTORS(otherVec, vec); - MORE_EQUAL_VECTORS(otherVec, vec); - - vec.set(-1,-1,1); - otherVec.set(1,-1,1); - LESS_VECTORS(vec, otherVec); - LESS_EQUAL_VECTORS(vec, otherVec); - MORE_VECTORS(otherVec, vec); - MORE_EQUAL_VECTORS(otherVec, vec); - - LESS_EQUAL_VECTORS(vec, vec); - MORE_EQUAL_VECTORS(vec, vec); - - return true; -} - - -/** Test the functionality of vector3d, particularly methods that - involve calculations done using different precision than . - Note that all reference vector3ds are creating using double precision - values cast to (T), as we need to test . */ -bool testVector3d(void) -{ - const bool f32Success = doTests(); - if (f32Success) - logTestString("vector3df tests passed\n\n"); - else - logTestString("\n*** vector3df tests failed ***\n\n"); - - const bool f64Success = doTests(); - if (f64Success) - logTestString("vector3d tests passed\n\n"); - else - logTestString("\n*** vector3d tests failed ***\n\n"); - - const bool s32Success = doTests(); - if (s32Success) - logTestString("vector3di tests passed\n\n"); - else - logTestString("\n*** vector3di tests failed ***\n\n"); - - return f32Success && f64Success && s32Success; -} - diff --git a/lib/irrlicht/tests/testXML.cpp b/lib/irrlicht/tests/testXML.cpp deleted file mode 100644 index 29a210d42..000000000 --- a/lib/irrlicht/tests/testXML.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (C) 2009-2012 Christian Stehno -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -bool simple_xml( irr::io::IFileSystem * fs ) -{ - io::IXMLReaderUTF8* reader = fs->createXMLReaderUTF8("media/test.xml"); - if (!reader) - { - logTestString("Could not create XML reader.\n"); - return false; - } - - const core::stringc expected[] = { - "a", "b", "c" - }; - - bool retVal = true; - u32 i=0; - while(reader->read()) - { - if (reader->getNodeType() == io::EXN_ELEMENT) - { - if (expected[i++] != reader->getNodeName()) - { - logTestString("Did not find expected string in XML element name.\n"); - retVal = false; - break; - } - } - } - - reader->drop(); - return retVal; -} - -// CDATA should return everything between "![CDATA[" and "]]>" as it's in the file -bool cdata( irr::io::IFileSystem * fs ) -{ - io::IXMLReaderUTF8* reader = fs->createXMLReaderUTF8("media/cdata.xml"); - if (!reader) - { - logTestString("Could not create XML reader.\n"); - return false; - } - - const core::stringc textNode("text"); - core::array< core::stringc > compareStrings; - compareStrings.push_back("simple"); - compareStrings.push_back(""); - compareStrings.push_back("] ]> "); - compareStrings.push_back("]\n]> "); - compareStrings.push_back("\nNewlines\n\tand tabs\n\t\tgogogo"); - compareStrings.push_back("&&#@#$%*()@#$%*()#$%*("); - compareStrings.push_back("& & && &&& &a &ü &ä &ö &&#"); - - bool result = true; - size_t count = 0; - while(reader->read()) - { - if (reader->getNodeType() == io::EXN_ELEMENT) - { - if ( core::stringc(reader->getNodeName()) == textNode ) - { - while(reader->read()) - { - if (reader->getNodeType() == io::EXN_CDATA) - { - core::stringc data = reader->getNodeData(); - core::stringc name = reader->getNodeName(); - if ( count == compareStrings.size() ) - { - logTestString("too many cdata elements for reading in %s:%d\n", __FILE__, __LINE__); - } - else if ( count < compareStrings.size() ) - { - core::stringc cmpString(compareStrings[count]); - - // some (unused) variables to ease debugging - // const c8* dataRaw = data.c_str(); - // const c8* cmpRaw = cmpString.c_str(); - if ( cmpString != data ) - { - result = false; - logTestString("cdata read failed for string %d in %s:%d\n", count, __FILE__, __LINE__); - } - } - ++count; - } - if ( reader->getNodeType() == io::EXN_ELEMENT_END ) - { - break; - } - } - } - } - } - - reader->drop(); - return result; -} - -bool attributeValues(irr::io::IFileSystem * fs) -{ - io::IXMLReaderUTF8* reader = fs->createXMLReaderUTF8("media/attributes.xml"); - if (!reader) - { - logTestString("Could not create XML reader.\n"); - return false; - } - - bool result = true; - bool hasNode = false; - while (reader->read()) - { - if (io::EXN_ELEMENT == reader->getNodeType() ) - { - if ( core::stringc(reader->getNodeName()) == core::stringc("element_position") ) - { - hasNode = true; - int id1 = reader->getAttributeValueAsInt("id1"); - if ( id1 != 152722522 ) - { - logTestString("id1 is %d in %s:%d\n", id1, __FILE__, __LINE__); - result = false; - } - int id2 = reader->getAttributeValueAsInt("id2"); - result &= id2 == 3; - int x = reader->getAttributeValueAsInt("x"); - result &= x == 301; - int y = reader->getAttributeValueAsInt("y"); - result &= y == 118; - } - } - } - - if ( !hasNode ) - { - logTestString("missing node in xml in %s:%d\n", __FILE__, __LINE__); - return false; - } - - reader->drop(); - return result; -} - -/** Tests for XML handling */ -bool testXML(void) -{ - IrrlichtDevice *device = createDevice(video::EDT_NULL, dimension2du(400, 200)); - - bool result = true; - - logTestString("Test simple XML reader features.\n"); - result &= simple_xml(device->getFileSystem()); - logTestString("Test XML reader CDATA support.\n"); - result &= cdata(device->getFileSystem()); - logTestString("Test XML reader attribute support.\n"); - result &= attributeValues(device->getFileSystem()); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} diff --git a/lib/irrlicht/tests/testaabbox.cpp b/lib/irrlicht/tests/testaabbox.cpp deleted file mode 100644 index a14c7c012..000000000 --- a/lib/irrlicht/tests/testaabbox.cpp +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -// These tests are also only called for f32 and f64, due to conversion problems -// in the respective methods. -template -static bool checkCollisions() -{ - aabbox3d one(0,0,0,4,4,4); - aabbox3d two(2,2,2,4,4,4); - - if (two.getInterpolated(one, 1) != two) - { - logTestString("aabbox3d interpolation wrong on 1\n"); - return false; - } - if (two.getInterpolated(one, 0) != one) - { - logTestString("aabbox3d interpolation wrong on 0\n"); - return false; - } - aabbox3d three(two.getInterpolated(one, 0.5f)); - if (two == one) - { - logTestString("aabbox3d interpolation wrong on 0.5 (right)\n"); - return false; - } - if (two == three) - { - logTestString("aabbox3d interpolation wrong on 0.5 (left)\n"); - return false; - } - three.reset(aabbox3d(2,2,2,5,5,5)); - if (!two.isFullInside(one)) - { - logTestString("small aabbox3d is not fully inside\n"); - return false; - } - if (three.isFullInside(one)) - { - logTestString("large aabbox3d is fully inside\n"); - return false; - } - - if (!two.intersectsWithBox(one)) - { - logTestString("small aabbox3d does not intersect\n"); - return false; - } - if (!three.intersectsWithBox(one)) - { - logTestString("large aabbox3d does not intersect\n"); - return false; - } - - core::line3d line(-2,-2,-2,2,2,2); - if (!one.intersectsWithLine(line)) - { - logTestString("aabbox3d does not intersect with line(1)\n"); - return false; - } - line.end.set(2,2,10); - if (!one.intersectsWithLine(line)) - { - logTestString("aabbox3d does not intersect with line(2)\n"); - return false; - } - line.end.set(0,2,10); - if (one.intersectsWithLine(line)) - { - logTestString("aabbox3d does intersect with line(3)\n"); - return false; - } - return true; -} - -template -static bool checkPoints() -{ - aabbox3d one(-1,-2,-3,2,2,2); - - if (!one.isPointInside(core::vector3d(-1,-2,-3))) - { - logTestString("isPointInside failed with min vertex\n"); - return false; - } - if (!one.isPointInside(core::vector3d(-1,2,-3))) - { - logTestString("isPointInside failed with other min vertex\n"); - return false; - } - if (!one.isPointInside(core::vector3d(2,-2,2))) - { - logTestString("isPointInside failed with other max vertex\n"); - return false; - } - if (!one.isPointInside(core::vector3d(2,2,2))) - { - logTestString("isPointInside failed with max vertex\n"); - return false; - } - if (!one.isPointInside(core::vector3d(0,0,0))) - { - logTestString("isPointInside failed with origin\n"); - return false; - } - if (!one.isPointInside(core::vector3d((T)1.2,-1,1))) - { - logTestString("isPointInside failed with random point inside\n"); - return false; - } - if (one.isPointInside(core::vector3d(-2,-2,-3))) - { - logTestString("isPointInside failed near min vertex\n"); - return false; - } - if (one.isPointInside(core::vector3d(2,3,2))) - { - logTestString("isPointInside failed near max vertex\n"); - return false; - } - if (one.isPointInside(core::vector3d(3,0,0))) - { - logTestString("isPointInside failed near origin\n"); - return false; - } - if (one.isPointInside(core::vector3d((T)10.2,-1,1))) - { - logTestString("isPointInside failed with random point outside\n"); - return false; - } - if (one.isPointTotalInside(core::vector3d(-1,-2,-3))) - { - logTestString("isPointTotalInside failed with min vertex\n"); - return false; - } - if (one.isPointTotalInside(core::vector3d(-1,2,-3))) - { - logTestString("isPointTotalInside failed with other min vertex\n"); - return false; - } - if (one.isPointTotalInside(core::vector3d(2,-2,2))) - { - logTestString("isPointTotalInside failed with other max vertex\n"); - return false; - } - if (one.isPointTotalInside(core::vector3d(2,2,2))) - { - logTestString("isPointTotalInside failed with max vertex\n"); - return false; - } - if (!one.isPointTotalInside(core::vector3d(0,0,0))) - { - logTestString("isPointTotalInside failed with origin\n"); - return false; - } - if (!one.isPointTotalInside(core::vector3d((T)1.2,-1,1))) - { - logTestString("isPointTotalInside failed with random point inside\n"); - return false; - } - if (one.isPointTotalInside(core::vector3d((T)10.2,-1,1))) - { - logTestString("isPointTotalInside failed with random point outside\n"); - return false; - } - - core::plane3d plane(core::vector3d(0,0,-1), -10); - if (one.classifyPlaneRelation(plane) != core::ISREL3D_BACK) - { - logTestString("box not behind\n"); - return false; - } - plane.D=0; - if (one.classifyPlaneRelation(plane) != core::ISREL3D_CLIPPED) - { - logTestString("box not clipped\n"); - return false; - } - plane.D=10; - if (one.classifyPlaneRelation(plane) != core::ISREL3D_FRONT) - { - logTestString("box not in front\n"); - return false; - } - return true; -} - -template -static bool doTests() -{ - aabbox3d empty; - aabbox3d one(-1,-1,-1,1,1,1); - if (empty != one) - { - logTestString("default aabbox3d wrong, or comparison failed\n"); - return false; - } - if (empty.getCenter() != core::vector3d(0,0,0)) - { - logTestString("default aabbox3d has wrong Center\n"); - return false; - } - if (empty.getExtent() != core::vector3d(2,2,2)) - { - logTestString("default aabbox3d has wrong Extent\n"); - return false; - } - if (empty.isEmpty()) - { - logTestString("default aabbox3d is empty\n"); - return false; - } - if (empty.getVolume() != 8) - { - logTestString("default aabbox3d has wrong volume\n"); - return false; - } - if (empty.getArea() != 24) - { - logTestString("default aabbox3d has wrong area\n"); - return false; - } - aabbox3d two(core::vector3d(-1,-1,-1),core::vector3d(2,2,2)); - if (empty == two) - { - logTestString("empty aabbox3d too large, or comparison failed\n"); - return false; - } - if (two.getCenter() != core::vector3d((T)0.5,(T)0.5,(T)0.5)) - { - logTestString("extended aabbox3d has wrong Center\n"); - return false; - } - if (two.getExtent() != core::vector3d(3,3,3)) - { - logTestString("extended aabbox3d has wrong Extent\n"); - return false; - } - if (two.isEmpty()) - { - logTestString("extended aabbox3d is empty\n"); - return false; - } - if (two.getVolume() != 27) - { - logTestString("extended aabbox3d has wrong volume\n"); - return false; - } - if (two.getArea() != 54) - { - logTestString("extended aabbox3d has wrong area\n"); - return false; - } - one.reset(1,1,1); - if (one==empty) - { - logTestString("reset failed, or comparison failed\n"); - return false; - } - if (one.getCenter() != core::vector3d(1,1,1)) - { - logTestString("singular aabbox3d has wrong Center\n"); - return false; - } - if (one.getExtent() != core::vector3d(0,0,0)) - { - logTestString("singular aabbox3d has Extent\n"); - return false; - } - if (!one.isEmpty()) - { - logTestString("empty aabbox3d is not empty\n"); - return false; - } - if (one.getVolume() != 0) - { - logTestString("empty aabbox3d has wrong volume\n"); - return false; - } - if (one.getArea() != 0) - { - logTestString("empty aabbox3d has wrong area\n"); - return false; - } - one.addInternalPoint(core::vector3d(-1,-1,-1)); - if (one!=empty) - { - logTestString("addInternalPoint failed, creating default bbox\n"); - return false; - } - one.reset(1,1,1); - one.reset(empty); - if (one!=empty) - { - logTestString("reset with bbox failed, creating default bbox\n"); - return false; - } - one.addInternalPoint(core::vector3d(2,2,2)); - if (one != two) - { - logTestString("addInternalPoint for aabbox3d failed.\n"); - return false; - } - one.addInternalBox(empty); - if (one != two) - { - logTestString("addInternalBox with smaller box failed.\n"); - return false; - } - one.addInternalBox(two); - if (one != two) - { - logTestString("addInternalBox with same box failed.\n"); - return false; - } - one.addInternalPoint(-1,-2,-3); - two.addInternalPoint(-1,-2,-3); - empty.addInternalBox(one); - if (empty != two) - { - logTestString("addInternalBox with larger box failed\n"); - return false; - } - if (one.getCenter() != core::vector3d((T)0.5,0,(T)-0.5)) - { - logTestString("large aabbox3d has wrong Center\n"); - return false; - } - if (one.getExtent() != core::vector3d(3,4,5)) - { - logTestString("large aabbox3d has wrong Extent\n"); - return false; - } - if (one.isEmpty()) - { - logTestString("large aabbox3d is empty\n"); - return false; - } - if (one.getVolume() != 60) - { - logTestString("large aabbox3d has wrong volume\n"); - return false; - } - if (one.getArea() != 94) - { - logTestString("large aabbox3d has wrong area\n"); - return false; - } - if (!checkPoints()) - return false; - return true; -} - - -/** Test the functionality of aabbox3d. */ -bool testaabbox3d(void) -{ - bool f32Success = doTests(); - f32Success &= checkCollisions(); - if(f32Success) - logTestString("aabbox3d tests passed\n\n"); - else - logTestString("\n*** aabbox3d tests failed ***\n\n"); - - bool f64Success = doTests(); - f64Success &= checkCollisions(); - if(f64Success) - logTestString("aabbox3d tests passed\n\n"); - else - logTestString("\n*** aabbox3d tests failed ***\n\n"); - - bool s32Success = doTests(); - if(s32Success) - logTestString("aabbox3d tests passed\n\n"); - else - logTestString("\n*** aabbox3d tests failed ***\n\n"); - - return f32Success && f64Success && s32Success; -} diff --git a/lib/irrlicht/tests/tests-last-passed-at.txt b/lib/irrlicht/tests/tests-last-passed-at.txt deleted file mode 100644 index 93e58447d..000000000 --- a/lib/irrlicht/tests/tests-last-passed-at.txt +++ /dev/null @@ -1,4 +0,0 @@ -Tests finished. 1 test of 1 passed. -Compiled as DEBUG -Test suite pass at GMT Thu Sep 6 19:39:44 2012 - diff --git a/lib/irrlicht/tests/tests-readme.txt b/lib/irrlicht/tests/tests-readme.txt deleted file mode 100644 index c40b81718..000000000 --- a/lib/irrlicht/tests/tests-readme.txt +++ /dev/null @@ -1,227 +0,0 @@ - -Welcome to the Irrlicht test suite. -=================================== -This is composed of a series of tests which exercise basic Irrlicht -functionality. These are not strictly unit tests, since there is no stub -framework that isolates each method under test. They do however test small -units of functionality and should help to isolate problems and spot -regressions. - -You are encouraged to run the tests whenever you make any significant code -change, and to add tests for any new or modified area of code. - -The overall test application will return a count of the number of tests that -failed, i.e. 0 is success. It will also log to tests/tests.log file, and on -success will update the tests/tests-last-passed-at.txt file (which gets -committed with code changes as a very basic verification that we're not -regressing). - - -Working directory -================= -Since the tests rely on the presence of /media and /empty/empty subdirectories, -the working directory must be the /tests directory, not /bin/$PLATFORM. This -means that you cannot run /bin/$PLATFORM/texts.exe from there. You can however -cd to /tests and run ../bin/$PLATFORM/tests.exe - - -Adding a new test -================= -To add a new test, e.g. "myNewTest": - -1) Create tests/myNewTest.cpp. At a minimum, this must contain a function with - the signature bool fnName(void), where fnName is the same as the filename - (without the .cpp suffix). - - This function must return true if the tests passes, or false if it fails. In - this example, the function should be: - - bool myNewTest(void) - { - ... - } - -2) Add myNewTest.cpp to the build targets in tests.cbp, tests_vc8.vcproj and - tests_vc9.vcproj. These are all text files that can be edited manually by - hand; just copy, paste and modify an existing source file entry. - -3) In tests/main.cpp, find the list of TEST() macro calls, and add a call to - your new test, using the TEST macro, e.g.: - - TEST(myNewTest); - -4) Run your test, and verify any images that it produces (see "Screenshots"). - -5) Remember to svn add tests/newNewTest.cpp and any new tests/media/ files. - -Your test will be run independently in its own indepedent process. It is -responsible for creating any required resources or Irrlicht interfaces, and for -cleaning up after itself and restoring the working directory to /tests. You do -not have to link against Irrlicht.lib; the whole application is already linked -to it. - - -Logging -======= -Please use logTestString() to log any interesting output or fails from your -test. This is declared in tests/testUtils.h. Its output goes to -tests/tests.log - - -Screenshots -=========== -testUtils.h/.cpp provides a function to create a screenshot and compare it with -a reference image. This is useful for validating new or changed functionality, -and for catching regressions. - -Call the unambiguously named takeScreenshotAndCompareAgainstReference() -function to do this. It needs an IVideoDriver (which it will use to create the -first part of the filename) and a unique filename including an image format -suffix, e.g. "-myNewTest.png". You should use .png as a suffix unless you have -a very specific need to use another format. Please avoid using .jpg as image -compression can introduce artifacts and false fails. - -Optionally, you can specify the amount of match that is required between the -produced screenshot and the reference image. While the images should match -exactly, we have found that OpenGL implementations can vary significantly -across test machines, often around 99% match (of total colour values across all -pixels). You may have to go as low as 98% for some images, but please try to -err on the side of strictness until we can determine that your test image needs -to be fuzzier on other peoples' machines. - -If takeScreenshotAndCompareAgainstReference() can't find an existing reference -image, it will create one from the screenshot. In effect, this means that you -have to run your test once (expecting it to fail) in order to produce the -initial reference images. The new images are created in tests/results with -filename: - -driverName-filename.suffix - -e.g. OpenGL-myNewTest.png (note that the OpenGL driver elides the actual OpenGL -version number from the filename, as this tends to differ between machines and -installations). - -You should check these new images carefully to ensure that they show exactly -what you expect. Please do not just assume that they do, as validating bad -behaviour is worse than not validating it at all! - -If the images do appear exactly as you expect, move them to the tests/media -directory, and re-run the tests. They should now pass. Remember to svn add -any new media files! - - -What to do when the tests fail -============================== -DON'T PANIC! - -This is a Good Thing. Failing tests challenge our assumptions and help us to -make Irrlicht more robust. - -First, check your working directory. The tests need to be run from the tests/ -directory, not a /bin subdirectory. You can do this using the working -directory in your debugger, or on the command line by running the tests -executable (wherever it is build) from the tests/ directory. - -If you need to debug a test, first move it temporarily to the start of the list -of TEST() macros. This is because each test runs in its own process, so only -the first test will have the debugger attached. - -If the fail is due to a bitmap difference, carefully compare the bitmaps, and -the amount of failure. The OpenGL device does tend to produce differences. You -should not just automatically make a test fuzzier, but if you can rule out any -real issue in the code, it can be valid to accept OpenGL image matches as low -as 98%. Other devices should not require this amount of fuzziness! - -If you can't figure out the reason for the failure (or better yet, if you can, -and think the tests and/or Irrlicht need updated), then please do raise the -issue in the bug forum: - -http://irrlicht.sourceforge.net/phpBB2/viewforum.php?f=7 - -We do want to hear about fails, and will thank you for finding them. - -Running specific tests -====================== -The app takes two parameters. First is the test to start with (starting at 0 -anddefaulting to 0), the second is the number of tests to run (beginning with -the one given as first parameter). If the second parameter is not given, all -existing tests are run (again starting with the first parameter). So, starting -the test suite without a parameter will really run all tests. Another special -parameter is '--list', which outputs a list of all existing tests and their -respective number. - -For debugging purposes it can make sense to run a test without spawning a -separate process for each test case. This can be switched off by a boolean flag -in main.cpp ('spawn=false'). - -Currently implemented tests -=========================== -000. disambiguateTextures -001. testIrrArray -002. testIrrMap -003. testIrrList -004. exports -005. irrCoreEquals -006. testIrrString -007. testLine2d -008. matrixOps -009. testDimension2d -010. testVector2d -011. testVector3d -012. testQuaternion -013. testS3DVertex -014. testaabbox3d -015. color -016. testTriangle3d -017. vectorPositionDimension2d -018. filesystem -019. archiveReader -020. testXML -021. serializeAttributes -022. fast_atof -023. loadTextures -024. collisionResponseAnimator -025. enumerateImageManipulators -026. removeCustomAnimator -027. sceneCollisionManager -028. sceneNodeAnimator -029. meshLoaders -030. testTimer -031. softwareDevice -032. b3dAnimation -033. burningsVideo -034. billboards -035. createImage -036. cursorSetVisible -037. flyCircleAnimator -038. guiDisabledMenu -039. makeColorKeyTexture -040. md2Animation -041. meshTransform -042. skinnedMesh -043. testGeometryCreator -044. writeImageToFile -045. ioScene -046. videoDriver -047. screenshot -048. drawPixel -049. drawRectOutline -050. drawVertexPrimitive -051. material -052. renderTargetTexture -053. textureFeatures -054. textureRenderStates -055. transparentMaterials -056. userclipplane -057. antiAliasing -058. draw2DImage -059. lights -060. twodmaterial -061. viewPort -062. mrt -063. projectionMatrix -064. planeMatrix -065. terrainSceneNode -066. lightMaps -067. triangleSelector - diff --git a/lib/irrlicht/tests/tests.cbp b/lib/irrlicht/tests/tests.cbp deleted file mode 100644 index 2fa46f48c..000000000 --- a/lib/irrlicht/tests/tests.cbp +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - diff --git a/lib/irrlicht/tests/tests.workspace b/lib/irrlicht/tests/tests.workspace deleted file mode 100644 index 069224f86..000000000 --- a/lib/irrlicht/tests/tests.workspace +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/lib/irrlicht/tests/tests_vc10.sln b/lib/irrlicht/tests/tests_vc10.sln deleted file mode 100644 index d94b7c138..000000000 --- a/lib/irrlicht/tests/tests_vc10.sln +++ /dev/null @@ -1,76 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests_vc10.vcxproj", "{2A1DE18B-F678-4A94-A996-E848E20B2983}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release - Fast FPU|Win32 = Release - Fast FPU|Win32 - Release - Fast FPU|x64 = Release - Fast FPU|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Static lib - Debug|Win32 = Static lib - Debug|Win32 - Static lib - Debug|x64 = Static lib - Debug|x64 - Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 - Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64 - Static lib - Release|Win32 = Static lib - Release|Win32 - Static lib - Release|x64 = Static lib - Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|x64.ActiveCfg = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|x64.Build.0 = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|x64.Build.0 = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|x64.Build.0 = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|x64.ActiveCfg = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|x64.Build.0 = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|x64.Build.0 = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|x64.Build.0 = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/tests/tests_vc10.vcxproj b/lib/irrlicht/tests/tests_vc10.vcxproj deleted file mode 100644 index 81d8287ac..000000000 --- a/lib/irrlicht/tests/tests_vc10.vcxproj +++ /dev/null @@ -1,233 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - tests - {2A1DE18B-F678-4A94-A996-E848E20B2983} - tests - - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\Win32-VisualStudio\ - ..\bin\Win64-VisualStudio\ - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - ..\bin\Win32-VisualStudio\ - ..\bin\Win64-VisualStudio\ - - - - Disabled - ..\include;%(AdditionalIncludeDirectories) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - - - ..\lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - true - - - - - - - Disabled - ..\include;%(AdditionalIncludeDirectories) - EnableFastChecks - MultiThreadedDebugDLL - Level3 - - - ..\lib\Win64-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - true - - - - - - - MaxSpeed - true - ..\include;%(AdditionalIncludeDirectories) - MultiThreadedDLL - true - Level3 - - - ..\lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - false - true - true - - - - - - - MaxSpeed - true - ..\include;%(AdditionalIncludeDirectories) - MultiThreadedDLL - true - Level3 - - - ..\lib\Win64-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {e08e042a-6c45-411b-92be-3cc31331019f} - false - - - - - - \ No newline at end of file diff --git a/lib/irrlicht/tests/tests_vc11.sln b/lib/irrlicht/tests/tests_vc11.sln deleted file mode 100644 index 85e0fa4eb..000000000 --- a/lib/irrlicht/tests/tests_vc11.sln +++ /dev/null @@ -1,76 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests_vc11.vcxproj", "{2A1DE18B-F678-4A94-A996-E848E20B2983}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht11.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release - Fast FPU|Win32 = Release - Fast FPU|Win32 - Release - Fast FPU|x64 = Release - Fast FPU|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Static lib - Debug|Win32 = Static lib - Debug|Win32 - Static lib - Debug|x64 = Static lib - Debug|x64 - Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 - Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64 - Static lib - Release|Win32 = Static lib - Release|Win32 - Static lib - Release|x64 = Static lib - Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|x64.ActiveCfg = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|x64.Build.0 = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|x64.Build.0 = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|x64.Build.0 = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|x64.ActiveCfg = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|x64.Build.0 = Debug|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|x64.Build.0 = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|x64.ActiveCfg = Release|x64 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|x64.Build.0 = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/tests/tests_vc11.vcxproj b/lib/irrlicht/tests/tests_vc11.vcxproj deleted file mode 100644 index 205767b43..000000000 --- a/lib/irrlicht/tests/tests_vc11.vcxproj +++ /dev/null @@ -1,237 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - tests - {2A1DE18B-F678-4A94-A996-E848E20B2983} - tests - - - - Application - MultiByte - true - v110 - - - Application - MultiByte - true - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\Win32-VisualStudio\ - ..\bin\Win64-VisualStudio\ - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - ..\bin\Win32-VisualStudio\ - ..\bin\Win64-VisualStudio\ - - - - Disabled - ..\include;%(AdditionalIncludeDirectories) - true - EnableFastChecks - MultiThreadedDebugDLL - Level3 - - - ..\lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - true - - - - - - - Disabled - ..\include;%(AdditionalIncludeDirectories) - EnableFastChecks - MultiThreadedDebugDLL - Level3 - - - ..\lib\Win64-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - true - - - - - - - MaxSpeed - true - ..\include;%(AdditionalIncludeDirectories) - MultiThreadedDLL - true - Level3 - - - ..\lib\Win32-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - false - true - true - - - - - - - MaxSpeed - true - ..\include;%(AdditionalIncludeDirectories) - MultiThreadedDLL - true - Level3 - - - ..\lib\Win64-visualstudio\Irrlicht.lib;%(AdditionalDependencies) - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {e08e042a-6c45-411b-92be-3cc31331019f} - false - - - - - - diff --git a/lib/irrlicht/tests/tests_vc8.sln b/lib/irrlicht/tests/tests_vc8.sln deleted file mode 100644 index 7a15dbbee..000000000 --- a/lib/irrlicht/tests/tests_vc8.sln +++ /dev/null @@ -1,49 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests_vc8.vcproj", "{2A1DE18B-F678-4A94-A996-E848E20B2983}" - ProjectSection(ProjectDependencies) = postProject - {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release - Fast FPU|Win32 = Release - Fast FPU|Win32 - Release|Win32 = Release|Win32 - Static lib - Debug|Win32 = Static lib - Debug|Win32 - Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 - Static lib - Release|Win32 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/tests/tests_vc8.vcproj b/lib/irrlicht/tests/tests_vc8.vcproj deleted file mode 100644 index 9feb721dd..000000000 --- a/lib/irrlicht/tests/tests_vc8.vcproj +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/irrlicht/tests/tests_vc9.sln b/lib/irrlicht/tests/tests_vc9.sln deleted file mode 100644 index efbeaad19..000000000 --- a/lib/irrlicht/tests/tests_vc9.sln +++ /dev/null @@ -1,49 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests_vc9.vcproj", "{2A1DE18B-F678-4A94-A996-E848E20B2983}" - ProjectSection(ProjectDependencies) = postProject - {E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "..\source\Irrlicht\Irrlicht9.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release - Fast FPU|Win32 = Release - Fast FPU|Win32 - Release|Win32 = Release|Win32 - Static lib - Debug|Win32 = Static lib - Debug|Win32 - Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32 - Static lib - Release|Win32 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Release|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.ActiveCfg = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Debug|Win32.Build.0 = Debug|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release - Fast FPU|Win32.Build.0 = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.ActiveCfg = Release|Win32 - {2A1DE18B-F678-4A94-A996-E848E20B2983}.Static lib - Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32 - {E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/irrlicht/tests/tests_vc9.vcproj b/lib/irrlicht/tests/tests_vc9.vcproj deleted file mode 100644 index 52cf0164d..000000000 --- a/lib/irrlicht/tests/tests_vc9.vcproj +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/irrlicht/tests/textureFeatures.cpp b/lib/irrlicht/tests/textureFeatures.cpp deleted file mode 100644 index de7560edd..000000000 --- a/lib/irrlicht/tests/textureFeatures.cpp +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -namespace -{ -//! check miplevels by visual test -bool renderMipLevels(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - if (!driver->queryFeature(video::EVDF_MIP_MAP)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::ISceneNode* n = smgr->addCubeSceneNode(); - scene::ISceneNode* n2 = smgr->addCubeSceneNode(10, 0, -1, core::vector3df(20,0,30), core::vector3df(0,45,0)); - - // we use a main texture with blue on top and red below - // and mipmap with pink on top and cyan below - if (n && n2) - { - // create the texture and miplevels with distinct colors - u32 texData[16*16]; - for (u32 i=0; i<16*16; ++i) - texData[i]=(i<8*16?0xff0000ff:0xffff0000); - video::IImage* image = driver->createImageFromData(video::ECF_A8R8G8B8, core::dimension2du(16,16), texData, false); - u32 mipdata[8*16]; - u32 index=0; - for (u32 j=8; j>0; j/=2) - { - for (u32 i=0; iaddTexture("miptest", image, mipdata); - if (!tex) - // is probably an error in the mipdata handling - return false; - else - { - n->setMaterialFlag(video::EMF_LIGHTING, false); - n->setMaterialTexture(0, tex); - n2->setMaterialFlag(video::EMF_LIGHTING, false); - n2->setMaterialTexture(0, tex); - } - image->drop(); - } - - (void)smgr->addCameraSceneNode(0, core::vector3df(10,0,-30)); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-renderMipmap.png"); - - if (!result) - logTestString("mipmap render failed.\n", driver->getName()); - else - logTestString("Passed\n"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -//! Tests locking miplevels -bool lockAllMipLevels(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - if (!driver->queryFeature(video::EVDF_MIP_MAP)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::ISceneNode* n = smgr->addCubeSceneNode(); - - if (n) - { - // create the texture and miplevels with distinct colors - u32 texData[16*16]; - for (u32 i=0; i<16*16; ++i) - texData[i]=0xff0000ff-i; - video::IImage* image = driver->createImageFromData(video::ECF_A8R8G8B8, core::dimension2du(16,16), texData, false); - u32 mipdata[8*16]; - u32 index=0; - for (u32 j=8; j>0; j/=2) - { - u32 val=(j==8?0x00ff00ff:(j==4?0x0000ffff:(j==2?0xc2c200ff:0x001212ff))); - for (u32 i=0; iaddTexture("miptest", image, mipdata); - if (!tex) - // is probably an error in the mipdata handling - return false; - else - n->setMaterialTexture(0, tex); - image->drop(); - } - - (void)smgr->addCameraSceneNode(); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->endScene(); - - video::ITexture* tex = driver->findTexture("miptest"); - video::SColor* bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 0); - bool result = (bits[0].color==0xff0000ff); - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 1); - result &= (bits[0].color==0x00ff00ff); - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 2); - result &= (bits[0].color==0x0000ffff); - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 3); - result &= (bits[0].color==0xc2c200ff); - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 4); - result &= (bits[0].color==0x001212ff); - tex->unlock(); - - if (!result) - logTestString("mipmap lock after init with driver %ls failed.\n", driver->getName()); - - // test with updating a lower level, and reading upper and lower - bits = (video::SColor*)tex->lock(video::ETLM_READ_WRITE, 3); - bits[0]=0xff00ff00; - bits[1]=0xff00ff00; - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_WRITE, 4); - result &= (bits[0].color==0x001212ff); - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 3); - result &= ((bits[0].color==0xff00ff00)&&(bits[2].color==0xc2c200fe)); - tex->unlock(); - - if (!result) - logTestString("mipmap lock after mipmap write with driver %ls failed.\n", driver->getName()); - - // now test locking level 0 - bits = (video::SColor*)tex->lock(video::ETLM_READ_WRITE, 0); - bits[0]=0xff00ff00; - bits[1]=0xff00ff00; - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_WRITE, 4); - result &= (bits[0].color==0x001212ff); - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 0); - result &= ((bits[0].color==0xff00ff00)&&(bits[2].color==0xff0000fd)); - tex->unlock(); - - if (!result) - logTestString("mipmap lock at level 0 after mipmap write with driver %ls failed.\n", driver->getName()); - else - logTestString("Passed\n"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -//! Tests locking miplevels after texture was created with auto mipmap update -bool lockWithAutoMipmap(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - if (!driver->queryFeature(video::EVDF_MIP_MAP)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::ISceneNode* n = smgr->addCubeSceneNode(); - - if (n) - { - // create the texture - u32 texData[16*16]; - for (u32 i=0; i<16*16; ++i) - texData[i]=0xff0000ff-i; - video::IImage* image = driver->createImageFromData(video::ECF_A8R8G8B8, core::dimension2du(16,16), texData, false); - - video::ITexture* tex = driver->addTexture("miptest", image); - if (!tex) - return false; - else - n->setMaterialTexture(0, tex); - image->drop(); - } - (void)smgr->addCameraSceneNode(); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->endScene(); - - video::ITexture* tex = driver->findTexture("miptest"); - video::SColor* bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 0); - bool result = (bits[0].color==0xff0000ff); - tex->unlock(); - if (!result) - logTestString("mipmap lock after init with driver %ls failed.\n", driver->getName()); - - // test with updating a lower level, and reading upper and lower - bits = (video::SColor*)tex->lock(video::ETLM_READ_WRITE, 3); - bits[0]=0xff00ff00; - bits[1]=0xff00ff00; - tex->unlock(); - // lock another texture just to invalidate caches in the driver - bits = (video::SColor*)tex->lock(video::ETLM_READ_WRITE, 4); - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 3); - result &= ((bits[0].color==0xff00ff00)&&(bits[2].color!=0xff00ff00)); - tex->unlock(); - - if (!result) - logTestString("mipmap lock after mipmap write with driver %ls failed.\n", driver->getName()); - - // now test locking level 0 - bits = (video::SColor*)tex->lock(video::ETLM_READ_WRITE, 0); - bits[0]=0x00ff00ff; - bits[1]=0x00ff00ff; - tex->unlock(); - bits = (video::SColor*)tex->lock(video::ETLM_READ_ONLY, 3); - result &= ((bits[0].color==0xff00ff00)&&(bits[2].color!=0xff00ff00)); - tex->unlock(); - - if (!result) - logTestString("mipmap lock at level 0 after mipmap write with driver %ls failed.\n", driver->getName()); - else - logTestString("Passed\n"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} -} - - -bool textureFeatures(void) -{ - bool result = true; - - TestWithAllDrivers(renderMipLevels); - TestWithAllDrivers(lockAllMipLevels); - TestWithAllDrivers(lockWithAutoMipmap); - - return result; -} diff --git a/lib/irrlicht/tests/textureRenderStates.cpp b/lib/irrlicht/tests/textureRenderStates.cpp deleted file mode 100644 index 77f7bb58c..000000000 --- a/lib/irrlicht/tests/textureRenderStates.cpp +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -static bool manyTextures(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice(driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - (void)smgr->addCameraSceneNode(); - - scene::SMeshBufferLightMap* mesh = new scene::SMeshBufferLightMap; - - mesh->Vertices.reallocate(4); - mesh->Indices.reallocate(6); - - mesh->Vertices.push_back(video::S3DVertex2TCoords(-50,50,80,irr::video::SColor(255,100,100,100),0,1,0,1)); - mesh->Vertices.push_back(video::S3DVertex2TCoords(50,50,80,irr::video::SColor(255,100,100,100),1,1,1,1)); - mesh->Vertices.push_back(video::S3DVertex2TCoords(50,-50,80,irr::video::SColor(255,100,100,100),1,0,1,0)); - mesh->Vertices.push_back(video::S3DVertex2TCoords(-50,-50,80,irr::video::SColor(255,100,100,100),0,0,0,0)); - - mesh->Indices.push_back(0); - mesh->Indices.push_back(1); - mesh->Indices.push_back(2); - mesh->Indices.push_back(2); - mesh->Indices.push_back(3); - mesh->Indices.push_back(0); - - video::SMaterial& mat = mesh->getMaterial(); - mat.Lighting = false; - mat.setTexture(0,driver->getTexture("../media/fire.bmp")); - mat.setTexture(1,driver->getTexture("../media/fire.bmp")); - mat.setTexture(2,driver->getTexture("../media/fire.bmp")); - mat.setTexture(3,driver->getTexture("../media/fire.bmp")); - - mesh->setDirty(); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - // set camera - smgr->drawAll(); - // draw meshbuffer - driver->setMaterial(mat); - driver->drawMeshBuffer(mesh); - driver->endScene(); - mesh->drop(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-multiTexture.png", 99.31f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -//! Tests interleaved loading and rendering of textures -/** The test loads a texture, renders it using draw2dimage, loads another - texture and renders the first one again. Due to the texture cache this - can lead to rendering of the second texture in second place. */ -static bool renderAndLoad(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - video::ITexture* tex1 = driver->getTexture("../media/wall.bmp"); - - (void)smgr->addCameraSceneNode(); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - driver->draw2DImage(tex1, position2di(0,0)); - driver->endScene(); - - driver->getTexture("../media/tools.png"); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - driver->draw2DImage(tex1, position2di(0,0)); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-textureRenderStates.png", 99.85f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -// This test would cause a crash if it does not work -// in 1.5.1 and 1.6 an illegal access in the OpenGL driver caused this -static bool renderAndRemove(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager * smgr = device->getSceneManager(); - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->beginScene (true, true, video::SColor(255, 0, 255, 0)); - smgr->drawAll(); - driver->endScene(); - - smgr->addCameraSceneNode(); - video::ITexture* texture = driver->getTexture ("media/tools.png"); - scene::ISceneNode * img = smgr->addCubeSceneNode(); - img->setMaterialTexture(0, texture); - - driver->beginScene (true, true, video::SColor (255, 0, 255, 0)); - smgr->drawAll(); - driver->endScene(); - - smgr->clear(); // Remove anything that used the texture - driver->removeTexture(texture); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - smgr->drawAll(); - driver->endScene(); - - smgr->addCameraSceneNode(); - texture = driver->getTexture("media/tools.png"); - img = smgr->addCubeSceneNode(); - img->setMaterialTexture(0, texture); - - driver->beginScene (true, true, irr::video::SColor (255, 0, 255, 0)); - smgr->drawAll(); - driver->endScene(); - - device->closeDevice(); - device->run(); - device->drop(); - - return true; -} - - -static bool testTextureMatrixInMixedScenes(video::E_DRIVER_TYPE driverType) -{ - irr::IrrlichtDevice* device = createDevice(driverType, dimension2du(160,120)); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* sceneManager = device->getSceneManager(); - gui::IGUIEnvironment* gui = device->getGUIEnvironment(); - - if (!driver->queryFeature(video::EVDF_TEXTURE_MATRIX)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::ICameraSceneNode* camera = sceneManager->addCameraSceneNode(); - camera->setPosition(vector3df(0,10,0)); - - gui::IGUIStaticText* stext = gui->addStaticText(L" ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 ", - rect(5,100,150,125),false,false,0,false); - stext->setBackgroundColor(video::SColor(255,128,0,0)); - stext->setOverrideColor(video::SColor(255,255,255,255)); - - gui->addEditBox(L"Test edit box", rect(5,50,150,75)); - - gui->addCheckBox(true, rect(5, 20, 150, 45),0,-1,L"Test CheckBox"); - - video::SMaterial mat; - mat.MaterialType = video::EMT_SOLID; - mat.setFlag(video::EMF_LIGHTING, false); - // problem doesn't occur if the scale defaults: (1.f,1.f). - mat.getTextureMatrix(0).setTextureScale(2.0,2.0); - - scene::IAnimatedMesh* pmesh = sceneManager->addHillPlaneMesh("testMesh",dimension2d(50,50),dimension2d(6,6),&mat); - sceneManager->addAnimatedMeshSceneNode(pmesh); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - sceneManager->drawAll(); - gui->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-textureMatrixInMixedScenes.png", 99.33f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -// animated texture matrix test. -static bool textureMatrix(video::E_DRIVER_TYPE driverType) -{ - irr::IrrlichtDevice* device = createDevice(driverType, dimension2du(160,120)); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* sceneManager = device->getSceneManager(); - - if (!driver->queryFeature(video::EVDF_TEXTURE_MATRIX)) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - scene::ICameraSceneNode* camera = sceneManager->addCameraSceneNode(); - camera->setPosition(vector3df(0,0,-10)); - - // set up plane mesh to face the camera - scene::IMesh* mesh = sceneManager->getGeometryCreator()->createPlaneMesh(dimension2df(150,150), core::dimension2du(1,1),0,core::dimension2df(1,1)); - scene::IMeshSceneNode* node = sceneManager->addMeshSceneNode(mesh, 0, -1, vector3df(0, 0, 150), vector3df(-90, 0, 0)); - if (mesh) - mesh->drop(); - - // set the hillplane material texture & save a reference - // to the texture matrix. - video::SMaterial& material = node->getMaterial(0); - video::ITexture* tex = driver->getTexture("../media/water.jpg"); - - material.setTexture(0,tex); - material.setFlag(video::EMF_LIGHTING,false); - matrix4& textureMatrix = material.TextureLayer[0].getTextureMatrix(); - - const vector2df rcenter, scale(1.f, 1.f); - vector2df trans; - - trans.X += 0.0005f; - textureMatrix.buildTextureTransform(0.f, rcenter, trans, scale); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - sceneManager->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-textureMatrix.png"); - - trans.X += 0.45f; - textureMatrix.buildTextureTransform(0.f, rcenter, trans, scale); - - driver->beginScene(true, true, video::SColor(255,100,101,140)); - sceneManager->drawAll(); - driver->endScene(); - - result &= takeScreenshotAndCompareAgainstReference(driver, "-textureMatrix2.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool danglingTexturePointer() -{ -// A demo of the OpenGL "white texture" bug in Irrlicht -// Author: Matt Giuca -// (Vaguely based on the Irrlicht 2D graphics tutorial) - -// I have found that in some situations, when using the OpenGL driver, some -// textures appear white. -// This is caused by deleting a texture while it is active (the last texture -// read or written to), and then loading a new texture at the same memory -// location. The new texture will not be loaded properly. - -// This demo triggers the bug (though there is some probability that it won't -// be triggered; just run it again until it shows a white square instead of -// the Irrlicht logo). - - // This is only a problem in the OpenGL driver - irr::IrrlichtDevice* device = irr::createDevice(irr::video::EDT_OPENGL, - irr::core::dimension2d(160, 120)); - if (!device) - return true; - - irr::video::IVideoDriver* driver = device->getVideoDriver(); - - stabilizeScreenBackground(driver); - - // Load a texture from a file - // This binds and uploads to OpenGL texture #2. - irr::video::ITexture* logo2 = driver->getTexture("../media/irrlichtlogo2.png"); - // Remove the texture from the driver (delete it from hardware) - // This leaves CurrentTexture pointing at logo2 - driver->removeTexture(logo2); - // Load another texture from a file - // There is a good probability that logo3 will be allocated the same - // memory address as logo2. If that happens, - // COpenGLDriver::setActiveTexture will not bother to call glBindTextures - // (thinking that logo3 is the same texture as logo2). - // Therefore, the logo3 texture will be uploaded to texture #0, not #2. - irr::video::ITexture* logo3 = driver->getTexture("../media/irrlichtlogo3.png"); - - device->run(); - { - driver->beginScene(true, true, irr::video::SColor(255,100,101,140)); - - // This is required to trigger the white appearance (this unbinds the - // texture, forcing draw2DImage to rebind the logo3 texture (#2)). - driver->setMaterial(irr::video::SMaterial()); - - // Since logo3 was uploaded to #0, not #2, this will bind texture #2, - // which has never been written to. OpenGL considers an empty texture - // to be white. - driver->draw2DImage(logo3, irr::core::position2d(20, 20)); - - driver->endScene(); - } - - const bool result = takeScreenshotAndCompareAgainstReference(driver, "-texturePointer.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -bool textureRenderStates(void) -{ - bool result = true; - TestWithAllDrivers(renderAndLoad); - TestWithAllDrivers(renderAndRemove); - TestWithAllDrivers(testTextureMatrixInMixedScenes); - TestWithAllDrivers(manyTextures); - TestWithAllDrivers(textureMatrix); - result &= danglingTexturePointer(); - - return result; -} diff --git a/lib/irrlicht/tests/timer.cpp b/lib/irrlicht/tests/timer.cpp deleted file mode 100644 index 935c2ef55..000000000 --- a/lib/irrlicht/tests/timer.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "testUtils.h" - -using namespace irr; -using namespace core; - -// Test the functionality of the Irrlicht timer -bool testTimer(void) -{ - bool success = true; - - IrrlichtDevice* device = createDevice(video::EDT_NULL); - if (!device) - return false; - - logTestString("Testing virtual timer.\n"); - - ITimer* timer = device->getTimer(); - - // must be running at start - success &= !timer->isStopped(); - - // starting more often should not stop the timer - timer->start(); - success &= !timer->isStopped(); - - // one stop should not stop the timer because it's started twice now - timer->stop(); - success &= !timer->isStopped(); - - // another stop should really stop it - timer->stop(); - success &= timer->isStopped(); - - // third stop - timer should still be stopped - timer->stop(); - success &= timer->isStopped(); - - // should not start yet - timer->start(); - success &= timer->isStopped(); - - // start again - timer->start(); - success &= !timer->isStopped(); - - logTestString("Testing virtual timer done. %s\n", success?"Success":"Failure"); - - logTestString("Testing real timer.\n"); - const u32 startVirtual = timer->getTime(); - const u32 startReal = timer->getRealTime(); - device->sleep(2); - if (startReal != timer->getRealTime()) - logTestString("Warning: Real timer did not progress. Maybe the time slices are too coarse to see.\n"); - if (startVirtual != timer->getTime()) - logTestString("Warning: Virtual timer did not progress. Maybe the time slices are too coarse to see.\n"); - - irr::ITimer::RealTimeDate date = timer->getRealTimeAndDate(); - logTestString("Real time and date. %d.%d.%d at %d:%d:%d\n", date.Day, date.Month, date.Year, date.Hour, date.Minute, date.Second); - logTestString("This is day %d of the year and weekday %d. The current time zone has daylight saving %s\n", date.Yearday, date.Weekday, date.IsDST?"enabled":"disabled"); - - device->closeDevice(); - device->run(); - device->drop(); - - return success; -} diff --git a/lib/irrlicht/tests/transparentMaterials.cpp b/lib/irrlicht/tests/transparentMaterials.cpp deleted file mode 100644 index c6b757ee9..000000000 --- a/lib/irrlicht/tests/transparentMaterials.cpp +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; - - -//! Check that EMT_TRANSPARENT_ALPHA_CHANNEL_REF works as expected -bool testTransparentAlphaChannelRef(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice* device = createDevice(driverType, core::dimension2d(160, 120), 32); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - if (driver->getColorFormat() != video::ECF_A8R8G8B8) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); - - ISceneNode * backCube = smgr->addCubeSceneNode(); - backCube->setPosition(vector3df(0, 0, 10)); - backCube->setScale(vector3df(5, 5, 1)); - backCube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - backCube->setMaterialType(video::EMT_SOLID); - backCube->setMaterialFlag(video::EMF_LIGHTING, false); - - ISceneNode * frontCube = smgr->addCubeSceneNode(); - frontCube->setMaterialTexture(0, driver->getTexture("../media/help.png")); - frontCube->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF); - frontCube->setMaterialFlag(video::EMF_LIGHTING, false); - - (void)smgr->addCameraSceneNode(0, vector3df(0, 0, -15)); - - driver->beginScene(true, true, video::SColor(255,113,113,133)); - smgr->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannelRef.png", 99.18f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -//! Check that EMT_TRANSPARENT_ALPHA_CHANNEL works as expected -bool testTransparentAlphaChannel(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice* device = createDevice(driverType, core::dimension2d(160, 120), 32); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - if (driver->getColorFormat() != video::ECF_A8R8G8B8) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); - - ISceneNode * backCube = smgr->addCubeSceneNode(); - backCube->setPosition(vector3df(0, 0, 10)); - backCube->setScale(vector3df(5, 5, 1)); - backCube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - backCube->setMaterialType(video::EMT_SOLID); - backCube->setMaterialFlag(video::EMF_LIGHTING, false); - - ISceneNode * frontCube = smgr->addCubeSceneNode(); - frontCube->setMaterialTexture(0, driver->getTexture("../media/help.png")); - frontCube->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL); - frontCube->setMaterialFlag(video::EMF_LIGHTING, false); - - (void)smgr->addCameraSceneNode(0, vector3df(0, 0, -15)); - - driver->beginScene(true, true, video::SColor(255,113,113,133)); - smgr->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannel.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -//! Check that EMT_TRANSPARENT_VERTEX_ALPHA works as expected -bool testTransparentVertexAlpha(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice* device = createDevice(driverType, core::dimension2d(160, 120), 32); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - if (driver->getColorFormat() != video::ECF_A8R8G8B8) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); - - ISceneNode * backCube = smgr->addCubeSceneNode(); - backCube->setPosition(vector3df(0, 0, 10)); - backCube->setScale(vector3df(5, 5, 1)); - backCube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - // vertex color has alpha 255, hence solid - backCube->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA); - backCube->setMaterialFlag(video::EMF_LIGHTING, false); - - IMeshSceneNode * frontCube = smgr->addCubeSceneNode(10,0,-1,core::vector3df(-10,0,0)); - frontCube->setMaterialTexture(0, driver->getTexture("../media/help.png")); - frontCube->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA); - frontCube->setMaterialFlag(video::EMF_LIGHTING, false); - driver->getMeshManipulator()->setVertexColorAlpha(frontCube->getMesh(), 128); - frontCube = smgr->addCubeSceneNode(10,0,-1,core::vector3df(10,0,0)); - frontCube->setMaterialTexture(0, driver->getTexture("../media/help.png")); - frontCube->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA); - frontCube->setMaterialFlag(video::EMF_LIGHTING, false); - driver->getMeshManipulator()->setVertexColorAlpha(frontCube->getMesh(), 45); - - (void)smgr->addCameraSceneNode(0, vector3df(0, 0, -15)); - - driver->beginScene(true, true, video::SColor(255,113,113,133)); - smgr->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlpha.png", 98.76f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -//! Check that EMT_TRANSPARENT_REFLECTION_2_LAYER works as expected -bool testTransparentReflection2Layer(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice* device = createDevice(driverType, core::dimension2d(160, 120), 32); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - if (driver->getColorFormat() != video::ECF_A8R8G8B8) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); - - ISceneNode * backCube = smgr->addCubeSceneNode(); - backCube->setPosition(vector3df(0, 0, 10)); - backCube->setScale(vector3df(5, 5, 1)); - backCube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - backCube->setMaterialTexture(1, driver->getTexture("../media/water.jpg")); - // vertex color has alpha 255, hence solid - backCube->setMaterialType(video::EMT_TRANSPARENT_REFLECTION_2_LAYER); - backCube->setMaterialFlag(video::EMF_LIGHTING, false); - - IMeshSceneNode * frontCube = smgr->addCubeSceneNode(10,0,-1,core::vector3df(-10,0,0)); - frontCube->setMaterialTexture(0, driver->getTexture("../media/help.png")); - frontCube->setMaterialTexture(1, driver->getTexture("../media/water.jpg")); - frontCube->setMaterialType(video::EMT_TRANSPARENT_REFLECTION_2_LAYER); - frontCube->setMaterialFlag(video::EMF_LIGHTING, false); - driver->getMeshManipulator()->setVertexColorAlpha(frontCube->getMesh(), 128); - frontCube = smgr->addCubeSceneNode(10,0,-1,core::vector3df(10,0,0)); - frontCube->setMaterialTexture(0, driver->getTexture("../media/help.png")); - frontCube->setMaterialTexture(1, driver->getTexture("../media/water.jpg")); - frontCube->setMaterialType(video::EMT_TRANSPARENT_REFLECTION_2_LAYER); - frontCube->setMaterialFlag(video::EMF_LIGHTING, false); - driver->getMeshManipulator()->setVertexColorAlpha(frontCube->getMesh(), 45); - - (void)smgr->addCameraSceneNode(0, vector3df(0, 0, -15)); - - driver->beginScene(true, true, video::SColor(255,113,113,133)); - smgr->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentReflection2Layer.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -//! Check that EMT_TRANSPARENT_ADD_COLOR works as expected -bool testTransparentAddColor(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice* device = createDevice(driverType, core::dimension2d(160, 120), 32); - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - if (driver->getColorFormat() != video::ECF_A8R8G8B8) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true); - - ISceneNode * backCube = smgr->addCubeSceneNode(); - backCube->setPosition(vector3df(0, 0, 10)); - backCube->setScale(vector3df(5, 5, 1)); - backCube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - backCube->setMaterialType(video::EMT_SOLID); - backCube->setMaterialFlag(video::EMF_LIGHTING, false); - - IMeshSceneNode * frontCube = smgr->addCubeSceneNode(); - frontCube->setMaterialTexture(0, driver->getTexture("../media/help.png")); - frontCube->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); - frontCube->setMaterialFlag(video::EMF_LIGHTING, false); - - (void)smgr->addCameraSceneNode(0, vector3df(0, 0, -15)); - - driver->beginScene(true, true, video::SColor(255,113,113,133)); - smgr->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAddColor.png"); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -bool testTransparentVertexAlphaMore(E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice(driverType, dimension2d(160, 120)); - if (!device) - return true; - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager* smgr = device->getSceneManager(); - - if (driver->getColorFormat() != video::ECF_A8R8G8B8) - { - device->closeDevice(); - device->run(); - device->drop(); - return true; - } - - stabilizeScreenBackground(driver); - - logTestString("Testing driver %ls\n", driver->getName()); - - IAnimatedMesh* mesh = smgr->getMesh("../media/sydney.md2"); - IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); - IMeshSceneNode* cube = smgr->addCubeSceneNode(10.0f,0,-1,vector3df(-5,3,-15)); - - if (node) - { - node->setMaterialFlag(EMF_LIGHTING, false); - node->setFrameLoop(0, 310); - node->setMaterialTexture( 0, driver->getTexture("../media/sydney.bmp") ); - } - if (cube) - { - cube->getMaterial(0).MaterialType = EMT_TRANSPARENT_VERTEX_ALPHA; - cube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - cube->setMaterialFlag(EMF_LIGHTING, false); - smgr->getMeshManipulator()->setVertexColorAlpha(cube->getMesh(),128); - } - // second cube without texture - cube = smgr->addCubeSceneNode(10.0f,0,-1,vector3df(5,3,-15)); - if (cube) - { - cube->getMaterial(0).MaterialType = EMT_TRANSPARENT_VERTEX_ALPHA; - cube->setMaterialFlag(EMF_LIGHTING, false); - smgr->getMeshManipulator()->setVertexColorAlpha(cube->getMesh(),128); - } - - smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0)); - - driver->beginScene(true, true, SColor(0,200,200,200)); - smgr->drawAll(); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlphaChannelMore.png", 99.18f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -bool transparentMaterials(void) -{ - bool result = true; - TestWithAllDrivers(testTransparentAlphaChannel); - // FIXME Rogerborg 8-January-2010. Burning's video currently produces unexpected results, - // blending using the full alpha value instead of using a boolean mask. This test is being - // added now anyway to help verify the fix when it's done; it should just require an - // update of the reference image. - TestWithAllDrivers(testTransparentAlphaChannelRef); - // This type seems to be broken as well for Burning's video. - TestWithAllDrivers(testTransparentVertexAlpha); - TestWithAllDrivers(testTransparentAddColor); - // TODO: this simply does not work in OpenGL due to the sphere map - // at least it creates different results, and also varies across drivers - TestWithAllDrivers(testTransparentReflection2Layer); - // This type seems to be broken as well for Burning's video. - TestWithAllDrivers(testTransparentVertexAlphaMore); - - return result; -} diff --git a/lib/irrlicht/tests/triangle3d.cpp b/lib/irrlicht/tests/triangle3d.cpp deleted file mode 100644 index 7da3148a4..000000000 --- a/lib/irrlicht/tests/triangle3d.cpp +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" -#include - -using namespace irr; -using namespace core; - -template -static bool testGetIntersectionWithLine(core::triangle3d& triangle, const core::line3d& ray) -{ - bool allExpected=true; - const vector3d linevect = ray.getVector().normalize(); - vector3d intersection; - // When we just raise Y parallel to the ray then either all should fail or all succeed (the latter in our case). - for (u32 i=0; i<100; ++i) - { - if (!triangle.getIntersectionOfPlaneWithLine(ray.start, linevect, intersection)) - { - allExpected=false; - logTestString("triangle3d plane test %d failed\n", i); - } - //logTestString("intersection: %f %f %f\n", intersection.X, intersection.Y, intersection.Z); - if (!triangle.isPointInsideFast(intersection)) - { - allExpected=false; - logTestString("triangle3d fast point test %d failed\n", i); - } - if (!triangle.isPointInside(intersection)) - { - allExpected=false; - logTestString("triangle3d point test %d failed\n", i); - } - - if (!triangle.getIntersectionWithLine(ray.start, linevect, intersection)) - { - allExpected=false; - logTestString("triangle3d tri test %d failed\n", i); - } - - triangle.pointB.Y += 1; - } - return allExpected; -} - -// modifying the same triangle in diverse ways get some more test-cases automatically -template -static bool stageModifications(int stage, triangle3d& triangle) -{ - switch ( stage ) - { - case 0: - return true; - case 1: - swap(triangle.pointB, triangle.pointC); - return true; - case 2: - swap(triangle.pointA, triangle.pointC); - return true; - case 3: - triangle.pointA.Z += 1000; - triangle.pointB.Z += 1000; - triangle.pointC.Z += 1000; - return true; - case 4: - swap(triangle.pointA.Y, triangle.pointA.Z); - swap(triangle.pointB.Y, triangle.pointB.Z); - swap(triangle.pointC.Y, triangle.pointC.Z); - return true; - } - return false; -} - -template -static void stageModifications(int stage, vector3d& point) -{ - switch ( stage ) - { - case 3: - point.Z += 1000; - break; - case 4: - swap(point.Y, point.Z); - break; - } -} - -template -static bool isPointInside(triangle3d triangleOrig, bool testIsInside, bool testIsInsideFast) -{ - bool allExpected=true; - - array< vector3d > pointsInside; - pointsInside.push_back( vector3d(0,0,0) ); - pointsInside.push_back( (triangleOrig.pointA + triangleOrig.pointB + triangleOrig.pointC) / 3 ); - pointsInside.push_back( (triangleOrig.pointA + triangleOrig.pointB)/2 + vector3d(0,1,0) ); - pointsInside.push_back( (triangleOrig.pointA + triangleOrig.pointC)/2 + vector3d(1,0,0) ); - pointsInside.push_back( (triangleOrig.pointB + triangleOrig.pointC)/2 - vector3d(1,0,0) ); - - for (u32 stage=0; ; ++stage) - { - triangle3d triangle = triangleOrig; - if ( !stageModifications(stage, triangle) ) - break; - - for ( u32 i=0; i < pointsInside.size(); ++i ) - { - vector3d point = pointsInside[i]; - stageModifications(stage, point); - - if ( testIsInside ) - { - allExpected &= triangle.isPointInside( point ); - if ( !allExpected ) - { - logTestString("triangle3d::isPointInside pointsInside test failed in stage %d point %d\n", stage, i); - return false; - } - } - - if ( testIsInsideFast ) - { - allExpected &= triangle.isPointInsideFast( point ); - if ( !allExpected ) - { - logTestString("triangle3d::isPointInsideFast pointsInside test failed in stage %d point %d\n", stage, i); - return false; - } - } - } - } - - array< vector3d > pointsOutside; - pointsOutside.push_back( triangleOrig.pointA - vector3d(1,0,0) ); - pointsOutside.push_back( triangleOrig.pointA - vector3d(0,1,0) ); - pointsOutside.push_back( triangleOrig.pointB + vector3d(1,0,0) ); - pointsOutside.push_back( triangleOrig.pointB - vector3d(0,1,0) ); - pointsOutside.push_back( triangleOrig.pointC - vector3d(1,0,0) ); - pointsOutside.push_back( triangleOrig.pointC + vector3d(1,0,0) ); - pointsOutside.push_back( triangleOrig.pointC + vector3d(0,1,0) ); - pointsOutside.push_back( (triangleOrig.pointA + triangleOrig.pointB)/2 - vector3d(0,1,0) ); - pointsOutside.push_back( (triangleOrig.pointA + triangleOrig.pointC)/2 - vector3d(1,0,0) ); - pointsOutside.push_back( (triangleOrig.pointB + triangleOrig.pointC)/2 + vector3d(1,0,0) ); - - for (u32 stage=0; ; ++stage) - { - triangle3d triangle = triangleOrig; - if ( !stageModifications(stage, triangle) ) - break; - - for ( u32 i=0; i < pointsOutside.size(); ++i ) - { - vector3d point = pointsOutside[i]; - stageModifications(stage, point); - - if ( testIsInside ) - { - allExpected &= !triangle.isPointInside( point ); - if ( !allExpected ) - { - logTestString("triangle3d::isPointInside pointsOutside test failed in stage %d point %d\n", stage, i); - return false; - } - } - - if ( testIsInsideFast ) - { - allExpected &= !triangle.isPointInsideFast( point ); - if ( !allExpected ) - { - logTestString("triangle3d::isPointInsideFast pointsOutside test failed in stage %d point %d\n", stage, i); - return false; - } - } - } - } - - array< vector3d > pointsBorder; - pointsBorder.push_back( triangleOrig.pointA ); - pointsBorder.push_back( triangleOrig.pointB ); - pointsBorder.push_back( triangleOrig.pointC ); - pointsBorder.push_back( (triangleOrig.pointA + triangleOrig.pointB)/2 ); - pointsBorder.push_back( (triangleOrig.pointA + triangleOrig.pointC)/2 ); - pointsBorder.push_back( (triangleOrig.pointB + triangleOrig.pointC)/2 ); - - for (u32 stage=0; ; ++stage) - { - triangle3d triangle = triangleOrig; - if ( !stageModifications(stage, triangle) ) - break; - - for ( u32 i=0; i < pointsBorder.size(); ++i ) - { - vector3d point = pointsBorder[i]; - stageModifications(stage, point); - - if ( testIsInside ) - { - allExpected &= triangle.isPointInside( point ); - if ( !allExpected ) - { - logTestString("triangle3d::isPointInside pointsBorder test failed in stage %d point %d\n", stage, i); - return false; - } - } - - if ( testIsInsideFast ) - { - allExpected &= triangle.isPointInsideFast( point ); - if ( !allExpected ) - { - logTestString("triangle3d::isPointInsideFast pointsBorder test failed in stage %d point %d\n", stage, i); - return false; - } - } - } - } - - return allExpected; -} - -// Test the functionality of triangle3d -bool testTriangle3d(void) -{ - bool allExpected = true; - - logTestString("Test getIntersectionWithLine with f32\n"); - { - triangle3df triangle( - vector3df(11300.f, 129.411758f, 200.f), - vector3df(11200.f, 94.117645f, 300.f), - vector3df(11300.f, 129.411758f, 300.f)); - line3df ray; - ray.start = vector3df(11250.f, 329.f, 250.f); - ray.end = vector3df(11250.f, -1000.f, 250.f); - allExpected &= testGetIntersectionWithLine(triangle, ray); - } - logTestString("Test getIntersectionWithLine with f64\n"); - { - triangle3d triangle( - vector3d(11300., 129.411758, 200.), - vector3d(11200., 94.117645, 300.), - vector3d(11300., 129.411758, 300.)); - line3d ray; - ray.start = vector3d(11250., 329., 250.); - ray.end = vector3d(11250., -1000., 250.); - allExpected &= testGetIntersectionWithLine(triangle, ray); - } - - bool testEigen = triangle3di(vector3di(250, 0, 0), vector3di(0, 0, 500), vector3di(500, 0, 500)).isPointInside(vector3di(300,0,300)); - if ( !testEigen ) // test from Eigen from here: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=44372&p=254331#p254331 - logTestString("Test isPointInside fails with integers\n"); - allExpected &= testEigen; - - logTestString("Test isPointInside with f32\n"); - { - triangle3d t(vector3d(-1000,-1000,0), vector3d(1000,-1000,0), vector3d(0,1000,0)); - allExpected &= isPointInside(t, true, true); - } - - logTestString("Test isPointInside with f64\n"); - { - triangle3d t(vector3d(-1000,-1000,0), vector3d(1000,-1000,0), vector3d(0,1000,0)); - allExpected &= isPointInside(t, true, true); - } - - logTestString("Test isPointInside with s32\n"); - { - triangle3d t(vector3d(-1000,-1000,0), vector3d(1000,-1000,0), vector3d(0,1000,0)); - allExpected &= isPointInside(t, false, true); - } - - if(allExpected) - logTestString("\nAll tests passed\n"); - else - logTestString("\nFAIL!\n"); - - return allExpected; -} - diff --git a/lib/irrlicht/tests/triangleSelector.cpp b/lib/irrlicht/tests/triangleSelector.cpp deleted file mode 100644 index 5c5c8361c..000000000 --- a/lib/irrlicht/tests/triangleSelector.cpp +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (C) 2008-2012 Christian Stehno, Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; - -namespace{ - -class MyEventReceiver : public IEventReceiver -{ -public: - // This is the one method that we have to implement - virtual bool OnEvent(const SEvent& event) - { - // Remember whether each key is down or up - if (event.EventType == EET_KEY_INPUT_EVENT) - KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown; - - return false; - } - - // This is used to check whether a key is being held down - virtual bool IsKeyDown(EKEY_CODE keyCode) const - { - return KeyIsDown[keyCode]; - } - - MyEventReceiver() - { - for (u32 i=0; i (160, 120)); - if (!device) - return true; // No error if device does not exist - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - stabilizeScreenBackground(driver); - - scene::IMetaTriangleSelector * meta = smgr->createMetaTriangleSelector(); - - device->getFileSystem()->addFileArchive("../media/map-20kdm2.pk3"); - scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("20kdm2.bsp"); - if (q3levelmesh) - { - scene::ISceneNode* q3node = smgr->addOctreeSceneNode(q3levelmesh->getMesh(0)); - - q3node->setPosition(core::vector3df(-1350,-130,-1400)); - - scene::ITriangleSelector * selector = - smgr->createOctreeTriangleSelector(q3levelmesh->getMesh(0), q3node, 128); - meta->addTriangleSelector(selector); - selector->drop(); - } - - scene::ICameraSceneNode* camera = smgr->addCameraSceneNode(); - camera->setPosition(core::vector3df(-100,50,-150)); - camera->updateAbsolutePosition(); - camera->setTarget(camera->getAbsolutePosition() + core::vector3df(0, 0, 20)); - - device->getCursorControl()->setVisible(false); - - enum - { - MAX_TRIANGLES = 4096, // Large to test getting all the triangles - BOX_SIZE1 = 300, - BOX_SIZE2 = 50 - }; - - core::triangle3df triangles[MAX_TRIANGLES]; - core::vector3df boxPosition(camera->getAbsolutePosition()); - - video::SMaterial unlit; - unlit.Lighting = false; - unlit.Thickness = 3.f; - unlit.PolygonOffsetFactor=1; - - bool result = true; - { - camera->setPosition(core::vector3df(-620,-20,550)); - driver->beginScene(true, true, 0); - smgr->drawAll(); - - core::aabbox3df box(boxPosition.X - BOX_SIZE1, boxPosition.Y - BOX_SIZE1, boxPosition.Z - BOX_SIZE1, - boxPosition.X + BOX_SIZE1, boxPosition.Y + BOX_SIZE1, boxPosition.Z + BOX_SIZE1); - - driver->setTransform(video::ETS_WORLD, core::matrix4()); - driver->setMaterial(unlit); - driver->draw3DBox(box, video::SColor(255, 0, 255, 0)); - - if(meta) - { - s32 found; - meta->getTriangles(triangles, MAX_TRIANGLES, found, box); - - while(--found >= 0) - driver->draw3DTriangle(triangles[found], video::SColor(255, 255, 0, 0)); - } - - driver->endScene(); - result &= takeScreenshotAndCompareAgainstReference(driver, "-octree_select1.png"); - } - { - camera->setPosition(core::vector3df(120,40,50)); - driver->beginScene(true, true, 0); - smgr->drawAll(); - - core::aabbox3df box(boxPosition.X - BOX_SIZE2, boxPosition.Y - BOX_SIZE2, boxPosition.Z - BOX_SIZE2, - boxPosition.X + BOX_SIZE2, boxPosition.Y + BOX_SIZE2, boxPosition.Z + BOX_SIZE2); - - driver->setTransform(video::ETS_WORLD, core::matrix4()); - driver->setMaterial(unlit); - driver->draw3DBox(box, video::SColor(255, 0, 255, 0)); - - if(meta) - { - s32 found; - meta->getTriangles(triangles, MAX_TRIANGLES, found, box); - - while(--found >= 0) - driver->draw3DTriangle(triangles[found], video::SColor(255, 255, 0, 0)); - } - - driver->endScene(); - result &= takeScreenshotAndCompareAgainstReference(driver, "-octree_select2.png"); - } - - meta->drop(); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - -//! Tests using triangle selector -bool triangle() -{ - IrrlichtDevice *device = createDevice (video::EDT_OPENGL, core::dimension2d < u32 > (160, 120)); - if (!device) - return true; // No error if device does not exist - - MyEventReceiver receiver; - device->setEventReceiver(&receiver); - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - stabilizeScreenBackground(driver); - - scene::IMetaTriangleSelector * meta = smgr->createMetaTriangleSelector(); - - scene::IAnimatedMesh * mesh = smgr->getMesh("../media/sydney.md2"); - scene::IAnimatedMeshSceneNode * sydney = smgr->addAnimatedMeshSceneNode( mesh ); - if (sydney) - { - sydney->setPosition(core::vector3df(15, -10, 15)); - sydney->setMaterialFlag(video::EMF_LIGHTING, false); - sydney->setMD2Animation ( scene::EMAT_STAND ); - sydney->setAnimationSpeed(0.f); - sydney->setMaterialTexture( 0, driver->getTexture("../media/sydney.bmp") ); - - scene::ITriangleSelector * selector = - smgr->createTriangleSelector(sydney->getMesh()->getMesh(0), sydney); - meta->addTriangleSelector(selector); - selector->drop(); - } - - scene::ICameraSceneNode* camera = - smgr->addCameraSceneNodeFPS(); - camera->setPosition(core::vector3df(70,0,-30)); - camera->updateAbsolutePosition(); - camera->setTarget(camera->getAbsolutePosition() + core::vector3df(-20, 0, 20)); - - device->getCursorControl()->setVisible(false); - - enum - { - MAX_TRIANGLES = 5000, // Large to test getting all the triangles - BOX_SIZE = 30 - }; - - core::triangle3df triangles[MAX_TRIANGLES]; - core::vector3df boxPosition(0,0,0); - - video::SMaterial unlit; - unlit.Lighting = false; - unlit.Thickness = 3.f; - unlit.PolygonOffsetFactor=1; - - bool result = true; - { - driver->beginScene(true, true, 0xff00ffff); - smgr->drawAll(); - - core::aabbox3df box(boxPosition.X - BOX_SIZE, boxPosition.Y - BOX_SIZE, boxPosition.Z - BOX_SIZE, - boxPosition.X + BOX_SIZE, boxPosition.Y + BOX_SIZE, boxPosition.Z + BOX_SIZE); - - driver->setTransform(video::ETS_WORLD, core::matrix4()); - driver->setMaterial(unlit); - driver->draw3DBox(box, video::SColor(255, 0, 255, 0)); - - if(meta) - { - s32 found; - meta->getTriangles(triangles, MAX_TRIANGLES, found, box); - - while(--found >= 0) - driver->draw3DTriangle(triangles[found], video::SColor(255, 255, 0, 0)); - } - - driver->endScene(); - result &= takeScreenshotAndCompareAgainstReference(driver, "-tri_select1.png"); - } - { - boxPosition.Z -= 10.f; - driver->beginScene(true, true, 0xff00ffff); - smgr->drawAll(); - - core::aabbox3df box(boxPosition.X - BOX_SIZE, boxPosition.Y - BOX_SIZE, boxPosition.Z - BOX_SIZE, - boxPosition.X + BOX_SIZE, boxPosition.Y + BOX_SIZE, boxPosition.Z + BOX_SIZE); - - driver->setTransform(video::ETS_WORLD, core::matrix4()); - driver->setMaterial(unlit); - driver->draw3DBox(box, video::SColor(255, 0, 255, 0)); - - if(meta) - { - s32 found; - meta->getTriangles(triangles, MAX_TRIANGLES, found, box); - - while(--found >= 0) - driver->draw3DTriangle(triangles[found], video::SColor(255, 255, 0, 0)); - } - - driver->endScene(); - result &= takeScreenshotAndCompareAgainstReference(driver, "-tri_select2.png"); - } - { - boxPosition.Z -= 20.f; - driver->beginScene(true, true, 0xff00ffff); - smgr->drawAll(); - - core::aabbox3df box(boxPosition.X - BOX_SIZE, boxPosition.Y - BOX_SIZE, boxPosition.Z - BOX_SIZE, - boxPosition.X + BOX_SIZE, boxPosition.Y + BOX_SIZE, boxPosition.Z + BOX_SIZE); - - driver->setTransform(video::ETS_WORLD, core::matrix4()); - driver->setMaterial(unlit); - driver->draw3DBox(box, video::SColor(255, 0, 255, 0)); - - if(meta) - { - s32 found; - meta->getTriangles(triangles, MAX_TRIANGLES, found, box); - - while(--found >= 0) - driver->draw3DTriangle(triangles[found], video::SColor(255, 255, 0, 0)); - } - - driver->endScene(); - result &= takeScreenshotAndCompareAgainstReference(driver, "-tri_select3.png"); - } - - meta->drop(); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} -} - -// Tests need not be accurate, as we just need to include at least -// the triangles that match the criteria. But we try to be as close -// as possible of course, to reduce the collision checks done afterwards -bool triangleSelector(void) -{ - bool result = true; - - result &= octree(); - result &= triangle(); - - return result; -} diff --git a/lib/irrlicht/tests/userClipPlane.cpp b/lib/irrlicht/tests/userClipPlane.cpp deleted file mode 100644 index 64c1e16bc..000000000 --- a/lib/irrlicht/tests/userClipPlane.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include "testUtils.h" - -using namespace irr; - -static bool withSphere(video::E_DRIVER_TYPE type) -{ - IrrlichtDevice* device = createDevice(type, core::dimension2d(160, 120)); - - if (device == 0) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - scene::ISceneManager* smgr = device->getSceneManager(); - - driver->setClipPlane(0, core::plane3df(core::vector3df(0,18,0), core::vector3df(0,-1,0)), true); - smgr->addLightSceneNode(0, core::vector3df(30,30,50)); - // create first sphere - scene::ISceneNode* sphere = smgr->addMeshSceneNode(smgr->addSphereMesh("sphere", 10, 64, 64)); - - if (sphere) - { - sphere->setPosition(core::vector3df(0,10,0)); - sphere->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false); - } - - sphere = smgr->addMeshSceneNode(smgr->addHillPlaneMesh("mesh", core::dimension2df(10,10), core::dimension2du(10,10))); - sphere->setPosition(core::vector3df(0,10,0)); - - smgr->addCameraSceneNode(0, core::vector3df(-25,30,20), core::vector3df()); - - driver->setClipPlane(1, core::plane3df(core::vector3df(0,2,0), core::vector3df(0,1,0)), true); - driver->setClipPlane(2, core::plane3df(core::vector3df(8,0,0), core::vector3df(-1,0,0))); - - device->run(); -// while(device->run()) - { - driver->beginScene(true, true, video::SColor(255,113,113,133)); - driver->setClipPlane(3, core::plane3df(core::vector3df(-8,0,0), core::vector3df(1,0,0)), true); - driver->setClipPlane(4, core::plane3df(core::vector3df(0,0,8), core::vector3df(0,0,-1))); - driver->setClipPlane(5, core::plane3df(core::vector3df(0,0,-8), core::vector3df(0,0,1))); - driver->enableClipPlane(2, true); - driver->enableClipPlane(4, true); - driver->enableClipPlane(5, true); - smgr->drawAll(); - driver->enableClipPlane(1, false); - driver->enableClipPlane(2, false); - driver->enableClipPlane(4, false); - driver->enableClipPlane(5, false); - driver->setTransform(video::ETS_WORLD, core::IdentityMatrix); - driver->setMaterial(video::IdentityMaterial); - driver->draw3DLine(core::vector3df(), core::vector3df(0,0,50)); - driver->endScene(); - } - bool result = takeScreenshotAndCompareAgainstReference(driver, "-ucpsphere.png"); - - device->closeDevice(); - device->run(); - device->drop(); - return result; -} - -bool userclipplane() -{ - bool result = true; - TestWithAllHWDrivers(withSphere); - return result; -} diff --git a/lib/irrlicht/tests/vectorPositionDimension2d.cpp b/lib/irrlicht/tests/vectorPositionDimension2d.cpp deleted file mode 100644 index 5a02fb5d7..000000000 --- a/lib/irrlicht/tests/vectorPositionDimension2d.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -/** This test verifies that position2d and vector2d are interchangeable, - and that they can convert from dimension2d */ - -#include "testUtils.h" - -using namespace irr; -using namespace core; - - -template -static bool doTest(void) -{ - bool result = true; - - DIMENSION dimension((T)99.9, (T)99.9); - VECTOR vector(dimension); - POSITION position(vector); - DIMENSION dimension2(vector); - - result &= (vector == position); - result &= (vector == dimension); // The conversion should be explicit. - result &= (dimension2 == position); - result &= (position == POSITION((T)99.9, (T)99.9)); - assert_log(result); - - dimension = (T)2 * position; - result &= (dimension == VECTOR(2 * (T)99.9, 2 * (T)99.9)); - assert_log(result); - - dimension /= (T)2; - result &= (dimension == POSITION((T)99.9, (T)99.9)); - assert_log(result); - - dimension += vector; - result &= (dimension == VECTOR(2 * (T)99.9, 2 * (T)99.9)); - assert_log(result); - - dimension -= position; - result &= (dimension == POSITION((T)99.9, (T)99.9)); - assert_log(result); - - position = dimension; - result &= (position == VECTOR((T)99.9, (T)99.9)); - assert_log(result); - - vector += position; - result &= (vector == POSITION(2 * (T)99.9, 2 * (T)99.9)); - assert_log(result); - - vector -= position; - result &= (vector == dimension); - assert_log(result); - - position *= (T)3.5; - result &= (position == VECTOR((T)3.5 * (T)99.9, (T)3.5 * (T)99.9)); - assert_log(result); - - vector += dimension; - result &= (vector == VECTOR(2 * (T)99.9, 2 * (T)99.9)); - assert_log(result); - - return result; -} - -bool vectorPositionDimension2d(void) -{ - bool result = true; - - logTestString("vector,position,dimension test with s32\n\n"); - result &= doTest(); - if (result) - logTestString("tests passed\n\n"); - else - logTestString("\ntests failed\n\n"); - logTestString("vector,position,dimension test with f32\n\n"); - result &= doTest(); - if (result) - logTestString("tests passed\n\n"); - else - logTestString("\ntests failed\n\n"); - logTestString("vector,position,dimension test with f64\n\n"); - result &= doTest, vector2d, position2d, f64>(); - if (result) - logTestString("tests passed\n\n"); - else - logTestString("\ntests failed\n\n"); - - return result; -} - diff --git a/lib/irrlicht/tests/videoDriver.cpp b/lib/irrlicht/tests/videoDriver.cpp deleted file mode 100644 index 3635ebe8a..000000000 --- a/lib/irrlicht/tests/videoDriver.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald, Christian Stehno -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; - -/** Test various things in video drivers. */ -bool testVideoDriver(video::E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = - createDevice(driverType, dimension2d(160, 120)); - - if (!device) - return true; - - video::IVideoDriver* driver = device->getVideoDriver(); - logTestString("Testing driver %ls\n", driver->getName()); - logTestString("MaxTextures: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxTextures")); - logTestString("MaxSupportedTextures: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxSupportedTextures")); - logTestString("MaxLights: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxLights")); - logTestString("MaxAnisotropy: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxAnisotropy")); - logTestString("MaxUserClipPlanes: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxUserClipPlanes")); - logTestString("MaxAuxBuffers: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxAuxBuffers")); - logTestString("MaxMultipleRenderTargets: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxMultipleRenderTargets")); - logTestString("MaxIndices: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxIndices")); - logTestString("MaxTextureSize: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxTextureSize")); - logTestString("MaxGeometryVerticesOut: %d\n", driver->getDriverAttributes().getAttributeAsInt("MaxGeometryVerticesOut")); - logTestString("Version: %d\n", driver->getDriverAttributes().getAttributeAsInt("Version")); - logTestString("ShaderLanguageVersion: %d\n\n", driver->getDriverAttributes().getAttributeAsInt("ShaderLanguageVersion")); - - device->closeDevice(); - device->run(); - device->drop(); - return true; -} - -bool videoDriver() -{ - bool result = true; - TestWithAllDrivers(testVideoDriver); - return result; -} diff --git a/lib/irrlicht/tests/viewPort.cpp b/lib/irrlicht/tests/viewPort.cpp deleted file mode 100644 index 9c1755d58..000000000 --- a/lib/irrlicht/tests/viewPort.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2008-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -//! Tests view ports and text rendering. -/** The result should be as follows: We have three times the same image, a billboard with a cube and the text in front. -They are replicated three times, one centered in the screen without viewport, one in the upper left (qurter screen) and -one on the right (half screen). The latter is stretched due to the changed aspect ratio. -The two viewport scenes get the texture drawn over the center as well, using draw2dimage. This should mark the proper -image position with the top left corner of the texture. -Finally, each scene has a checkbox drawn at the left side, vertically centered. This will show whether GUI elements adhere -to viewports as well. */ -static bool viewPortText(E_DRIVER_TYPE driverType) -{ - IrrlichtDevice *device = createDevice( driverType, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - IGUIEnvironment* env = smgr->getGUIEnvironment(); - - stabilizeScreenBackground(driver); - - env->addCheckBox(true, core::recti(10,60,28,82)); - - logTestString("Testing driver %ls\n", driver->getName()); - - IBillboardSceneNode * bnode = smgr->addBillboardSceneNode(0,dimension2d(32,32),core::vector3df(0,0,10)); - bnode->setMaterialFlag(video::EMF_LIGHTING, false); - bnode->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); - bnode->setMaterialTexture(0, driver->getTexture("../media/fire.bmp")); - - smgr->addTextSceneNode(device->getGUIEnvironment()->getBuiltInFont(), L"TEST", video::SColor(255,255,255,255), 0); - smgr->addCubeSceneNode(); - smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0)); - - driver->beginScene(true, true, SColor(255,100,101,140)); - smgr->drawAll(); - env->drawAll(); - driver->setViewPort(rect(0,0,160/2,120/2)); - smgr->drawAll(); - env->drawAll(); - driver->draw2DImage(driver->getTexture("../media/fire.bmp"), core::vector2di(160/2,120/2)); - driver->setViewPort(rect(160/2,0,160,120)); - smgr->drawAll(); - env->drawAll(); - driver->draw2DImage(driver->getTexture("../media/fire.bmp"), core::vector2di(160/2,120/2)); - driver->endScene(); - - bool result = takeScreenshotAndCompareAgainstReference(driver, "-viewPortText.png", 98.71f); - - device->closeDevice(); - device->run(); - device->drop(); - - return result; -} - - -bool viewPort(void) -{ - bool result = true; - - // TODO: software driver and burnings don't use view port for - // 2d rendering, so result is pretty wrong. - TestWithAllDrivers(viewPortText); - - return result; -} - diff --git a/lib/irrlicht/tests/writeImageToFile.cpp b/lib/irrlicht/tests/writeImageToFile.cpp deleted file mode 100644 index 36e719c02..000000000 --- a/lib/irrlicht/tests/writeImageToFile.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (C) 2009-2012 Colin MacDonald -// No rights reserved: this software is in the public domain. - -#if defined(_MSC_VER) -#define _CRT_SECURE_NO_WARNINGS 1 -#endif // _MSC_VER - -#include "testUtils.h" - -using namespace irr; -using namespace core; -using namespace scene; -using namespace video; -using namespace io; -using namespace gui; - -//! Tests IVideoDriver::writeImageToFile() using IWriteFile -bool writeImageToFile(void) -{ - IrrlichtDevice *device = createDevice( EDT_BURNINGSVIDEO, dimension2d(160, 120), 32); - if (!device) - return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs - - IVideoDriver* driver = device->getVideoDriver(); - ISceneManager * smgr = device->getSceneManager(); - - // Draw a cube background so that we can check that the pixels' alpha is working. - ISceneNode * cube = smgr->addCubeSceneNode(50.f, 0, -1, vector3df(0, 0, 60)); - cube->setMaterialTexture(0, driver->getTexture("../media/wall.bmp")); - cube->setMaterialFlag(video::EMF_LIGHTING, false); - (void)smgr->addCameraSceneNode(); - - driver->beginScene(true, true, SColor(255,100,101,140)); - smgr->drawAll(); - - // Test for benign handling of offscreen pixel values as well as onscreen ones. - for(s32 x = -10; x < 170; ++x) - { - s32 y = 120 * x / 160; - driver->drawPixel((u32)x, (u32)y, SColor(255, 255 * x / 640, 255 * (640 - x) / 640, 0)); - y = 120 - y; - driver->drawPixel((u32)x, (u32)y, SColor(255 * x / 640, 0, 255, 255)); - } - - driver->endScene(); - - bool result = false; - IWriteFile * writtenFile = 0; - IWriteFile * memoryFile = 0; - const char * writtenFilename = 0; - const u32 BUFFER_SIZE = 160 * 120 * 4; - c8 * buffer = 0; - const char * referenceFilename = 0; - video::ECOLOR_FORMAT format; - - irr::video::IImage * screenshot = driver->createScreenShot(video::ECF_R8G8B8); - if (!screenshot) - { - logTestString("Failed to take screenshot\n"); - assert_log(false); - goto cleanup; - } - - format = screenshot->getColorFormat(); - if (format != video::ECF_R8G8B8) - { - irr::video::IImage * fixedScreenshot = driver->createImage(video::ECF_R8G8B8, screenshot->getDimension()); - screenshot->copyTo(fixedScreenshot); - screenshot->drop(); - screenshot = 0; - - if (!fixedScreenshot) - { - logTestString("Failed to convert screenshot to ECF_A8R8G8B8\n"); - assert_log(false); - goto cleanup; - } - - screenshot = fixedScreenshot; - } - - buffer = new c8[BUFFER_SIZE]; - writtenFilename = "results/Burning's Video-writeImageToFile.png"; - memoryFile = device->getFileSystem()->createMemoryWriteFile(buffer, BUFFER_SIZE, writtenFilename, false); - if (!driver->writeImageToFile(screenshot, memoryFile)) - { - logTestString("Failed to write png to memory file\n"); - assert_log(false); - goto cleanup; - } - - writtenFile = device->getFileSystem()->createAndWriteFile(memoryFile->getFileName()); - if (!writtenFile) - { - logTestString("Can't open %s for writing.\n", writtenFilename); - assert_log(false); - goto cleanup; - } - - if (memoryFile->getPos() != writtenFile->write(buffer, memoryFile->getPos())) - { - logTestString("Error while writing to %s.\n", writtenFilename); - assert_log(false); - goto cleanup; - } - - writtenFile->drop(); - writtenFile = 0; - - referenceFilename = "media/Burning's Video-drawPixel.png"; - - if ( fuzzyCompareImages(driver,writtenFilename, referenceFilename) < 99.9) - { - logTestString("File written from memory is not the same as the reference file. %s:%d\n" , __FILE__, __LINE__); -// assert_log(false); - goto cleanup; - } - - result = true; - -cleanup: - if ( screenshot ) - screenshot->drop(); - - if(writtenFile) - writtenFile->drop(); - - if(memoryFile) - memoryFile->drop(); - - delete [] buffer; - - device->drop(); - - return result; -} -