├── .clang-format ├── .github └── workflows │ ├── Build.yml │ └── MergeMainIntoConsole.yml ├── .gitignore ├── .gitmodules ├── .readthedocs.yaml ├── Android └── ThisPlatform │ ├── StringFunctions.h │ └── Threads.h ├── Angle └── CMakeLists.txt ├── Applications ├── GuiSample │ ├── CMakeLists.txt │ └── GuiSample.cpp ├── Sample │ ├── CMakeLists.txt │ ├── Sample.cpp │ ├── Shaders │ │ ├── raytrace.sfx │ │ └── raytrace.sl │ └── Textures │ │ └── environment.hdr ├── Sfx │ ├── BufferedStringStreamBuf.h │ ├── CMakeLists.txt │ ├── Compiler.cpp │ ├── Compiler.h │ ├── Environ.h │ ├── FileLoader.cpp │ ├── FileLoader.h │ ├── Function.cpp │ ├── Function.h │ ├── Main.cpp │ ├── Preprocessor.h │ ├── Preprocessor.lpp │ ├── Preprocessor.ypp │ ├── Sfx.cpp │ ├── Sfx.h │ ├── Sfx.lpp │ ├── Sfx.ypp │ ├── SfxClasses.h │ ├── SfxEffect.cpp │ ├── SfxEffect.h │ ├── SfxErrorCheck.h │ ├── SfxParser.h │ ├── SfxProgram.cpp │ ├── SfxProgram.h │ ├── ShaderInstance.cpp │ ├── ShaderInstance.h │ ├── StringFunctions.cpp │ ├── StringFunctions.h │ ├── StringToWString.cpp │ ├── StringToWString.h │ ├── VisualStudioDebugOutput.h │ └── json.hpp └── Test │ ├── CMakeLists.txt │ ├── Shaders │ └── Test.sfx │ └── Test.cpp ├── BuildConsole.py ├── CMake ├── FindSphinx.cmake ├── Include.cmake ├── Shader.cmake └── Variables.cmake ├── CMakeLists.txt ├── Core ├── BaseMouseHandler.cpp ├── BaseMouseHandler.h ├── BufferedStringStreamBuf.h ├── CMakeLists.txt ├── CommandLine.cpp ├── CommandLine.h ├── CommandLineParams.cpp ├── CommandLineParams.h ├── ConvertUTF.c ├── ConvertUTF.h ├── DebugMemory.h ├── DefaultFileLoader.cpp ├── DefaultFileLoader.h ├── DynamicLibrary.cpp ├── DynamicLibrary.h ├── EnumClassBitwiseOperators.h ├── EnvironmentVariables.cpp ├── EnvironmentVariables.h ├── Export.h ├── FileLoader.cpp ├── FileLoader.h ├── MemoryInterface.cpp ├── MemoryInterface.h ├── MemoryUsageInterface.h ├── ProfilingInterface.cpp ├── ProfilingInterface.h ├── PropertyMacros.h ├── ReadWriteMutex.h ├── RelativeFilePath.cpp ├── RelativeFilePath.h ├── RuntimeError.cpp ├── RuntimeError.h ├── Settings.cpp ├── Settings.h ├── SimpleIni.h ├── StringFunctions.cpp ├── StringFunctions.h ├── StringToWString.cpp ├── StringToWString.h ├── Timer.cpp ├── Timer.h ├── TrackingAllocator.cpp └── TrackingAllocator.h ├── CrossPlatform ├── AccelerationStructureManager.cpp ├── AccelerationStructureManager.h ├── Allocator.cpp ├── Allocator.h ├── AmortizationStruct.cpp ├── AmortizationStruct.h ├── AxesStandard.cpp ├── AxesStandard.h ├── BaseAccelerationStructure.cpp ├── BaseAccelerationStructure.h ├── BaseRenderer.h ├── BottomLevelAccelerationStructure.cpp ├── BottomLevelAccelerationStructure.h ├── Buffer.cpp ├── Buffer.h ├── CMakeLists.txt ├── Camera.cpp ├── Camera.h ├── CameraInterface.cpp ├── CameraInterface.h ├── DemoOverlay.cpp ├── DemoOverlay.h ├── DeviceContext.cpp ├── DeviceContext.h ├── DisplaySurface.cpp ├── DisplaySurface.h ├── DisplaySurfaceManager.cpp ├── DisplaySurfaceManager.h ├── Effect.cpp ├── Effect.h ├── Export.h ├── Framebuffer.cpp ├── Framebuffer.h ├── Frustum.h ├── GpuProfiler.cpp ├── GpuProfiler.h ├── GraphicsDeviceInterface.h ├── HdrRenderer.cpp ├── HdrRenderer.h ├── Layout.cpp ├── Layout.h ├── LensFlare.cpp ├── LensFlare.h ├── Light.cpp ├── Light.h ├── Macros.h ├── Material.cpp ├── Material.h ├── Mesh.cpp ├── Mesh.h ├── MeshLoad.cpp ├── MeshRenderer.cpp ├── MeshRenderer.h ├── MouseHandler.cpp ├── MouseHandler.h ├── PixelFormat.cpp ├── PixelFormat.h ├── PlatformStructuredBuffer.cpp ├── PlatformStructuredBuffer.h ├── Quaterniond.cpp ├── Quaterniond.h ├── Query.h ├── RenderDelegate.h ├── RenderDelegater.cpp ├── RenderDelegater.h ├── RenderDocLoader.cpp ├── RenderDocLoader.h ├── RenderPlatform.cpp ├── RenderPlatform.h ├── Resource.h ├── ShaderBindingTable.cpp ├── ShaderBindingTable.h ├── ShaderMode.h ├── Shaders │ ├── CppSl.sl │ ├── brdf.sl │ ├── camera_constants.sl │ ├── colour_packing.sl │ ├── common.sl │ ├── copy.sfx │ ├── cubemap_matrices.sl │ ├── debug.sfx │ ├── debug_constants.sl │ ├── depth.sl │ ├── font.sfx │ ├── hdr.sfx │ ├── hdr_constants.sl │ ├── image_constants.sl │ ├── light_probe_constants.sl │ ├── light_probes.sfx │ ├── mip.sfx │ ├── noise.sl │ ├── quaternion.sl │ ├── random.sl │ ├── raytracing.sl │ ├── raytracing_constants.sl │ ├── render_states.sl │ ├── sampler_states.sl │ ├── solid.sfx │ ├── solid_constants.sl │ ├── sphere.sfx │ ├── sphere_constants.sl │ ├── spherical_harmonics.sfx │ ├── spherical_harmonics.sl │ ├── spherical_harmonics_constants.sl │ ├── text_constants.sl │ ├── texture_compression.sfx │ ├── vec2.sl │ ├── vec3.sl │ └── vec4.sl ├── SphereRenderer.cpp ├── SphereRenderer.h ├── SphericalHarmonics.cpp ├── SphericalHarmonics.h ├── Text3DRenderer.cpp ├── Text3DRenderer.h ├── TextInputOutput.cpp ├── TextInputOutput.h ├── TextRenderer.cpp ├── TextRenderer.h ├── Texture.cpp ├── Texture.h ├── TopLevelAccelerationStructure.cpp ├── TopLevelAccelerationStructure.h ├── Topology.h ├── VideoBuffer.cpp ├── VideoBuffer.h ├── VideoDecoder.cpp ├── VideoDecoder.h ├── View.cpp ├── View.h ├── ViewStruct.cpp ├── ViewStruct.h ├── WinPixGpuCapturerLoader.cpp └── WinPixGpuCapturerLoader.h ├── DirectX11 ├── Buffer.cpp ├── Buffer.h ├── CMakeLists.txt ├── CompileShaderDX1x.cpp ├── CompileShaderDX1x.h ├── ConstantBuffer.cpp ├── ConstantBuffer.h ├── CreateEffectDX1x.cpp ├── CreateEffectDX1x.h ├── DX11Exception.cpp ├── DX11Exception.h ├── DeviceManager.cpp ├── DeviceManager.h ├── DirectXHeader.h ├── DisplaySurface.cpp ├── DisplaySurface.h ├── ESRAMManager.cpp ├── ESRAMManager.h ├── ESRAMTexture.cpp ├── ESRAMTexture.h ├── Effect.cpp ├── Effect.h ├── Export.h ├── FramebufferDX1x.cpp ├── FramebufferDX1x.h ├── Layout.cpp ├── Layout.h ├── Light.cpp ├── Light.h ├── MacrosDx1x.h ├── Material.cpp ├── Material.h ├── Mesh.cpp ├── Mesh.h ├── PlatformStructuredBuffer.cpp ├── PlatformStructuredBuffer.h ├── RenderPlatform.cpp ├── RenderPlatform.h ├── ResourcesDx1x.h ├── SaveTextureDX1x.cpp ├── SaveTextureDX1x.h ├── Sfx │ ├── DirectX11.json │ └── shader_platform.sl ├── SfxBuildRule.props ├── SfxBuildRule.targets ├── SfxBuildRule.xml ├── SimulUseDXSDK.props ├── SimulUseWin8SDK.props ├── Texture.cpp ├── Texture.h ├── Utilities.cpp ├── Utilities.h └── resource.h ├── DirectX12 ├── BaseAccelerationStructure.cpp ├── BaseAccelerationStructure.h ├── BottomLevelAccelerationStructure.cpp ├── BottomLevelAccelerationStructure.h ├── Buffer.cpp ├── Buffer.h ├── CMakeLists.txt ├── CommandListController.cpp ├── CommandListController.h ├── ConstantBuffer.cpp ├── DXSampleHelper.h ├── DeviceManager.cpp ├── DeviceManager.h ├── DirectXRaytracingHelper.h ├── DisplaySurface.cpp ├── DisplaySurface.h ├── Effect.cpp ├── Export.h ├── Framebuffer.cpp ├── Framebuffer.h ├── GpuProfiler.cpp ├── GpuProfiler.h ├── Heap.cpp ├── Heap.h ├── Layout.cpp ├── Layout.h ├── PlatformStructuredBuffer.cpp ├── PlatformStructuredBuffer.h ├── Query.cpp ├── Query.h ├── RenderPlatform.cpp ├── RenderPlatform.h ├── Sfx │ ├── DirectX12.json │ └── shader_platform.sl ├── ShaderBindingTable.cpp ├── ShaderBindingTable.h ├── SimulDirectXHeader.h ├── Texture.cpp ├── TopLevelAccelerationStructure.cpp ├── TopLevelAccelerationStructure.h ├── VideoBuffer.cpp ├── VideoBuffer.h ├── VideoDecoder.cpp ├── VideoDecoder.h ├── constantbuffer.h ├── d3dx12.h ├── effect.h └── texture.h ├── Docs ├── API │ ├── BaseFramebuffer.rst │ ├── Camera.rst │ ├── CommandLine.rst │ ├── ConstantBuffer.rst │ ├── DisplaySurfaceManager.rst │ ├── Effect.rst │ ├── EffectTechnique.rst │ ├── GraphicsDeviceContext.rst │ ├── HdrRenderer.rst │ ├── PlatformStructuredBuffer.rst │ ├── RenderPlatform.rst │ ├── Texture.rst │ ├── View.rst │ └── apiindex.rst ├── CMakeLists.txt ├── Doxyfile.in ├── Makefile ├── Reference │ ├── Core │ │ ├── BaseMouseHandler.rst │ │ ├── CommandLine.rst │ │ ├── DefaultFileLoader.rst │ │ ├── FileLoader.rst │ │ ├── MemoryInterface.rst │ │ └── Timer.rst │ ├── CrossPlatform │ │ ├── BaseFramebuffer.rst │ │ ├── Buffer.rst │ │ ├── Camera.rst │ │ ├── DeviceContext.rst │ │ ├── DisplaySurface.rst │ │ ├── DisplaySurfaceManager.rst │ │ ├── Effect.rst │ │ ├── GpuProfiler.rst │ │ ├── GraphicsDeviceContext.rst │ │ ├── HdrRenderer.rst │ │ ├── Layout.rst │ │ ├── PixelFormat.rst │ │ ├── PlatformStructuredBuffer.rst │ │ ├── Quaterniond.rst │ │ ├── RenderPlatform.rst │ │ ├── TextInputOutput.rst │ │ ├── TextRenderer.rst │ │ ├── Texture.rst │ │ ├── View.rst │ │ └── ViewStruct.rst │ ├── Math │ │ ├── Matrix.rst │ │ ├── Matrix4x4.rst │ │ ├── Noise1D.rst │ │ ├── Noise2D.rst │ │ ├── Noise3D.rst │ │ └── Quaternion.rst │ ├── core.rst │ ├── crossplatform.rst │ ├── math.rst │ └── reference.rst ├── conf.py ├── index.rst ├── make.bat ├── platform_sphinx_theme │ ├── __init__.py │ ├── breadcrumbs.html │ ├── breadcrumbs.html.bak │ ├── footer.html │ ├── layout.html │ ├── locale │ │ ├── da │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── de │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── en │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── es │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── et │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── fa_IR │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── fr │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── hr │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── hu │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── it │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── lt │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── nl │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── pl │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── pt │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── pt_BR │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── ru │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── sphinx.pot │ │ ├── sv │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── tr │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ ├── zh_CN │ │ │ └── LC_MESSAGES │ │ │ │ ├── sphinx.mo │ │ │ │ └── sphinx.po │ │ └── zh_TW │ │ │ └── LC_MESSAGES │ │ │ ├── sphinx.mo │ │ │ └── sphinx.po │ ├── platforms.html │ ├── search.html │ ├── searchbox.html │ ├── static │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── fonts │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ ├── lato-normal.woff │ │ │ │ └── lato-normal.woff2 │ │ │ └── theme.css │ │ └── js │ │ │ ├── badge_only.js │ │ │ ├── html5shiv-printshiv.min.js │ │ │ ├── html5shiv.min.js │ │ │ └── theme.js │ ├── theme.conf │ └── versions.html └── requirements.txt ├── External ├── D3D12MemoryAllocator │ ├── LICENSE.txt │ ├── NOTICES.txt │ ├── include │ │ └── D3D12MemAlloc.h │ └── src │ │ └── D3D12MemAlloc.cpp ├── DirectX │ ├── DXCompiler │ │ ├── LICENCE-MIT.txt │ │ ├── LICENSE-LLVM.txt │ │ ├── LICENSE-MS.txt │ │ ├── README.md │ │ ├── d3d12shader.h │ │ ├── dxc.exe │ │ ├── dxcapi.h │ │ ├── dxcerrors.h │ │ ├── dxcisense.h │ │ ├── dxcompiler.dll │ │ ├── dxcompiler.lib │ │ └── dxil.dll │ ├── DirectXTex │ │ ├── .editorconfig │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .nuget │ │ │ ├── directxtex_desktop_2015.nuspec │ │ │ ├── directxtex_desktop_2015.targets │ │ │ ├── directxtex_desktop_win10.nuspec │ │ │ ├── directxtex_desktop_win10.targets │ │ │ ├── directxtex_uwp.nuspec │ │ │ ├── directxtex_uwp.targets │ │ │ ├── signconfig_desktop.xml │ │ │ └── signconfig_uwp.xml │ │ ├── DDSTextureLoader │ │ │ ├── DDSTextureLoader.cpp │ │ │ ├── DDSTextureLoader.h │ │ │ ├── DDSTextureLoader12.cpp │ │ │ └── DDSTextureLoader12.h │ │ ├── DDSView │ │ │ ├── DDSView.rc │ │ │ ├── ddsview.cpp │ │ │ ├── ddsview.fx │ │ │ ├── directx.ico │ │ │ ├── hlsl.cmd │ │ │ └── shaders │ │ │ │ ├── ps1D.h │ │ │ │ ├── ps1Darray.h │ │ │ │ ├── ps2D.h │ │ │ │ ├── ps2Darray.h │ │ │ │ ├── ps3D.h │ │ │ │ ├── psCube.h │ │ │ │ └── vs.h │ │ ├── DirectXTex │ │ │ ├── BC.cpp │ │ │ ├── BC.h │ │ │ ├── BC4BC5.cpp │ │ │ ├── BC6HBC7.cpp │ │ │ ├── BCDirectCompute.cpp │ │ │ ├── BCDirectCompute.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CMakeSettings.json │ │ │ ├── DDS.h │ │ │ ├── DirectXTex.h │ │ │ ├── DirectXTex.inl │ │ │ ├── DirectXTexCompress.cpp │ │ │ ├── DirectXTexCompressGPU.cpp │ │ │ ├── DirectXTexConvert.cpp │ │ │ ├── DirectXTexD3D11.cpp │ │ │ ├── DirectXTexD3D12.cpp │ │ │ ├── DirectXTexDDS.cpp │ │ │ ├── DirectXTexFlipRotate.cpp │ │ │ ├── DirectXTexHDR.cpp │ │ │ ├── DirectXTexImage.cpp │ │ │ ├── DirectXTexMipmaps.cpp │ │ │ ├── DirectXTexMisc.cpp │ │ │ ├── DirectXTexNormalMaps.cpp │ │ │ ├── DirectXTexP.h │ │ │ ├── DirectXTexPMAlpha.cpp │ │ │ ├── DirectXTexResize.cpp │ │ │ ├── DirectXTexTGA.cpp │ │ │ ├── DirectXTexUtil.cpp │ │ │ ├── DirectXTexWIC.cpp │ │ │ ├── Filters.h │ │ │ ├── Shaders │ │ │ │ ├── BC6HEncode.hlsl │ │ │ │ ├── BC7Encode.hlsl │ │ │ │ ├── CompileShaders.cmd │ │ │ │ └── Compiled │ │ │ │ │ ├── BC6HEncode_EncodeBlockCS.inc │ │ │ │ │ ├── BC6HEncode_TryModeG10CS.inc │ │ │ │ │ ├── BC6HEncode_TryModeLE10CS.inc │ │ │ │ │ ├── BC7Encode_EncodeBlockCS.inc │ │ │ │ │ ├── BC7Encode_TryMode02CS.inc │ │ │ │ │ ├── BC7Encode_TryMode137CS.inc │ │ │ │ │ └── BC7Encode_TryMode456CS.inc │ │ │ ├── d3dx12.h │ │ │ └── scoped.h │ │ ├── DirectXTex_Desktop_2015.sln │ │ ├── DirectXTex_Desktop_2015_Win10.sln │ │ ├── DirectXTex_Desktop_2017.sln │ │ ├── DirectXTex_Desktop_2017_Win10.sln │ │ ├── DirectXTex_Desktop_2019.sln │ │ ├── DirectXTex_Desktop_2019_Win10.sln │ │ ├── DirectXTex_Windows10_2015.sln │ │ ├── DirectXTex_Windows10_2017.sln │ │ ├── DirectXTex_Windows10_2019.sln │ │ ├── DirectXTex_XboxOneXDK_2015.sln │ │ ├── DirectXTex_XboxOneXDK_2017.sln │ │ ├── LICENSE │ │ ├── ReadMe.txt │ │ ├── ScreenGrab │ │ │ ├── ScreenGrab.cpp │ │ │ ├── ScreenGrab.h │ │ │ ├── ScreenGrab12.cpp │ │ │ └── ScreenGrab12.h │ │ ├── Texassemble │ │ │ ├── directx.ico │ │ │ ├── texassemble.cpp │ │ │ └── texassemble.rc │ │ ├── Texconv │ │ │ ├── Texconv.rc │ │ │ ├── directx.ico │ │ │ └── texconv.cpp │ │ ├── Texdiag │ │ │ ├── directx.ico │ │ │ ├── texdiag.cpp │ │ │ └── texdiag.rc │ │ └── WICTextureLoader │ │ │ ├── WICTextureLoader.cpp │ │ │ ├── WICTextureLoader.h │ │ │ ├── WICTextureLoader12.cpp │ │ │ └── WICTextureLoader12.h │ └── Effects11_Win8SDK │ │ ├── Binary │ │ ├── EffectBinaryFormat.h │ │ ├── EffectStateBase11.h │ │ ├── EffectStates11.h │ │ └── SOParser.h │ │ ├── CMakeLists.txt │ │ ├── Effect.h │ │ ├── EffectAPI.cpp │ │ ├── EffectLoad.cpp │ │ ├── EffectLoad.h │ │ ├── EffectNonRuntime.cpp │ │ ├── EffectReflection.cpp │ │ ├── EffectRuntime.cpp │ │ ├── EffectVariable.inl │ │ ├── Effects11_2010_DXSDK.sln │ │ ├── Effects11_2010_SDK81.sln │ │ ├── Effects11_2012.sln │ │ ├── Effects11_2013.sln │ │ ├── Effects11_Windows81.sln │ │ ├── IUnknownImp.h │ │ ├── Windows81SDKVS12_x64.props │ │ ├── Windows81SDKVS12_x86.props │ │ ├── Windows81SDK_x64.props │ │ ├── Windows81SDK_x86.props │ │ ├── d3dxGlobal.cpp │ │ ├── inc │ │ ├── d3dx11effect.h │ │ └── d3dxGlobal.h │ │ └── pchfx.h ├── OpenXR-Android │ ├── OpenXR-SDK │ │ └── include │ │ │ ├── CMakeLists.txt │ │ │ └── openxr │ │ │ ├── CMakeLists.txt │ │ │ ├── openxr.h │ │ │ ├── openxr_platform.h │ │ │ ├── openxr_platform_defines.h │ │ │ └── openxr_reflection.h │ ├── meta │ │ └── OpenXR │ │ │ ├── Include │ │ │ └── openxr │ │ │ │ ├── fb_keyboard_tracking.h │ │ │ │ ├── fb_passthrough_keyboard_hands.h │ │ │ │ ├── fb_render_model.h │ │ │ │ ├── fb_spatial_entity.h │ │ │ │ ├── fb_spatial_entity_query.h │ │ │ │ ├── fb_spatial_entity_storage.h │ │ │ │ ├── openxr_extension_helpers.h │ │ │ │ ├── openxr_oculus.h │ │ │ │ └── openxr_oculus_helpers.h │ │ │ ├── Libs │ │ │ └── Android │ │ │ │ ├── arm64-v8a │ │ │ │ ├── Debug │ │ │ │ │ ├── libopenxr_loader.so │ │ │ │ │ └── libxrspacewarp.so │ │ │ │ └── Release │ │ │ │ │ └── libopenxr_loader.so │ │ │ │ └── armeabi-v7a │ │ │ │ ├── Debug │ │ │ │ └── libopenxr_loader.so │ │ │ │ └── Release │ │ │ │ └── libopenxr_loader.so │ │ │ └── Projects │ │ │ └── AndroidPrebuilt │ │ │ ├── AndroidManifest.xml │ │ │ └── jni │ │ │ └── Android.mk │ └── vulkan │ │ └── bin │ │ └── arm64-v8a │ │ └── libVkLayer_khronos_validation.so ├── PIX │ ├── Include │ │ ├── PIXEvents.h │ │ ├── PIXEventsCommon.h │ │ ├── pix3.h │ │ └── pix3_win.h │ ├── ThirdPartyNotices.txt │ ├── VERSION.txt │ └── lib │ │ ├── WinPixEventRuntime.dll │ │ └── WinPixEventRuntime.lib ├── RenderDoc │ ├── Include │ │ └── renderdoc_app.h │ └── LICENCE.txt ├── VulkanMemoryAllocator │ ├── LICENSE.txt │ └── include │ │ └── vk_mem_alloc.h ├── parallel_hashmap │ ├── btree.h │ ├── meminfo.h │ ├── phmap.h │ ├── phmap_base.h │ ├── phmap_bits.h │ ├── phmap_config.h │ ├── phmap_dump.h │ ├── phmap_fwd_decl.h │ └── phmap_utils.h ├── units │ └── units.h └── win_flex_bison │ ├── FlexLexer.h │ ├── README.txt │ ├── UNISTD_ERROR.readme │ ├── data │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── README.md │ ├── bison-default.css │ ├── bison.m4 │ ├── c++-skel.m4 │ ├── c++.m4 │ ├── c-like.m4 │ ├── c-skel.m4 │ ├── c.m4 │ ├── glr.c │ ├── glr.cc │ ├── java-skel.m4 │ ├── java.m4 │ ├── lalr1.cc │ ├── lalr1.java │ ├── local.mk │ ├── location.cc │ ├── m4sugar │ │ ├── foreach.m4 │ │ └── m4sugar.m4 │ ├── skeletons │ │ ├── README-D.txt │ │ ├── bison.m4 │ │ ├── c++-skel.m4 │ │ ├── c++.m4 │ │ ├── c-like.m4 │ │ ├── c-skel.m4 │ │ ├── c.m4 │ │ ├── d-skel.m4 │ │ ├── d.m4 │ │ ├── glr.c │ │ ├── glr.cc │ │ ├── java-skel.m4 │ │ ├── java.m4 │ │ ├── lalr1.cc │ │ ├── lalr1.d │ │ ├── lalr1.java │ │ ├── location.cc │ │ ├── stack.hh │ │ ├── traceon.m4 │ │ ├── variant.hh │ │ └── yacc.c │ ├── stack.hh │ ├── xslt │ │ ├── bison.xsl │ │ ├── xml2dot.xsl │ │ ├── xml2text.xsl │ │ └── xml2xhtml.xsl │ └── yacc.c │ ├── snazzle.l │ ├── win_bison.exe │ └── win_flex.exe ├── GLES ├── Buffer.cpp ├── Buffer.h ├── CMakeLists.txt ├── DeviceManager.cpp ├── DeviceManager.h ├── DisplaySurface.cpp ├── DisplaySurface.h ├── Effect.cpp ├── Effect.h ├── Export.h ├── FramebufferGL.cpp ├── FramebufferGL.h ├── KHR │ └── khrplatform.h ├── Layout.cpp ├── Layout.h ├── Light.cpp ├── Light.h ├── Mesh.cpp ├── Mesh.h ├── OpenGLCallbackInterface.h ├── Profiler.cpp ├── Profiler.h ├── RenderPlatform.cpp ├── RenderPlatform.h ├── Sfx │ ├── GLES.json │ └── shader_platform.sl ├── Texture.cpp └── Texture.h ├── ImGui ├── CMakeLists.txt ├── Export.h ├── Shaders │ └── imgui.sfx ├── addons │ └── imguidatetime │ │ ├── Source.txt │ │ ├── imguidatetime.cpp │ │ └── imguidatetime.h ├── imgui_impl_glfw.cpp ├── imgui_impl_glfw.h ├── imgui_impl_platform.cpp ├── imgui_impl_platform.h ├── imgui_impl_win32.cpp └── imgui_impl_win32.h ├── Licence.md ├── Linux └── ThisPlatform │ ├── StringFunctions.h │ └── Threads.h ├── Math ├── Align.h ├── CMakeLists.txt ├── Decay.h ├── Export.h ├── Finite.h ├── Float16.cpp ├── Float16.h ├── GeometricFunctions.cpp ├── GeometricFunctions.h ├── Iteration.cpp ├── Iteration.h ├── Math.cpp ├── MathFunctions.cpp ├── MathFunctions.h ├── Matrix.cpp ├── Matrix.h ├── Matrix4x4.cpp ├── Matrix4x4.h ├── MatrixVector.cpp ├── MatrixVector.h ├── MatrixVector3.cpp ├── MatrixVector3.h ├── MatrixVector3.inl ├── Noise1D.cpp ├── Noise1D.h ├── Noise2D.cpp ├── Noise2D.h ├── Noise3D.cpp ├── Noise3D.h ├── Orientation.cpp ├── Orientation.h ├── OrientationInterface.h ├── Pi.h ├── PointerList.cpp ├── PowerOfTwo.h ├── Quaternion.cpp ├── Quaternion.h ├── RandomNumberGenerator.cpp ├── RandomNumberGenerator.h ├── ReferenceFrame.cpp ├── ReferenceFrame.h ├── SimVector.cpp ├── SimVector.h ├── Vector3.cpp ├── Vector3.h ├── Vector3.inl ├── VirtualVector.cpp ├── VirtualVector.h ├── afxres.h ├── mmxrand.cpp ├── mmxrand.h └── resource.h ├── OpenGL ├── Buffer.cpp ├── Buffer.h ├── CMakeLists.txt ├── DeviceManager.cpp ├── DeviceManager.h ├── DisplaySurface.cpp ├── DisplaySurface.h ├── Effect.cpp ├── Effect.h ├── Export.h ├── Framebuffer.cpp ├── Framebuffer.h ├── KHR │ └── khrplatform.h ├── Layout.cpp ├── Layout.h ├── Light.cpp ├── Light.h ├── Mesh.cpp ├── Mesh.h ├── OpenGLCallbackInterface.h ├── Profiler.cpp ├── Profiler.h ├── RenderPlatform.cpp ├── RenderPlatform.h ├── Sfx.props ├── Sfx.targets ├── Sfx.xml ├── Sfx │ ├── OpenGL.json │ └── shader_platform.sl ├── Texture.cpp ├── Texture.h ├── UseNvFX.props ├── glad.c └── glad │ └── glad.h ├── ReadMe.md ├── Resources └── Textures │ └── Font16-11.png ├── Setup.py ├── Shaders └── CMakeLists.txt ├── Vulkan ├── Allocation.h ├── Buffer.cpp ├── Buffer.h ├── CMakeLists.txt ├── DeviceManager.cpp ├── DeviceManager.h ├── DisplaySurface.cpp ├── DisplaySurface.h ├── Effect.cpp ├── Effect.h ├── EffectPass.cpp ├── EffectPass.h ├── Export.h ├── Framebuffer.cpp ├── Framebuffer.h ├── Layout.cpp ├── Layout.h ├── PlatformConstantBuffer.cpp ├── PlatformConstantBuffer.h ├── PlatformStructuredBuffer.cpp ├── PlatformStructuredBuffer.h ├── RenderPlatform.cpp ├── RenderPlatform.h ├── Sfx.props ├── Sfx.targets ├── Sfx.xml ├── Sfx │ ├── Vulkan.json │ ├── VulkanAndroid.json │ └── shader_platform.sl ├── Shader.cpp ├── Shader.h ├── Texture.cpp ├── Texture.h ├── VideoDecoder.cpp └── VideoDecoder.h ├── WebGL ├── .project └── scripts │ ├── ga.js │ ├── glMatrix-0.9.5.min.js │ ├── render.js │ ├── truesky.js │ └── webgl-utils.js ├── Windows ├── CMake │ └── toolchain-WinGDK.cmake ├── ThisPlatform │ ├── DateTime.h │ ├── Direct3D12.h │ ├── StringFunctions.h │ └── Threads.h ├── ThisPlatformGDK.properties ├── VisualStudioDebugOutput.h ├── WindowsErrorHandling.h └── trueSKYWinGDK.nsi ├── shadertoolsconfig.json └── version.properties /.clang-format: -------------------------------------------------------------------------------- 1 | Language: Cpp 2 | BasedOnStyle: LLVM 3 | UseTab: Always 4 | IndentWidth: 4 5 | TabWidth: 4 6 | BreakBeforeBraces: Allman 7 | AllowShortIfStatementsOnASingleLine: true 8 | IndentCaseLabels: false 9 | ColumnLimit: 0 10 | AccessModifierOffset: -4 11 | NamespaceIndentation: All 12 | FixNamespaceComments: false 13 | BinPackParameters: false 14 | AllowAllParametersOfDeclarationOnNextLine: false 15 | AllowShortBlocksOnASingleLine: Never 16 | -------------------------------------------------------------------------------- /.github/workflows/Build.yml: -------------------------------------------------------------------------------- 1 | # This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. 2 | # See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml 3 | name: CMake Build Windows x64 Debug/Release with Visual Studio 2022 4 | 5 | on: 6 | push: 7 | branches: [ "main" ] 8 | pull_request: 9 | branches: [ "main" ] 10 | workflow_dispatch: 11 | 12 | jobs: 13 | build: 14 | runs-on: windows-latest 15 | 16 | steps: 17 | - name: Clone Platform 18 | uses: actions/checkout@v4 19 | 20 | - name: Update Submodules 21 | run: git submodule update --init --force 22 | 23 | - name: Install Vulkan SDK 24 | uses: humbletim/install-vulkan-sdk@v1.1.1 25 | with: 26 | version: 1.3.296.0 27 | cache: true 28 | 29 | - name: Configure CMake 30 | # Configure CMake in a 'build' subdirectory. 31 | run: cmake -B ${{github.workspace}}/build 32 | 33 | - name: Build Release 34 | # Build your program with the given configuration 35 | run: cmake --build ${{github.workspace}}/build --target ALL_BUILD --config Release 36 | 37 | - name: Build Debug 38 | # Build your program with the given configuration 39 | run: cmake --build ${{github.workspace}}/build --target ALL_BUILD --config Debug 40 | -------------------------------------------------------------------------------- /.github/workflows/MergeMainIntoConsole.yml: -------------------------------------------------------------------------------- 1 | name: Merge main into console 2 | #https://stackoverflow.com/questions/35445186/can-github-automatically-merge-branches 3 | 4 | on: 5 | push: 6 | branches: 7 | - main 8 | workflow_dispatch: 9 | 10 | env: 11 | # do NOT replace ${{secrets.GITHUB_TOKEN}}, GitHub will take care of it 12 | MY_REPO: https://simul-build:${{secrets.GITHUB_TOKEN}}@github.com/simul/Platform.git 13 | 14 | MY_BRANCH: console 15 | 16 | MAIN_REPO: https://github.com/simul/Platform.git 17 | 18 | MAIN_BRANCH: main 19 | 20 | jobs: 21 | merge: 22 | runs-on: ubuntu-latest 23 | 24 | steps: 25 | - name: Merge main into console 26 | run: | 27 | git clone ${{env.MY_REPO}} -b ${{env.MY_BRANCH}} tmp 28 | cd tmp 29 | git config user.name "Automerge Bot" 30 | git config user.email "bot@example.com" 31 | git config pull.rebase false 32 | git merge origin/${{env.MAIN_BRANCH}} 33 | git push 34 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "External/glfw"] 2 | path = External/glfw 3 | url = https://github.com/glfw/glfw.git 4 | [submodule "External/stb"] 5 | path = External/stb 6 | url = https://github.com/nothings/stb.git 7 | [submodule "External/fmt"] 8 | path = External/fmt 9 | url = ../fmt.git 10 | [submodule "External/assimp"] 11 | path = External/assimp 12 | url = https://github.com/assimp/assimp.git 13 | [submodule "External/imgui"] 14 | path = External/imgui 15 | url = https://github.com/ocornut/imgui.git 16 | [submodule "External/freetype"] 17 | path = External/freetype 18 | url = https://github.com/freetype/freetype.git 19 | 20 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | configuration: Docs/conf.py 11 | 12 | # Optionally build your docs in additional formats such as PDF 13 | formats: 14 | - pdf 15 | 16 | # Optionally set the version of Python and requirements required to build your docs 17 | python: 18 | version: 3.7 19 | install: 20 | - requirements: Docs/requirements.txt 21 | 22 | version: 3 23 | 24 | submodules: 25 | exclude: all 26 | -------------------------------------------------------------------------------- /Android/ThisPlatform/StringFunctions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(UNIX) || defined(__linux__) || defined(__ANDROID__) 4 | #include 5 | #define _strcpy(d,n,s) (strncpy(d,s,n)) 6 | #define strcpy_s(d, n, s) (strncpy(d,s,n)); 7 | 8 | template 9 | constexpr size_t _countof(T(&array)[SizeOfArray]) { return SizeOfArray; } 10 | #endif -------------------------------------------------------------------------------- /Angle/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(PLATFORM_SUPPORT_ANGLE) 2 | 3 | set(ANGLE_BUILD_OUTPUT_DIR "C:/Simul/Angle/out/Debug" CACHE STRING "Set the location of the Angle directory.") 4 | set(src_dir "${ANGLE_BUILD_OUTPUT_DIR}") 5 | set(dst_dir "${SIMUL_PLATFORM_DIR}/Angle/bin") 6 | 7 | #message(STATUS "${src_dir}") 8 | #message(STATUS "${dst_dir}") 9 | 10 | file(GLOB ANGLR_LIB_FILES 11 | "${src_dir}/*.dll" 12 | "${src_dir}/*.lib" 13 | "${src_dir}/*.pdb" 14 | "${src_dir}/*.so" 15 | "${src_dir}/*.a" 16 | ) 17 | 18 | file(COPY ${ANGLR_LIB_FILES} DESTINATION ${dst_dir}) 19 | 20 | endif() -------------------------------------------------------------------------------- /Applications/GuiSample/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | file(GLOB SOURCES GuiSample.cpp ) 4 | file(GLOB HEADERS "*.h" ) 5 | file(GLOB shaders "Shaders/*.sfx" "Shaders/*.sl") 6 | 7 | source_group("Shaders" src FILES ${shaders} ) 8 | 9 | add_static_executable(GuiSample${STATIC_LINK_SUFFIX} WIN32 SOURCES ${SOURCES} ${HEADERS} ${shaders} DEFINITIONS ${SAMPLE_API} FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX} INCLUDES ${SIMUL_PLATFORM_DIR}/External/imgui) 10 | target_link_libraries(GuiSample${STATIC_LINK_SUFFIX} ImGui${STATIC_LINK_SUFFIX} SimulCrossPlatform${STATIC_LINK_SUFFIX} SimulMath${STATIC_LINK_SUFFIX} Core${STATIC_LINK_SUFFIX} directxtex${STATIC_LINK_SUFFIX} fmt::fmt-header-only) 11 | if(PLATFORM_SUPPORT_D3D11) 12 | target_link_libraries(GuiSample${STATIC_LINK_SUFFIX} SimulDirectX11${STATIC_LINK_SUFFIX} ) 13 | endif() 14 | if(PLATFORM_SUPPORT_D3D12) 15 | target_link_libraries(GuiSample${STATIC_LINK_SUFFIX} SimulDirectX12${STATIC_LINK_SUFFIX} ) 16 | endif() 17 | if(PLATFORM_SUPPORT_VULKAN) 18 | target_link_libraries(GuiSample${STATIC_LINK_SUFFIX} SimulVulkan${STATIC_LINK_SUFFIX} ${Vulkan_LIBRARY} ) 19 | endif() 20 | 21 | -------------------------------------------------------------------------------- /Applications/Sample/Shaders/raytrace.sl: -------------------------------------------------------------------------------- 1 | #ifndef RAYTRACINGSL 2 | #define RAYTRACINGSL 3 | 4 | struct Viewport 5 | { 6 | float left; 7 | float top; 8 | float right; 9 | float bottom; 10 | }; 11 | 12 | PLATFORM_NAMED_CONSTANT_BUFFER(RayGenConstantBuffer, g_rayGenCB, 0, 3) 13 | Viewport viewport; 14 | Viewport stencil; 15 | PLATFORM_NAMED_CONSTANT_BUFFER_END 16 | 17 | #endif -------------------------------------------------------------------------------- /Applications/Sample/Textures/environment.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Applications/Sample/Textures/environment.hdr -------------------------------------------------------------------------------- /Applications/Sfx/BufferedStringStreamBuf.h: -------------------------------------------------------------------------------- 1 | #ifndef BUFFEREDSTRINGSTREAMBUF_H 2 | #define BUFFEREDSTRINGSTREAMBUF_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class BufferedStringStreamBuf : public std::streambuf 9 | { 10 | public: 11 | BufferedStringStreamBuf(int bufferSize) 12 | { 13 | if (bufferSize) 14 | { 15 | char *ptr = new char[bufferSize]; 16 | setp(ptr, ptr + bufferSize); 17 | } 18 | else 19 | setp(0, 0); 20 | } 21 | virtual ~BufferedStringStreamBuf() 22 | { 23 | //sync(); 24 | delete[] pbase(); 25 | } 26 | virtual void writeString(const std::string &str) = 0; 27 | private: 28 | int overflow(int c) 29 | { 30 | sync(); 31 | 32 | if (c != EOF) 33 | { 34 | if (pbase() == epptr()) 35 | { 36 | std::string temp; 37 | temp += char(c); 38 | writeString(temp); 39 | } 40 | else 41 | sputc((char)c); 42 | } 43 | 44 | return 0; 45 | } 46 | 47 | int sync() 48 | { 49 | if (pbase() != pptr()) 50 | { 51 | int len = int(pptr() - pbase()); 52 | std::string temp(pbase(), len); 53 | writeString(temp); 54 | setp(pbase(), epptr()); 55 | } 56 | return 0; 57 | } 58 | }; 59 | #endif 60 | -------------------------------------------------------------------------------- /Applications/Sfx/Compiler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "SfxClasses.h" 5 | #include "SfxEffect.h" 6 | #include "ShaderInstance.h" 7 | 8 | extern int Compile(std::shared_ptr shader, const std::string &sourceFile, std::string targetFile 9 | , sfx::ShaderType t 10 | , sfx::PixelOutputFormat pixelOutputFormat 11 | , const std::string &sharedSource 12 | , std::ostringstream& sLog, const SfxConfig &sfxConfig 13 | , const SfxOptions &sfxOptions 14 | , std::map fileList 15 | , std::ofstream &combinedBinary 16 | , BinaryMap &binaryMap 17 | , const Declaration* rtState = nullptr); -------------------------------------------------------------------------------- /Applications/Sfx/FileLoader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #ifndef _MAX_PATH 5 | #define _MAX_PATH 260 6 | #endif 7 | #ifdef UNIX 8 | #define _getcwd getcwd 9 | #endif 10 | 11 | //! Class for loading files 12 | class FileLoader 13 | { 14 | public: 15 | FileLoader(); 16 | bool FileExists(const char *filename_utf8) const; 17 | const char *FindFileInPathStack(const char *filename_utf8,const std::vector &path_stack_utf8) const; 18 | void AcquireFileContents(void*& pointer, unsigned int& bytes, const char* filename_utf8,bool open_as_text); 19 | static uint64_t GetFileDate(const char* filename_utf8); 20 | void ReleaseFileContents(void* pointer); 21 | void Save(void* pointer, unsigned int bytes, const char* filename_utf8,bool save_as_text); 22 | }; 23 | 24 | extern int mkpath(const std::string &filename_utf8); -------------------------------------------------------------------------------- /Applications/Sfx/Function.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Function.h" -------------------------------------------------------------------------------- /Applications/Sfx/SfxErrorCheck.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef _WIN32 6 | #define strerror_r(err_code, sys_msg, sizeofsys_msg) strerror_s(sys_msg, sizeofsys_msg, err_code) 7 | #endif 8 | 9 | #ifdef __ORBIS__ 10 | #define strerror_r(err_code, sys_msg, sizeofsys_msg) strerror_s(sys_msg, sizeofsys_msg, err_code) 11 | #include 12 | #endif 13 | extern void CheckGLError(); 14 | extern void BreakIfDebugging(); 15 | #ifdef _MSC_VER 16 | #define BREAK_IF_DEBUGGING\ 17 | {\ 18 | if(IsDebuggerPresent())\ 19 | DebugBreak();\ 20 | } 21 | #else 22 | #define BREAK_IF_DEBUGGING 23 | #endif 24 | 25 | #define SFX_CERR std::cerr<<__FILE__<<"("<<__LINE__<<"): " 26 | #define SFX_BREAK(msg) {std::cerr<<__FILE__<<"("<<__LINE__<<"): "<0; 15 | } 16 | std::string GetShader(ShaderType,int i) const; 17 | int GetNumVariants() const; 18 | std::string GetVariantName(int i) const; 19 | std::vector GetShaderVariants(ShaderType t) const; 20 | std::string name; 21 | private: 22 | int numVariants=0; 23 | int getIndex(ShaderType t,int var)const; 24 | std::string m_shaderInstanceNames[NUM_OF_SHADER_COMMANDS]; 25 | std::vector shaderVariantNames[NUM_OF_SHADER_COMMANDS]; 26 | int variantCount[NUM_OF_SHADER_COMMANDS]; 27 | friend int ::sfxparse(); 28 | }; 29 | class Technique 30 | { 31 | public: 32 | Technique(const std::vector& passes); 33 | const std::vector< Pass> &GetPasses() const 34 | { 35 | return passes; 36 | } 37 | const std::map &GetPassMap() const 38 | { 39 | return m_passes; 40 | } 41 | private: 42 | std::map m_passes; 43 | std::vector passes; 44 | friend int ::sfxparse(); 45 | }; 46 | } 47 | #endif -------------------------------------------------------------------------------- /Applications/Sfx/ShaderInstance.cpp: -------------------------------------------------------------------------------- 1 | #include "ShaderInstance.h" 2 | using namespace sfx; 3 | 4 | ShaderInstance::ShaderInstance() 5 | : global_line_number(0) 6 | { 7 | } 8 | 9 | ShaderInstance::ShaderInstance(const ShaderInstance &cs) 10 | { 11 | shaderType =cs.shaderType; 12 | m_profile =cs.m_profile; 13 | m_functionName =cs.m_functionName; 14 | m_preamble =cs.m_preamble; 15 | m_augmentedSource =cs.m_augmentedSource; 16 | sbFilenames =cs.sbFilenames; 17 | entryPoint =cs.entryPoint; 18 | declarations =cs.declarations; 19 | global_line_number =cs.global_line_number; 20 | constantBuffers =cs.constantBuffers; 21 | } 22 | -------------------------------------------------------------------------------- /Applications/Sfx/ShaderInstance.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include "SfxClasses.h" 6 | 7 | namespace sfx 8 | { 9 | //! A shader to be compiled. 10 | struct ShaderInstance 11 | { 12 | ShaderInstance(); 13 | ShaderInstance(const ShaderInstance &cs); 14 | ShaderType shaderType; 15 | std::string m_profile; 16 | std::string m_functionName; 17 | std::string variantName; 18 | std::string m_preamble; 19 | std::string variantDefinitions; 20 | std::string variantDeclarations; 21 | std::map variantValues; 22 | std::string m_augmentedSource; 23 | std::string entryPoint; 24 | std::map sbFilenames;// maps from PixelOutputFormat for pixel shaders, or int for vertex(0) and export(1) shaders. 25 | std::set declarations; 26 | std::set constantBuffers; 27 | std::vector variantVariableIndex; 28 | int global_line_number; 29 | std::string rtFormatStateName; 30 | int numThreads[3]; 31 | // different variable names for this instance. 32 | std::set names; 33 | }; 34 | 35 | //struct ShaderInstanceSet 36 | //{ 37 | // std::map shaderInstances; 38 | //}; 39 | } -------------------------------------------------------------------------------- /Applications/Sfx/StringToWString.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_BASE_STRINGTOWSTRING_H 2 | #define SIMUL_BASE_STRINGTOWSTRING_H 3 | #include 4 | 5 | extern std::wstring Utf8ToWString(const char *utf8); 6 | extern std::wstring Utf8ToWString(std::string utf8); 7 | extern std::string WStringToUtf8(const wchar_t *src_w); 8 | extern std::string WStringToUtf8(std::wstring wstr); 9 | extern const std::wstring &StringToWString(const std::string &text); 10 | extern const std::string &WStringToString(const std::wstring &text); 11 | extern void WStringToAsciiString(char *output,const std::wstring &text); 12 | 13 | #endif -------------------------------------------------------------------------------- /CMake/FindSphinx.cmake: -------------------------------------------------------------------------------- 1 | #Look for an executable called sphinx-build 2 | find_program(SPHINX_EXECUTABLE 3 | NAMES sphinx-build 4 | DOC "Path to sphinx-build executable") 5 | 6 | include(FindPackageHandleStandardArgs) 7 | 8 | #Handle standard arguments to find_package like REQUIRED and QUIET 9 | find_package_handle_standard_args(Sphinx 10 | "Failed to find sphinx-build executable" 11 | SPHINX_EXECUTABLE) -------------------------------------------------------------------------------- /Core/BufferedStringStreamBuf.h: -------------------------------------------------------------------------------- 1 | #ifndef BUFFEREDSTRINGSTREAMBUF_H 2 | #define BUFFEREDSTRINGSTREAMBUF_H 3 | 4 | #ifdef _MSC_VER 5 | #include 6 | #include 7 | #include 8 | 9 | namespace platform 10 | { 11 | namespace core 12 | { 13 | class BufferedStringStreamBuf : public std::streambuf 14 | { 15 | public: 16 | BufferedStringStreamBuf(int bufferSize) 17 | { 18 | if (bufferSize) 19 | { 20 | char *ptr = new char[bufferSize]; 21 | setp(ptr, ptr + bufferSize); 22 | } 23 | else 24 | setp(0, 0); 25 | } 26 | virtual ~BufferedStringStreamBuf() 27 | { 28 | //sync(); 29 | delete[] pbase(); 30 | } 31 | virtual void writeString(const std::string &str) = 0; 32 | private: 33 | int overflow(int c) 34 | { 35 | sync(); 36 | 37 | if (c != EOF) 38 | { 39 | if (pbase() == epptr()) 40 | { 41 | std::string temp; 42 | temp += char(c); 43 | writeString(temp); 44 | } 45 | else 46 | sputc((char)c); 47 | } 48 | 49 | return 0; 50 | } 51 | 52 | int sync() 53 | { 54 | if (pbase() != pptr()) 55 | { 56 | int len = int(pptr() - pbase()); 57 | std::string temp(pbase(), len); 58 | writeString(temp); 59 | setp(pbase(), epptr()); 60 | } 61 | return 0; 62 | } 63 | }; 64 | } 65 | } 66 | #endif 67 | #endif -------------------------------------------------------------------------------- /Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Simul Software Ltd, All rights reserved. 2 | 3 | cmake_minimum_required(VERSION 3.12) 4 | # Grab the includes/source files. 5 | 6 | file(GLOB SOURCES "*.cpp" ) 7 | file(GLOB HEADERS "*.h" ) 8 | file(GLOB DOCS "*.rst" ) 9 | 10 | # Setup and build the static library. 11 | add_static_library( Core SOURCES ${SOURCES} ${HEADERS} ${DOCS} FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX}) 12 | 13 | if (SIMUL_DLL_SDK_LIBRARY) 14 | AddDLLCompileDefinitions( Core${STATIC_LINK_SUFFIX} ) 15 | endif() 16 | -------------------------------------------------------------------------------- /Core/CommandLine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "Platform/Core/Export.h" 5 | namespace platform 6 | { 7 | namespace core 8 | { 9 | typedef std::function OutputDelegate; 10 | extern PLATFORM_CORE_EXPORT bool RunCommandLine(const char *command_utf8, OutputDelegate outputDelegate=OutputDelegate()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Core/CommandLineParams.cpp: -------------------------------------------------------------------------------- 1 | #include "Platform/Core/CommandLineParams.h" 2 | using namespace platform; 3 | using namespace core; 4 | 5 | bool CommandLineParams::operator()(const char *s) 6 | { 7 | for(int i=0;i 5 | #include 6 | #endif 7 | #endif -------------------------------------------------------------------------------- /Core/DefaultFileLoader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/Core/FileLoader.h" 3 | #include "Platform/Core/Export.h" 4 | #if defined(__ANDROID__) 5 | #include "android/asset_manager.h" 6 | #endif 7 | namespace platform 8 | { 9 | namespace core 10 | { 11 | //! The default derived file loader 12 | class PLATFORM_CORE_EXPORT DefaultFileLoader:public platform::core::FileLoader 13 | { 14 | public: 15 | DefaultFileLoader(); 16 | ~DefaultFileLoader() = default; 17 | bool FileExists(const char *filename_utf8) const override; 18 | void AcquireFileContents(void*& pointer, unsigned int& bytes, const char* filename_utf8,bool open_as_text) override; 19 | uint64_t GetFileDate(const char* filename_utf8) const override; 20 | void ReleaseFileContents(void* pointer) override; 21 | bool Save(const void* pointer, unsigned int bytes, const char* filename_utf8,bool save_as_text) override; 22 | }; 23 | } 24 | } -------------------------------------------------------------------------------- /Core/DynamicLibrary.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Platform/Core/Export.h" 4 | 5 | namespace platform 6 | { 7 | namespace core 8 | { 9 | class PLATFORM_CORE_EXPORT DynamicLibrary 10 | { 11 | public: 12 | typedef void* Handle; 13 | 14 | public: 15 | DynamicLibrary() = default; 16 | DynamicLibrary(const char* libraryFilepath); 17 | DynamicLibrary(Handle handle); 18 | DynamicLibrary(DynamicLibrary&) = delete; 19 | DynamicLibrary(DynamicLibrary&& library) noexcept; 20 | ~DynamicLibrary(); 21 | 22 | operator const Handle&() const { return m_Handle; } 23 | operator Handle() { return m_Handle; } 24 | operator bool() { return m_Handle != nullptr; } 25 | 26 | private: 27 | Handle m_Handle = nullptr; 28 | }; 29 | } 30 | } -------------------------------------------------------------------------------- /Core/EnvironmentVariables.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_BASE_ENVIRONMENTVARIABLES_H 2 | #define SIMUL_BASE_ENVIRONMENTVARIABLES_H 3 | #include 4 | #include "Platform/Core/Export.h" 5 | namespace platform 6 | { 7 | namespace core 8 | { 9 | extern PLATFORM_CORE_EXPORT void SetUseExternalTextures(bool t); 10 | /// See SetUseExternalTextures. 11 | extern PLATFORM_CORE_EXPORT bool GetUseExternalTextures(); 12 | /// A class to manage environment variables. 13 | PLATFORM_CORE_EXPORT_CLASS EnvironmentVariables 14 | { 15 | public: 16 | //! Get the named environment variable (Windows only, other platforms return an empty string. 17 | static std::string GetSimulEnvironmentVariable(const std::string &name); 18 | //! Set the named environment variable for this process. 19 | static std::string SetSimulEnvironmentVariable(const std::string &name,const std::string &value); 20 | static std::string AppendSimulEnvironmentVariable(const std::string &name,const std::string &value); 21 | //! Get the current directory. 22 | static std::string GetWorkingDirectory(); 23 | //! Get the directory where the current exe is held. 24 | static std::string GetExecutableDirectory(); 25 | //! Set the current working directory. 26 | static void SetWorkingDirectory(std::string); 27 | }; 28 | } 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /Core/Export.h: -------------------------------------------------------------------------------- 1 | #ifndef PLATFORM_CORE_EXPORT_H 2 | #define PLATFORM_CORE_EXPORT_H 3 | 4 | #include "Platform/Core/DebugMemory.h" 5 | 6 | #if defined(_MSC_VER) 7 | // Microsoft 8 | #define SIMUL_EXPORT __declspec(dllexport) 9 | #define SIMUL_IMPORT __declspec(dllimport) 10 | #elif defined(__GNUC__) 11 | // GCC or Clang 12 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 13 | #define SIMUL_IMPORT 14 | #else 15 | // do nothing and hope for the best? 16 | #define SIMUL_EXPORT 17 | #define SIMUL_IMPORT 18 | #pragma warning Unknown dynamic link import/export semantics. 19 | #endif 20 | 21 | 22 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 23 | // In this lib: 24 | #if !defined(PLATFORM_CORE_DLL) 25 | // If we're building dll libraries but not in this library IMPORT the classes 26 | #define PLATFORM_CORE_EXPORT SIMUL_IMPORT 27 | #else 28 | // In ALL OTHER CASES we EXPORT the classes! 29 | #define PLATFORM_CORE_EXPORT SIMUL_EXPORT 30 | #endif 31 | #else 32 | #define PLATFORM_CORE_EXPORT 33 | #endif 34 | 35 | #ifdef _MSC_VER 36 | #define PLATFORM_CORE_EXPORT_FN PLATFORM_CORE_EXPORT __cdecl 37 | #else 38 | #define PLATFORM_CORE_EXPORT_FN PLATFORM_CORE_EXPORT 39 | #endif 40 | #define PLATFORM_CORE_EXPORT_CLASS class PLATFORM_CORE_EXPORT 41 | #define PLATFORM_CORE_EXPORT_STRUCT struct PLATFORM_CORE_EXPORT 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Core/MemoryUsageInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | namespace platform 3 | { 4 | namespace core 5 | { 6 | //! A virtual interface class for classes that can return how much memory they use. 7 | class MemoryUsageInterface 8 | { 9 | public: 10 | //! Get the amount of memory used by this class instance, in bytes. 11 | virtual unsigned GetMemoryUsage() const=0; 12 | }; 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Core/RelativeFilePath.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace platform 5 | { 6 | namespace core 7 | { 8 | extern std::string Abs2Rel(const std::string &pcAbsPath,const std::string &pcCurrDir); 9 | extern std::string Rel2Abs(const std::string &pcRelPath,const std::string &pcCurrDir); 10 | extern std::string Rel2Rel(const std::string &pcRelPath,const std::string &pcRelCurrDir); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Core/RuntimeError.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #include // for DebugBreak etc. Include this at the cpp-level, too much to add into a header. 3 | #endif 4 | #include "Platform/Core/RuntimeError.h" 5 | 6 | #if SIMUL_INTERNAL_CHECKS 7 | bool platform::core::SimulInternalChecks = true; 8 | #else 9 | bool platform::core::SimulInternalChecks = false; 10 | #endif 11 | 12 | namespace platform 13 | { 14 | namespace core 15 | { 16 | static bool debugBreaksEnabled = true; 17 | bool DebugBreaksEnabled() 18 | { 19 | return debugBreaksEnabled; 20 | } 21 | void EnableDebugBreaks(bool b) 22 | { 23 | debugBreaksEnabled = b; 24 | } 25 | bool IsDebuggerPresent() 26 | { 27 | #ifdef _MSC_VER 28 | return ::IsDebuggerPresent(); 29 | #else 30 | return true; 31 | #endif 32 | } 33 | void DebugBreak() 34 | { 35 | #ifdef _MSC_VER 36 | ::DebugBreak(); 37 | #else 38 | if (debugBreaksEnabled) 39 | { 40 | std::cout << "Break here.\n"; 41 | } 42 | #endif 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Core/StringToWString.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Platform/Core/Export.h" 4 | namespace platform 5 | { 6 | namespace core 7 | { 8 | extern PLATFORM_CORE_EXPORT std::wstring Utf8ToWString(const char *utf8); 9 | extern PLATFORM_CORE_EXPORT std::wstring Utf8ToWString(std::string utf8); 10 | extern PLATFORM_CORE_EXPORT std::string WStringToUtf8(const wchar_t *src_w); 11 | extern PLATFORM_CORE_EXPORT std::string WStringToUtf8(std::wstring wstr); 12 | extern PLATFORM_CORE_EXPORT std::wstring StringToWString(const std::string &text); 13 | extern PLATFORM_CORE_EXPORT std::string WStringToString(const std::wstring &text); 14 | extern PLATFORM_CORE_EXPORT void WStringToAsciiString(char *output,const std::wstring &text); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /CrossPlatform/AccelerationStructureManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/Export.h" 3 | #include "Platform/CrossPlatform/RenderPlatform.h" 4 | #include "Platform/CrossPlatform/DeviceContext.h" 5 | #include "Platform/CrossPlatform/TopLevelAccelerationStructure.h" 6 | 7 | #ifdef _MSC_VER 8 | #pragma warning(push) 9 | #pragma warning(disable : 4251) 10 | #endif 11 | 12 | namespace platform 13 | { 14 | namespace crossplatform 15 | { 16 | class SIMUL_CROSSPLATFORM_EXPORT AccelerationStructureManager 17 | { 18 | private: 19 | std::map TLASList; 20 | TopLevelAccelerationStructure* combinedTLAS; 21 | bool generatedCombinedAS; 22 | 23 | public: 24 | AccelerationStructureManager(RenderPlatform* r); 25 | ~AccelerationStructureManager(); 26 | void RestoreDeviceObjects(); 27 | void InvalidateDeviceObjects(); 28 | void GenerateCombinedAccelerationStructure(); 29 | void BuildCombinedAccelerationStructure(crossplatform::DeviceContext& deviceContext); 30 | TopLevelAccelerationStructure* GetCombinedAccelerationStructure(); 31 | void AddTopLevelAcclelerationStructure(TopLevelAccelerationStructure* newAS, int ID); 32 | void RemoveTopLevelAcceleratonStructure(int ID); 33 | }; 34 | } 35 | } 36 | 37 | #ifdef _MSC_VER 38 | #pragma warning(pop) 39 | #endif -------------------------------------------------------------------------------- /CrossPlatform/AmortizationStruct.cpp: -------------------------------------------------------------------------------- 1 | #include "AmortizationStruct.h" 2 | #include "Platform/Math/RandomNumberGenerator.h" 3 | #include 4 | using namespace platform; 5 | using namespace crossplatform; 6 | // Amortization: 0 = 1x1, 1=2x1, 2=1x2, 3=2x2, 4=3x2, 5=2x3, 6=3x3, etc. 7 | void AmortizationStruct::setAmortization(int a) 8 | { 9 | if(amortization==a) 10 | return; 11 | delete[] pattern; 12 | pattern=NULL; 13 | platform::math::RandomNumberGenerator rand; 14 | amortization=a; 15 | if(a<=1) 16 | return; 17 | uint3 xyz=scale(); 18 | 19 | int sz=xyz.x*xyz.y; 20 | std::vector src; 21 | src.reserve(sz); 22 | int n=0; 23 | for(unsigned i=0;i 5 | namespace platform 6 | { 7 | namespace crossplatform 8 | { 9 | 10 | /// A small structure for per-frame amortization of buffers. 11 | struct SIMUL_CROSSPLATFORM_EXPORT AmortizationStruct 12 | { 13 | private: 14 | int amortization; 15 | public: 16 | int framenumber; 17 | int framesPerIncrement; 18 | uint3 *pattern; 19 | int numOffsets; 20 | AmortizationStruct() 21 | :amortization(1) 22 | ,framenumber(0) 23 | ,framesPerIncrement(1) 24 | ,pattern(nullptr) 25 | ,numOffsets(1) 26 | { 27 | } 28 | ~AmortizationStruct() 29 | { 30 | delete[] pattern; 31 | } 32 | void setAmortization(int a); 33 | int getAmortization() const 34 | { 35 | return amortization; 36 | } 37 | /// Reset frame data, but not properties. 38 | void reset() 39 | { 40 | framenumber=0; 41 | } 42 | uint3 scale() const 43 | { 44 | uint3 sc(1,1,1); 45 | sc.x=1+amortization/2; 46 | sc.y=sc.x-(amortization+1)%2; 47 | sc.y=sc.y>0?sc.y:1; 48 | return sc; 49 | } 50 | uint3 offset() const 51 | { 52 | if(!pattern||amortization<=1) 53 | return uint3(0,0,0); 54 | int sub_frame = (int)fmod((framenumber - fmod(framenumber, numOffsets)) / numOffsets, numOffsets); 55 | return pattern[sub_frame]; 56 | } 57 | void validate() 58 | { 59 | framenumber++;// = newFramenumber; 60 | } 61 | }; 62 | } 63 | } -------------------------------------------------------------------------------- /CrossPlatform/BaseAccelerationStructure.cpp: -------------------------------------------------------------------------------- 1 | #include "BaseAccelerationStructure.h" 2 | using namespace platform; 3 | using namespace crossplatform; 4 | 5 | ///////////////////////////// 6 | //BaseAccelerationStructure// 7 | ///////////////////////////// 8 | 9 | BaseAccelerationStructure::BaseAccelerationStructure(crossplatform::RenderPlatform* r) 10 | { 11 | renderPlatform = r; 12 | } 13 | 14 | BaseAccelerationStructure::~BaseAccelerationStructure() 15 | { 16 | InvalidateDeviceObjects(); 17 | } 18 | 19 | void BaseAccelerationStructure::RestoreDeviceObjects() 20 | { 21 | } 22 | 23 | void BaseAccelerationStructure::InvalidateDeviceObjects() 24 | { 25 | } 26 | 27 | void BaseAccelerationStructure::BuildAccelerationStructureAtRuntime(DeviceContext& deviceContext) 28 | { 29 | } 30 | 31 | 32 | -------------------------------------------------------------------------------- /CrossPlatform/BaseAccelerationStructure.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/Export.h" 3 | #include "Platform/CrossPlatform/DeviceContext.h" 4 | #include "Platform/CrossPlatform/Shaders/raytracing_constants.sl" 5 | #include "Platform/CrossPlatform/PlatformStructuredBuffer.h" 6 | namespace platform 7 | { 8 | namespace crossplatform 9 | { 10 | class RenderPlatform; 11 | class Mesh; 12 | typedef StructuredBuffer Raytracing_AABB_SB; 13 | 14 | // Base class for Acceleration Structures 15 | class SIMUL_CROSSPLATFORM_EXPORT BaseAccelerationStructure 16 | { 17 | protected: 18 | crossplatform::RenderPlatform* renderPlatform = nullptr; 19 | bool initialized = false; 20 | 21 | protected: 22 | BaseAccelerationStructure(crossplatform::RenderPlatform* r); 23 | virtual ~BaseAccelerationStructure(); 24 | virtual void RestoreDeviceObjects(); 25 | virtual void InvalidateDeviceObjects(); 26 | 27 | virtual void BuildAccelerationStructureAtRuntime(DeviceContext& deviceContext); 28 | 29 | public: 30 | bool IsInitialized() const 31 | { 32 | return initialized; 33 | } 34 | }; 35 | } 36 | } -------------------------------------------------------------------------------- /CrossPlatform/BottomLevelAccelerationStructure.cpp: -------------------------------------------------------------------------------- 1 | #include "BottomLevelAccelerationStructure.h" 2 | 3 | using namespace platform; 4 | using namespace crossplatform; 5 | 6 | //////////////////////////////////// 7 | //BottomLevelAccelerationStructure// 8 | //////////////////////////////////// 9 | 10 | BottomLevelAccelerationStructure::BottomLevelAccelerationStructure(crossplatform::RenderPlatform* r) 11 | :BaseAccelerationStructure(r) 12 | { 13 | } 14 | 15 | BottomLevelAccelerationStructure::~BottomLevelAccelerationStructure() 16 | { 17 | } 18 | 19 | void BottomLevelAccelerationStructure::SetMesh(crossplatform::Mesh* mesh) 20 | { 21 | this->mesh = mesh; 22 | geometryType = GeometryType::TRIANGLE_MESH; 23 | } 24 | 25 | void BottomLevelAccelerationStructure::SetAABB(crossplatform::StructuredBuffer* aabbBuffer) 26 | { 27 | this->aabbBuffer = aabbBuffer; 28 | geometryType = GeometryType::AABB; 29 | } -------------------------------------------------------------------------------- /CrossPlatform/Buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "Buffer.h" 2 | #include 3 | using namespace platform; 4 | using namespace crossplatform; 5 | 6 | Buffer::Buffer():stride(0),count(0) 7 | { 8 | } 9 | 10 | void Buffer::SetName(const char* n) 11 | { 12 | name = n; 13 | } 14 | 15 | Buffer::~Buffer() 16 | { 17 | } 18 | 19 | void Buffer::EnsureVertexBuffer(crossplatform::RenderPlatform *renderPlatform,int num_vertices,const Layout *layout,const void *data,bool cpu_access,bool streamout_target) 20 | { 21 | if(data) 22 | { 23 | upload_data=std::make_shared>(num_vertices*layout->GetStructSize()); 24 | memcpy(upload_data->data(),data,upload_data->size()); 25 | } 26 | EnsureVertexBuffer(renderPlatform,num_vertices,layout->GetStructSize(),upload_data,cpu_access,streamout_target); 27 | } 28 | 29 | void Buffer::EnsureIndexBuffer(crossplatform::RenderPlatform *renderPlatform,int num_indices,int index_size_bytes,const void * data, bool cpu_access) 30 | { 31 | if(data) 32 | { 33 | upload_data=std::make_shared>(num_indices*index_size_bytes); 34 | memcpy(upload_data->data(),data,upload_data->size()); 35 | } 36 | EnsureIndexBuffer(renderPlatform,num_indices,index_size_bytes,upload_data,cpu_access); 37 | } -------------------------------------------------------------------------------- /CrossPlatform/CameraInterface.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/CrossPlatform/CameraInterface.cpp -------------------------------------------------------------------------------- /CrossPlatform/DemoOverlay.cpp: -------------------------------------------------------------------------------- 1 | #include "DemoOverlay.h" 2 | #include "Texture.h" 3 | #include "RenderPlatform.h" 4 | #include "DeviceContext.h" 5 | #include "Macros.h" 6 | using namespace platform; 7 | using namespace crossplatform; 8 | 9 | DemoOverlay::DemoOverlay() 10 | :texture1(NULL) 11 | ,texture2(NULL) 12 | ,renderPlatform(NULL) 13 | { 14 | } 15 | 16 | DemoOverlay::~DemoOverlay() 17 | { 18 | InvalidateDeviceObjects(); 19 | } 20 | 21 | 22 | void DemoOverlay::RestoreDeviceObjects(RenderPlatform *r) 23 | { 24 | renderPlatform =r; 25 | SAFE_DELETE(texture1); 26 | SAFE_DELETE(texture2); 27 | texture1=renderPlatform->CreateTexture("RealTimeTextOverlay.png"); 28 | texture1->width=544; 29 | texture1->length=120; 30 | texture2=renderPlatform->CreateTexture("TrueSkyTextOverlay.png"); 31 | texture2->width=444; 32 | texture2->length=120; 33 | } 34 | 35 | void DemoOverlay::InvalidateDeviceObjects() 36 | { 37 | SAFE_DELETE(texture1); 38 | SAFE_DELETE(texture2); 39 | renderPlatform=NULL; 40 | } 41 | 42 | void DemoOverlay::Render(GraphicsDeviceContext &deviceContext) 43 | { 44 | if(!texture2||!texture1) 45 | return; 46 | crossplatform::Viewport V=renderPlatform->GetViewport(deviceContext,0); 47 | renderPlatform->DrawTexture(deviceContext,8,8,texture2->width,texture2->length,texture2,1.f,true); 48 | renderPlatform->DrawTexture(deviceContext,V.w-8-texture1->width,V.h-8-texture1->length,texture1->width,texture1->length,texture1,1.f,true); 49 | } 50 | -------------------------------------------------------------------------------- /CrossPlatform/DemoOverlay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/Export.h" 3 | namespace platform 4 | { 5 | namespace crossplatform 6 | { 7 | class Texture; 8 | class RenderPlatform; 9 | struct GraphicsDeviceContext; 10 | class SIMUL_CROSSPLATFORM_EXPORT DemoOverlay 11 | { 12 | Texture *texture1,*texture2; 13 | RenderPlatform *renderPlatform; 14 | public: 15 | DemoOverlay(); 16 | ~DemoOverlay(); 17 | void RestoreDeviceObjects(RenderPlatform *renderPlatform); 18 | void InvalidateDeviceObjects(); 19 | void Render(GraphicsDeviceContext &deviceContext); 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /CrossPlatform/DisplaySurface.cpp: -------------------------------------------------------------------------------- 1 | #include "DisplaySurface.h" 2 | #include "RenderDelegater.h" 3 | using namespace platform; 4 | using namespace crossplatform; 5 | 6 | DisplaySurface::DisplaySurface(int view_id): 7 | renderer(nullptr), 8 | renderPlatform(nullptr), 9 | mViewId(view_id), 10 | mHwnd(0), 11 | mIsVSYNC(false) 12 | { 13 | memset(&viewport,0,sizeof(viewport)); 14 | } 15 | 16 | DisplaySurface::~DisplaySurface() 17 | { 18 | Release(); 19 | } 20 | 21 | void DisplaySurface::RestoreDeviceObjects(cp_hwnd handle, RenderPlatform* r,bool m_vsync_enabled,PixelFormat outFmt) 22 | { 23 | mHwnd=handle; 24 | renderPlatform=r; 25 | mIsVSYNC=m_vsync_enabled; 26 | } 27 | 28 | void DisplaySurface::ResizeSwapChain(DeviceContext &) 29 | { 30 | if(renderer) 31 | renderer->ResizeView(mViewId,viewport.w,viewport.h); 32 | } 33 | 34 | void DisplaySurface::SetRenderer(crossplatform::RenderDelegatorInterface *ci) 35 | { 36 | renderer =ci; 37 | } 38 | 39 | void DisplaySurface::Release() 40 | { 41 | if(renderer) 42 | renderer->RemoveView(mViewId); 43 | } 44 | -------------------------------------------------------------------------------- /CrossPlatform/Export.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_CROSSPLATFORM_EXPORT_H 2 | #define SIMUL_CROSSPLATFORM_EXPORT_H 3 | 4 | #include "Platform/Core/DebugMemory.h" 5 | 6 | #if defined(_MSC_VER) 7 | // Microsoft 8 | #define SIMUL_EXPORT __declspec(dllexport) 9 | #define SIMUL_IMPORT __declspec(dllimport) 10 | #elif defined(__GNUC__) 11 | // GCC or Clang 12 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 13 | #define SIMUL_IMPORT 14 | #else 15 | // do nothing and hope for the best? 16 | #define SIMUL_EXPORT 17 | #define SIMUL_IMPORT 18 | #pragma warning Unknown dynamic link import/export semantics. 19 | #endif 20 | 21 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 22 | // In this lib: 23 | #if !defined(SIMUL_CROSSPLATFORM_DLL) 24 | // If we're building dll libraries but not in this library IMPORT the classes 25 | #define SIMUL_CROSSPLATFORM_EXPORT SIMUL_IMPORT 26 | #else 27 | // In ALL OTHER CASES we EXPORT the classes! 28 | #define SIMUL_CROSSPLATFORM_EXPORT SIMUL_EXPORT 29 | #endif 30 | #else 31 | #define SIMUL_CROSSPLATFORM_EXPORT 32 | #endif 33 | 34 | #ifdef _MSC_VER 35 | #define SIMUL_CROSSPLATFORM_EXPORT_FN SIMUL_CROSSPLATFORM_EXPORT __cdecl 36 | #else 37 | #define SIMUL_CROSSPLATFORM_EXPORT_FN SIMUL_CROSSPLATFORM_EXPORT 38 | #endif 39 | #define SIMUL_CROSSPLATFORM_EXPORT_CLASS class SIMUL_CROSSPLATFORM_EXPORT 40 | #define SIMUL_CROSSPLATFORM_EXPORT_STRUCT struct SIMUL_CROSSPLATFORM_EXPORT 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /CrossPlatform/Frustum.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Platform/CrossPlatform/Export.h" 4 | #include "Platform/CrossPlatform/Shaders/CppSl.sl" 5 | 6 | #ifdef _MSC_VER 7 | #pragma warning(push) 8 | #pragma warning(disable : 4251) 9 | #endif 10 | 11 | namespace platform 12 | { 13 | namespace crossplatform 14 | { 15 | /// How to interpret the depth texture. 16 | enum DepthTextureStyle 17 | { 18 | /// Depth textures are interpreted as representing the z-output of the projection matrix transformation. 19 | PROJECTION 20 | /// Depth textures are interpreted as representing a linear distance in the z-direction from the near clipping plane. 21 | , 22 | DISTANCE_FROM_NEAR_PLANE 23 | }; 24 | /// A useful class to represent a view frustum. 25 | struct SIMUL_CROSSPLATFORM_EXPORT Frustum 26 | { 27 | tvector4 tanHalfFov; // xy= tangent of half-angle, zw=offset 28 | float nearZ, farZ; 29 | bool reverseDepth; 30 | }; 31 | } 32 | } 33 | 34 | #ifdef _MSC_VER 35 | #pragma warning(pop) 36 | #endif -------------------------------------------------------------------------------- /CrossPlatform/Light.cpp: -------------------------------------------------------------------------------- 1 | #include "Light.h" 2 | 3 | using namespace platform; 4 | using namespace crossplatform; 5 | 6 | crossplatform::Light::Light() : type(LightType::Sphere) 7 | { 8 | } 9 | 10 | crossplatform::Light::~Light() 11 | { 12 | } -------------------------------------------------------------------------------- /CrossPlatform/Light.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef _LIGHT_CACHE_H 4 | #define _LIGHT_CACHE_H 5 | 6 | #include 7 | #include "Platform/CrossPlatform/Export.h" 8 | #include "Platform/CrossPlatform/Mesh.h" 9 | #include "Platform/CrossPlatform/Material.h" 10 | 11 | //#define UNIT_LIB_DEFAULT_TYPE float 12 | //#include "Platform/External/units/units.h" 13 | //using meter_t = units::unit_t; 14 | //using watts_per_sqm_per_nm = units::compound_unit>, units::inverse>; 15 | //typedef tvector3 vec3_watts_per_sqm_per_nm; 16 | 17 | namespace platform 18 | { 19 | namespace crossplatform 20 | { 21 | enum LightType 22 | { 23 | Sphere, // There is no "point" light due to the degeneracy at the centre. Sphere is a better choice. 24 | Directional, // Uniform lighting in a parallel direction. 25 | Spot // Considered to be a sphere light with a limited cone in a given direction. 26 | }; 27 | //! A light component. 28 | class SIMUL_CROSSPLATFORM_EXPORT Light 29 | { 30 | public: 31 | Light(); 32 | virtual ~Light(); 33 | LightType type; 34 | //! 35 | //vec3_watts_per_sqm_per_nm irradiance; 36 | //! For a sphere light, the radius at which its irradiance applies over the surface. 37 | //meter_t radius; 38 | protected: 39 | }; 40 | } 41 | } 42 | #endif -------------------------------------------------------------------------------- /CrossPlatform/Macros.h: -------------------------------------------------------------------------------- 1 | #ifndef PLATFORM_CROSSPLATFORM_MACROS_H 2 | #define PLATFORM_CROSSPLATFORM_MACROS_H 3 | 4 | #ifndef SAFE_DELETE 5 | #define SAFE_DELETE(p) { if(p) { delete p; (p)=NULL; } } 6 | #endif 7 | #ifndef SAFE_DELETE_ARRAY 8 | #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] p; p=nullptr;} } 9 | #endif 10 | #ifndef SAFE_DESTROY 11 | #define SAFE_DESTROY(renderPlatform,ob) { if(renderPlatform) { renderPlatform->Destroy(ob); (ob)=NULL; } } 12 | #endif 13 | 14 | #endif -------------------------------------------------------------------------------- /CrossPlatform/Material.cpp: -------------------------------------------------------------------------------- 1 | #include "Platform/CrossPlatform/Material.h" 2 | #include "Platform/CrossPlatform/Effect.h" 3 | 4 | using namespace platform; 5 | using namespace crossplatform; 6 | 7 | Material::Material() 8 | { 9 | transparencyAlpha.value = 1.0f; 10 | } 11 | 12 | Material::Material(const char *n) 13 | : effect(nullptr),name(n) 14 | { 15 | transparencyAlpha.value = 1.0f; 16 | } 17 | 18 | Material::~Material() 19 | { 20 | InvalidateDeviceObjects(); 21 | } 22 | 23 | void Material::InvalidateDeviceObjects() 24 | { 25 | effect= nullptr; 26 | } 27 | 28 | void Material::SetEffect(const std::shared_ptr &e) 29 | { 30 | effect=e; 31 | } 32 | std::shared_ptr Material::GetEffect() 33 | { 34 | return effect; 35 | } 36 | void Material::Apply(crossplatform::DeviceContext &, crossplatform::PhysicalLightRenderData &) 37 | { 38 | } 39 | -------------------------------------------------------------------------------- /CrossPlatform/PixelFormat.cpp: -------------------------------------------------------------------------------- 1 | #include "PixelFormat.h" 2 | #include "Platform/Core/RuntimeError.h" 3 | #include 4 | #ifndef _MSC_VER 5 | #include 6 | #include 7 | #define _stricmp strcasecmp 8 | #endif 9 | using namespace platform; 10 | using namespace crossplatform; 11 | -------------------------------------------------------------------------------- /CrossPlatform/PlatformStructuredBuffer.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Platform/Core/RuntimeError.h" 3 | #include "Platform/CrossPlatform/PlatformStructuredBuffer.h" 4 | #include "Platform/CrossPlatform/Effect.h" 5 | 6 | using namespace platform; 7 | using namespace crossplatform; 8 | using namespace std; 9 | 10 | void PlatformStructuredBuffer::ApplyAsUnorderedAccessView(crossplatform::DeviceContext& deviceContext, const ShaderResource& shaderResource) 11 | { 12 | #if SIMUL_INTERNAL_CHECKS 13 | if (!(static_cast(shaderResource.shaderResourceType) & static_cast(platform::crossplatform::ShaderResourceType::RW))) 14 | SIMUL_INTERNAL_CERR << "ShaderResource Type incorrect" << std::endl; 15 | #endif 16 | if (shaderResource.slot >= 1000) 17 | deviceContext.contextState.applyRwStructuredBuffers[shaderResource.slot- 1000] = this; 18 | else if (shaderResource.slot >= 0) 19 | deviceContext.contextState.applyRwStructuredBuffers[shaderResource.slot] = this; 20 | } 21 | 22 | void PlatformStructuredBuffer::Apply(crossplatform::DeviceContext& deviceContext, const ShaderResource& shaderResource) 23 | { 24 | #if SIMUL_INTERNAL_CHECKS 25 | if (shaderResource.shaderResourceType == platform::crossplatform::ShaderResourceType::UNKNOWN) 26 | SIMUL_INTERNAL_CERR << "ShaderResource Type has not been set" << std::endl; 27 | #endif 28 | if (shaderResource.slot >= 0) 29 | deviceContext.contextState.applyStructuredBuffers[shaderResource.slot] = this; 30 | } -------------------------------------------------------------------------------- /CrossPlatform/RenderDelegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace platform 5 | { 6 | namespace crossplatform 7 | { 8 | struct GraphicsDeviceContext; 9 | 10 | // A simple render delegate, it will usually be a function partially bound with std::bind. 11 | typedef std::function RenderDelegate; 12 | typedef std::function StartupDeviceDelegate; 13 | typedef std::function ShutdownDeviceDelegate; 14 | } 15 | } -------------------------------------------------------------------------------- /CrossPlatform/RenderDocLoader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/Export.h" 3 | 4 | #ifdef _MSC_VER 5 | #pragma warning(push) 6 | #pragma warning(disable:4251) 7 | #endif 8 | 9 | namespace platform 10 | { 11 | namespace crossplatform 12 | { 13 | class RenderPlatform; 14 | class SIMUL_CROSSPLATFORM_EXPORT RenderDocLoader 15 | { 16 | public: 17 | static void Load(); 18 | static void Unload(); 19 | static void TriggerMultiFrameCapture(unsigned num); 20 | static void StartCapture(RenderPlatform* renderPlatform, void* windowHandlePtr); 21 | static void FinishCapture(); 22 | static bool IsLoaded(); 23 | }; 24 | } 25 | } 26 | 27 | #ifdef _MSC_VER 28 | #pragma warning(pop) 29 | #endif -------------------------------------------------------------------------------- /CrossPlatform/ShaderMode.h: -------------------------------------------------------------------------------- 1 | #ifndef SHADER_MODE_H 2 | #define SHADER_MODE_H 3 | 4 | namespace platform 5 | { 6 | namespace crossplatform 7 | { 8 | /// 9 | enum ShadingMode 10 | { 11 | SHADING_MODE_WIREFRAME, 12 | SHADING_MODE_SHADED, 13 | }; 14 | } 15 | } 16 | #endif -------------------------------------------------------------------------------- /CrossPlatform/Shaders/brdf.sl: -------------------------------------------------------------------------------- 1 | 2 | // GGX / Trowbridge-Reitz 3 | // [Walter et al. 2007, "Microfacet models for refraction through rough surfaces"] 4 | float D_GGX(float roughness, float NoH) 5 | { 6 | float a = roughness * roughness; 7 | float a2 = a * a; 8 | float d = (NoH * a2 - NoH) * NoH + 1; // 2 mad 9 | return a2 / (PI*d*d); // 4 mul, 1 rcp 10 | } -------------------------------------------------------------------------------- /CrossPlatform/Shaders/debug_constants.sl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Simul Software Ltd. All rights reserved. 2 | #ifndef DEBUG_CONSTANTS_SL 3 | #define DEBUG_CONSTANTS_SL 4 | 5 | SIMUL_CONSTANT_BUFFER(DebugConstants,7) 6 | uniform mat4 debugWorldViewProj; 7 | uniform vec4 rect; 8 | uniform vec4 multiplier; 9 | uniform vec4 quaternion; 10 | 11 | uniform uint latitudes; 12 | uniform uint longitudes; 13 | uniform float radius; 14 | uniform float sideview; 15 | 16 | uniform vec4 viewport; 17 | uniform vec4 debugColour; 18 | uniform vec4 debugDepthToLinFadeDistParams; 19 | 20 | uniform vec4 debugTanHalfFov; 21 | 22 | uniform uint4 texSize; // xy, z if needed, w=array size 23 | 24 | uniform uint2 queryPos; // for texture queries. 25 | uniform float debugGamma; 26 | uniform float debugDepth; 27 | 28 | uniform float displayMip; 29 | uniform uint displayLayer; 30 | uniform float debugTime; 31 | uniform float dc_pad1; 32 | 33 | uniform vec3 line_start; 34 | uniform float dc_pad2; 35 | 36 | uniform vec3 line_end; 37 | uniform float dc_pad3; 38 | 39 | uniform vec3 centre_position; 40 | uniform float dc_pad4; 41 | uniform vec3 x_axis; 42 | uniform float dc_pad5; 43 | uniform vec3 y_axis; 44 | uniform float dc_pad6; 45 | SIMUL_CONSTANT_BUFFER_END 46 | #endif 47 | -------------------------------------------------------------------------------- /CrossPlatform/Shaders/hdr_constants.sl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Simul Software Ltd. All rights reserved. 2 | #ifndef HDR_CONSTANTS_SL 3 | #define HDR_CONSTANTS_SL 4 | 5 | SIMUL_CONSTANT_BUFFER(HdrConstants,12) 6 | uniform mat4 worldToScatteringVolumeMatrix; 7 | uniform mat4 invViewProj; 8 | uniform vec4 viewportToTexRegionScaleBias; 9 | 10 | uniform vec2 offset; 11 | uniform float alpha; 12 | uniform float nearDist; // near threshold for discarding depths. 13 | 14 | uniform vec4 colour2; 15 | uniform vec4 tanHalfFov; // tanHalf and asymmetric offset 16 | 17 | uniform vec2 tanHalfFovUnused; 18 | uniform float exposure; 19 | uniform float gamma; 20 | 21 | uniform vec4 depthToLinFadeDistParams; 22 | uniform vec4 warpHmdWarpParam; 23 | 24 | uniform vec3 cubemapGroundColour; 25 | uniform float ccgcpad; 26 | 27 | uniform vec2 warpScreenCentre; 28 | uniform vec2 warpScale; 29 | 30 | uniform vec2 warpScaleIn; 31 | uniform vec2 padHdrConstants1; 32 | 33 | uniform uint2 hiResDimsX; 34 | uniform uint2 lowResDims; 35 | 36 | uniform uint2 fullResDims; 37 | uniform int numSamples; 38 | uniform float maxFadeDistanceKm; 39 | 40 | uniform vec3 infraredIntegrationFactors; 41 | uniform int randomSeed; 42 | 43 | uniform vec3 viewPos; 44 | uniform float fogExtinction; 45 | 46 | uniform vec3 fogColour; 47 | uniform float fogCeilingKm; 48 | 49 | uniform vec3 fogAmbient; 50 | uniform float anotherFloatXXX; 51 | SIMUL_CONSTANT_BUFFER_END 52 | 53 | #endif -------------------------------------------------------------------------------- /CrossPlatform/Shaders/image_constants.sl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Simul Software Ltd. All rights reserved. 2 | #ifndef IMAGE_CONSTANTS_SL 3 | #define IMAGE_CONSTANTS_SL 4 | 5 | SIMUL_CONSTANT_BUFFER(ImageConstants,13) 6 | uniform uint2 imageSize; 7 | uniform uint g_NumApproxPasses; 8 | uniform uint texelsPerThread; 9 | uniform float g_HalfBoxFilterWidth; // w/2 10 | uniform float g_FracHalfBoxFilterWidth; // frac(w/2+0.5) 11 | uniform float g_InvFracHalfBoxFilterWidth; // 1-frac(w/2+0.5) 12 | uniform float g_RcpBoxFilterWidth; // 1/w 13 | SIMUL_CONSTANT_BUFFER_END 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /CrossPlatform/Shaders/light_probe_constants.sl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Simul Software Ltd. All rights reserved. 2 | #ifndef LIGHT_PROBE_CONSTANTS_SL 3 | #define LIGHT_PROBE_CONSTANTS_SL 4 | 5 | SIMUL_CONSTANT_BUFFER(LightProbeConstants,9) 6 | uniform mat4 invViewProj; 7 | uniform int cubeFace; 8 | uniform int numSHBands; 9 | uniform int mipIndex; 10 | uniform int numMips; 11 | uniform float alpha; 12 | uniform float roughness; 13 | uniform vec2 padding; 14 | SIMUL_CONSTANT_BUFFER_END 15 | 16 | #endif -------------------------------------------------------------------------------- /CrossPlatform/Shaders/mip.sfx: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2024 Simul Software Ltd. All rights reserved. 2 | #include "shader_platform.sl" 3 | #include "common.sl" 4 | #include "render_states.sl" 5 | #include "sampler_states.sl" 6 | 7 | uniform Texture2D inputTexture; 8 | 9 | shader vec4 PS_Mip(posTexVertexOutput IN) : SV_TARGET 10 | { 11 | vec2 texc =IN.texCoords.xy; 12 | vec4 res =texture_wrap_lod(inputTexture,texc.xy,0); 13 | //res.rg=.5*texc.xy; 14 | return res; 15 | } 16 | 17 | VertexShader vs_simplefullscreen_5_0=CompileShader(vs_5_0,VS_SimpleFullscreen()); 18 | 19 | technique mip 20 | { 21 | pass mip 22 | { 23 | SetRasterizerState( RenderNoCull ); 24 | SetTopology( TriangleList ); 25 | SetDepthStencilState( DisableDepth, 0 ); 26 | SetBlendState(DontBlend,vec4( 0.0, 0.0, 0.0, 0.0), 0xFFFFFFFF ); 27 | SetGeometryShader(NULL); 28 | SetVertexShader(vs_simplefullscreen_5_0); 29 | SetPixelShader(CompileShader(ps_5_0,PS_Mip())); 30 | } 31 | } -------------------------------------------------------------------------------- /CrossPlatform/Shaders/sphere_constants.sl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Simul Software Ltd. All rights reserved. 2 | #ifndef SPHERE_CONSTANTS_SL 3 | #define SPHERE_CONSTANTS_SL 4 | 5 | SIMUL_CONSTANT_BUFFER(SphereConstants,7) 6 | uniform mat4 debugWorldViewProj; 7 | uniform mat4 invWorldViewProj; 8 | uniform vec4 rect; 9 | uniform vec4 multiplier; 10 | uniform vec4 quaternion; 11 | uniform vec4 quaternion2; 12 | 13 | uniform uint latitudes; 14 | uniform uint longitudes; 15 | uniform float radius; 16 | uniform float sideview; 17 | 18 | uniform vec4 debugColour; 19 | 20 | uniform vec3 debugViewDir; 21 | uniform int slices; 22 | 23 | uniform vec3 sphereCamPos; 24 | uniform uint loopSteps; 25 | uniform vec3 texcOffset; 26 | uniform uint pad324; 27 | 28 | uniform vec3 position; 29 | SIMUL_CONSTANT_BUFFER_END 30 | #endif 31 | -------------------------------------------------------------------------------- /CrossPlatform/Shaders/spherical_harmonics_constants.sl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Simul Software Ltd. All rights reserved. 2 | #ifndef SPHERICAL_HARMONICS_CONSTANTS_SL 3 | #define SPHERICAL_HARMONICS_CONSTANTS_SL 4 | 5 | #ifndef MAX_SH_BANDS 6 | #define MAX_SH_BANDS 4 7 | #endif 8 | #ifndef MAX_SH_SAMPLES 9 | #define MAX_SH_SAMPLES 16 10 | #endif 11 | #ifndef MAX_SH_COEFFICIENTS 12 | #define MAX_SH_COEFFICIENTS 16 13 | #endif 14 | 15 | SIMUL_CONSTANT_BUFFER(SphericalHarmonicsConstants,10) 16 | uniform int num_bands; // The range of the parameter m is from 0 to num_bands-1 17 | uniform int sqrtJitterSamples; 18 | uniform int numJitterSamples; 19 | uniform float invNumJitterSamples; 20 | uniform uint3 lookupOffset; // 2D offset and cube face. 21 | uniform int randomSeed; 22 | uniform uint2 lookupSize; // 2D size 23 | uniform uint numCoefficients; 24 | uniform int padshc; 25 | SIMUL_CONSTANT_BUFFER_END 26 | 27 | struct SphericalHarmonicsSample 28 | { 29 | vec3 dir; 30 | float dummy3; 31 | vec4 lookup; 32 | float coeff[MAX_SH_BANDS*MAX_SH_BANDS]; 33 | }; 34 | 35 | #endif -------------------------------------------------------------------------------- /CrossPlatform/Shaders/text_constants.sl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Simul Software Ltd. All rights reserved. 2 | #ifndef TEXT_CONSTANTS_SL 3 | #define TEXT_CONSTANTS_SL 4 | 5 | SIMUL_CONSTANT_BUFFER(TextConstants,8) 6 | vec4 colour; 7 | vec4 background; 8 | vec3 textConstantsPad0; 9 | uint numChars; 10 | vec4 background_rect[4]; //Supports 4 hardware views for Multiview. 11 | SIMUL_CONSTANT_BUFFER_END 12 | 13 | struct FontChar 14 | { 15 | vec4 text_rect; 16 | vec4 texc; 17 | }; 18 | #endif -------------------------------------------------------------------------------- /CrossPlatform/TopLevelAccelerationStructure.cpp: -------------------------------------------------------------------------------- 1 | #include "TopLevelAccelerationStructure.h" 2 | 3 | #include 4 | 5 | using namespace platform; 6 | using namespace crossplatform; 7 | 8 | ///////////////////////////////// 9 | //TopLevelAccelerationStructure// 10 | ///////////////////////////////// 11 | 12 | static std::atomic IDCount(0); 13 | 14 | TopLevelAccelerationStructure::TopLevelAccelerationStructure(crossplatform::RenderPlatform* r) 15 | :BaseAccelerationStructure(r) 16 | { 17 | ID = IDCount; 18 | IDCount++; 19 | } 20 | 21 | TopLevelAccelerationStructure::~TopLevelAccelerationStructure() 22 | { 23 | } 24 | 25 | void TopLevelAccelerationStructure::SetInstanceDescs(const InstanceDescs& instanceDescs) 26 | { 27 | this->_instanceDescs = instanceDescs; 28 | initialized = false; 29 | } 30 | 31 | InstanceDescs* TopLevelAccelerationStructure::GetInstanceDescs() 32 | { 33 | return &_instanceDescs; 34 | } -------------------------------------------------------------------------------- /CrossPlatform/Topology.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | namespace platform 3 | { 4 | namespace crossplatform 5 | { 6 | //! A cross-platform equivalent to the OpenGL and DirectX vertex topology formats 7 | enum class Topology 8 | { 9 | UNDEFINED 10 | ,POINTLIST 11 | ,LINELIST 12 | ,LINESTRIP 13 | ,TRIANGLELIST 14 | ,TRIANGLESTRIP 15 | ,LINELIST_ADJ 16 | ,LINESTRIP_ADJ 17 | ,TRIANGLELIST_ADJ 18 | ,TRIANGLESTRIP_ADJ 19 | }; 20 | enum StandardRenderState 21 | { 22 | STANDARD_OPAQUE_BLENDING 23 | ,STANDARD_ALPHA_BLENDING 24 | ,STANDARD_DEPTH_GREATER_EQUAL 25 | ,STANDARD_DEPTH_LESS_EQUAL 26 | ,STANDARD_DEPTH_DISABLE 27 | ,STANDARD_TEST_DEPTH_GREATER_EQUAL 28 | ,STANDARD_TEST_DEPTH_LESS_EQUAL 29 | ,STANDARD_FRONTFACE_COUNTERCLOCKWISE 30 | ,STANDARD_FRONTFACE_CLOCKWISE 31 | ,STANDARD_DOUBLE_SIDED 32 | }; 33 | enum QueryType 34 | { 35 | QUERY_UNKNOWN 36 | ,QUERY_OCCLUSION // Like GL_SAMPLES_PASSED 37 | ,QUERY_TIMESTAMP // like GL_TIMESTAMP 38 | ,QUERY_TIMESTAMP_DISJOINT 39 | }; 40 | enum MeshType 41 | { 42 | NO_MESH_TYPE 43 | ,CUBE_MESH 44 | ,SPHERE_MESH 45 | }; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /CrossPlatform/VideoBuffer.cpp: -------------------------------------------------------------------------------- 1 | #include "VideoBuffer.h" 2 | 3 | using namespace platform; 4 | using namespace crossplatform; 5 | 6 | VideoBuffer::VideoBuffer() 7 | : mBufferType(VideoBufferType::UNKNOWN) 8 | , mHasData(false) 9 | { 10 | } 11 | 12 | 13 | VideoBuffer::~VideoBuffer() 14 | { 15 | } 16 | 17 | -------------------------------------------------------------------------------- /CrossPlatform/WinPixGpuCapturerLoader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/Export.h" 3 | 4 | #ifdef _MSC_VER 5 | #pragma warning(push) 6 | #pragma warning(disable:4251) 7 | #endif 8 | 9 | namespace platform 10 | { 11 | namespace crossplatform 12 | { 13 | class RenderPlatform; 14 | class SIMUL_CROSSPLATFORM_EXPORT WinPixGpuCapturerLoader 15 | { 16 | public: 17 | static void Load(); 18 | static void Unload(); 19 | static void TriggerMultiFrameCapture(unsigned num); 20 | static void StartCapture(RenderPlatform* renderPlatform, void* windowHandlePtr); 21 | static void FinishCapture(); 22 | static bool IsLoaded(); 23 | }; 24 | } 25 | } 26 | 27 | #ifdef _MSC_VER 28 | #pragma warning(pop) 29 | #endif -------------------------------------------------------------------------------- /DirectX11/Buffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/DirectX11/Export.h" 3 | #include "Platform/CrossPlatform/Buffer.h" 4 | #include 5 | #include 6 | #include "DirectXHeader.h" 7 | 8 | #pragma warning(disable:4251) 9 | 10 | namespace platform 11 | { 12 | namespace dx11 13 | { 14 | class SIMUL_DIRECTX11_EXPORT Buffer:public platform::crossplatform::Buffer 15 | { 16 | ID3D11Buffer *d3d11Buffer; 17 | D3D11_MAPPED_SUBRESOURCE mapped; 18 | public: 19 | Buffer(); 20 | ~Buffer(); 21 | void InvalidateDeviceObjects(); 22 | ID3D11Buffer *AsD3D11Buffer(); 23 | ID3D11Buffer *const AsD3D11Buffer() const; 24 | GLuint AsGLuint(); 25 | void EnsureVertexBuffer(crossplatform::RenderPlatform *renderPlatform,int num_vertices,int structSize,std::shared_ptr> data,bool cpu_access=false,bool streamout_target=false) override; 26 | void EnsureIndexBuffer(crossplatform::RenderPlatform *renderPlatform,int num_indices,int index_size_bytes,std::shared_ptr> data,bool cpu_access=false) override; 27 | void *Map(crossplatform::DeviceContext &deviceContext) override; 28 | void Unmap(crossplatform::DeviceContext &deviceContext) override; 29 | }; 30 | } 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /DirectX11/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | file(GLOB CMAKE "*.cmake") 4 | 5 | file(GLOB SOURCES "*.cpp") 6 | 7 | file(GLOB HEADERS "*.h") 8 | 9 | file(GLOB SHADERS 10 | "${SIMUL_PLATFORM_DIR}/Shaders/Sfx/*.sfx" 11 | ) 12 | 13 | file(GLOB SHADER_INCLUDES 14 | "${SIMUL_PLATFORM_DIR}/DirectX11/Sfx/*.sl" 15 | ) 16 | file(GLOB SHADER_DEFS 17 | "${SIMUL_PLATFORM_DIR}/DirectX11/Sfx/*.json" 18 | ) 19 | 20 | source_group("Shaders" FILES ${SHADERS} ) 21 | source_group("Shader Includes" FILES ${SHADER_INCLUDES} ) 22 | 23 | add_static_library( SimulDirectX11 SOURCES ${SOURCES} ${HEADERS} ${SHADERS} ${SHADER_INCLUDES} ${SHADER_DEFS} DEFINITIONS SIMUL_DIRECTX11_DLL=1 SIMUL_WIN8_SDK=1 PLATFORM_D3D11_SFX=1 PLATFORM_TYPED_UAV_FORMATS=1 PROPERTIES FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX} 24 | INCLUDES "${SIMUL_PLATFORM_DIR}/External/DirectX/DirectXTex/DirectXTex" PUBLICINCLUDES "${SIMUL_PLATFORM_DIR}/DirectX11" ) 25 | 26 | if (SIMUL_DLL_SDK_LIBRARY) 27 | AddDLLCompileDefinitions( SimulDirectX11${STATIC_LINK_SUFFIX} ) 28 | endif() 29 | 30 | if(SIMUL_SOURCE_BUILD) 31 | set( JSON_FILE "${SIMUL_PLATFORM_DIR}/DirectX11/Sfx/DirectX11.json" ) 32 | 33 | endif() -------------------------------------------------------------------------------- /DirectX11/DX11Exception.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DX11Exception.h" 3 | 4 | #ifdef SIMUL_WIN8_SDK 5 | #include 6 | extern const char *DXGetErrorStringA(HRESULT hr) 7 | { 8 | static std::string str; 9 | char *lpBuf=nullptr; 10 | DWORD res= FormatMessageA( 11 | #ifndef _XBOX_ONE 12 | FORMAT_MESSAGE_ALLOCATE_BUFFER | 13 | #endif 14 | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 15 | NULL, hr, 0, (LPSTR)&lpBuf, 0, NULL); 16 | if(lpBuf) 17 | str=lpBuf; 18 | #ifndef _XBOX_ONE 19 | LocalFree(lpBuf); 20 | #endif 21 | return str.c_str(); 22 | } 23 | extern const char *DXGetErrorDescriptionA(HRESULT hr) 24 | { 25 | static std::string str; 26 | char *lpBuf = nullptr; 27 | DWORD res= FormatMessageA( 28 | #ifndef _XBOX_ONE 29 | FORMAT_MESSAGE_ALLOCATE_BUFFER | 30 | #endif 31 | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 32 | NULL, hr, 0, (LPSTR)&lpBuf, 0, NULL); 33 | if(lpBuf) 34 | str=lpBuf; 35 | #ifndef _XBOX_ONE 36 | LocalFree(lpBuf); 37 | #endif 38 | return str.c_str(); 39 | } 40 | #endif -------------------------------------------------------------------------------- /DirectX11/DX11Exception.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "DirectXHeader.h" 4 | #ifndef SIMUL_WIN8_SDK 5 | #include 6 | #include 7 | #else 8 | #include 9 | //! Name of an error 10 | extern const char *DXGetErrorStringA(HRESULT hr); 11 | //! Text of an error 12 | extern const char *DXGetErrorDescriptionA(HRESULT hr); 13 | #endif 14 | #include 15 | 16 | // Exception thrown when a DirectX Function fails 17 | class DX11Exception : public std::exception 18 | { 19 | 20 | public: 21 | 22 | // DX11Exception a string for the specified HRESULT error code 23 | DX11Exception (HRESULT hresult) 24 | : errorCode(hresult) 25 | { 26 | std::string errorString = DXGetErrorDescriptionA(hresult); 27 | 28 | std::string message = "DirectX11 Error: "; 29 | message += errorString; 30 | } 31 | 32 | DX11Exception (HRESULT hresult, LPCSTR errorMsg) 33 | : errorCode(hresult) 34 | { 35 | std::string message = "DirectX11 Error: "; 36 | message += errorMsg; 37 | } 38 | 39 | // Retrieve the error code 40 | HRESULT GetErrorCode () const throw () 41 | { 42 | return errorCode; 43 | } 44 | 45 | protected: 46 | 47 | HRESULT errorCode; // The DX error code 48 | }; -------------------------------------------------------------------------------- /DirectX11/DirectXHeader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | #ifdef _XBOX_ONE 5 | #include 6 | #define SIMUL_WIN8_SDK 7 | #define MONOLITHIC 1 8 | #else 9 | #include 10 | #endif 11 | 12 | #define SIMUL_D3D11_MAP_FLAGS (((dx11::RenderPlatform*)deviceContext.renderPlatform)->GetMapFlags()) 13 | 14 | #ifdef _XBOX_ONE 15 | #define SIMUL_D3D11_MAP_USAGE_DEFAULT_PLACEMENT 1 16 | #define SIMUL_D3D11_MAP_PLACEMENT_BUFFERS_CACHE_LINE_ALIGNMENT_PACK 1 17 | #define SIMUL_D3D11_BUFFER_CACHE_LINE_SIZE 0x40 18 | #else 19 | #define SIMUL_D3D11_MAP_USAGE_DEFAULT_PLACEMENT 0 20 | #endif 21 | 22 | #ifndef _XBOX_ONE 23 | struct ID3DUserDefinedAnnotation; 24 | #endif 25 | -------------------------------------------------------------------------------- /DirectX11/Export.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_DIRECTX11_EXPORT_H 2 | #define SIMUL_DIRECTX11_EXPORT_H 3 | 4 | #include "Platform/Core/DebugMemory.h" 5 | 6 | #if defined(_MSC_VER) 7 | // Microsoft 8 | #define SIMUL_EXPORT __declspec(dllexport) 9 | #define SIMUL_IMPORT __declspec(dllimport) 10 | #elif defined(__GNUC__) 11 | // GCC or Clang 12 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 13 | #define SIMUL_IMPORT 14 | #else 15 | // do nothing and hope for the best? 16 | #define SIMUL_EXPORT 17 | #define SIMUL_IMPORT 18 | #pragma warning Unknown dynamic link import/export semantics. 19 | #endif 20 | 21 | 22 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 23 | // In this lib: 24 | #if !defined(SIMUL_DIRECTX11_DLL) 25 | // If we're building dll libraries but not in this library IMPORT the classes 26 | #define SIMUL_DIRECTX11_EXPORT SIMUL_IMPORT 27 | #else 28 | // In ALL OTHER CASES we EXPORT the classes! 29 | #define SIMUL_DIRECTX11_EXPORT SIMUL_EXPORT 30 | #endif 31 | #else 32 | #define SIMUL_DIRECTX11_EXPORT 33 | #endif 34 | 35 | #ifdef _MSC_VER 36 | #define SIMUL_DIRECTX11_EXPORT_FN SIMUL_DIRECTX11_EXPORT __cdecl 37 | #else 38 | #define SIMUL_DIRECTX11_EXPORT_FN SIMUL_DIRECTX11_EXPORT 39 | #endif 40 | 41 | #define SIMUL_DIRECTX11_EXPORT_CLASS class SIMUL_DIRECTX11_EXPORT 42 | #define SIMUL_DIRECTX11_EXPORT_STRUCT struct SIMUL_DIRECTX11_EXPORT 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /DirectX11/Layout.cpp: -------------------------------------------------------------------------------- 1 | #include "Layout.h" 2 | #include "MacrosDX1x.h" 3 | #include "DirectXHeader.h" 4 | #include "Platform/CrossPlatform/DeviceContext.h" 5 | #include "Platform/Core/RuntimeError.h" 6 | using namespace platform; 7 | using namespace dx11; 8 | 9 | Layout::Layout() 10 | :d3d11InputLayout(0) 11 | { 12 | } 13 | 14 | Layout::~Layout() 15 | { 16 | InvalidateDeviceObjects(); 17 | } 18 | 19 | void Layout::InvalidateDeviceObjects() 20 | { 21 | SAFE_RELEASE(d3d11InputLayout); 22 | } 23 | 24 | void Layout::Apply(crossplatform::DeviceContext &deviceContext) 25 | { 26 | if(apply_count!=0) 27 | SIMUL_BREAK("Layout::Apply without a corresponding Unapply!"); 28 | apply_count++; 29 | deviceContext.asD3D11DeviceContext()->IASetInputLayout(AsD3D11InputLayout()); 30 | } 31 | 32 | void Layout::Unapply(crossplatform::DeviceContext &) 33 | { 34 | if(apply_count<=0) 35 | SIMUL_BREAK("Layout::Unapply without a corresponding Apply!") 36 | else if(apply_count>1) 37 | SIMUL_BREAK("Layout::Apply has been called too many times!") 38 | apply_count--; 39 | } -------------------------------------------------------------------------------- /DirectX11/Layout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Export.h" 3 | #include "Platform/CrossPlatform/Layout.h" 4 | //! Forward declaration for this, means we needn't include the dx11 headers yet. 5 | enum D3D_PRIMITIVE_TOPOLOGY; 6 | namespace platform 7 | { 8 | namespace dx11 9 | { 10 | class Layout:public crossplatform::Layout 11 | { 12 | //ID3D11InputLayout* previousInputLayout; 13 | //D3D_PRIMITIVE_TOPOLOGY topology; 14 | //D3D_PRIMITIVE_TOPOLOGY previousTopology; 15 | public: 16 | ID3D11InputLayout *d3d11InputLayout; 17 | Layout(); 18 | virtual ~Layout(); 19 | void InvalidateDeviceObjects(); 20 | ID3D11InputLayout *AsD3D11InputLayout() override 21 | { 22 | return d3d11InputLayout; 23 | } 24 | ID3D11InputLayout * const AsD3D11InputLayout() const override 25 | { 26 | return d3d11InputLayout; 27 | } 28 | void Apply(crossplatform::DeviceContext &deviceContext); 29 | void Unapply(crossplatform::DeviceContext &deviceContext); 30 | }; 31 | } 32 | } -------------------------------------------------------------------------------- /DirectX11/Light.cpp: -------------------------------------------------------------------------------- 1 | #include "Light.h" 2 | 3 | using namespace platform; 4 | using namespace dx11; 5 | 6 | namespace 7 | { 8 | 9 | const float DEFAULT_LIGHT_POSITION[] ={0.0f, 0.0f, 0.0f, 1.0f}; 10 | const float DEFAULT_DIRECTION_LIGHT_POSITION[] ={0.0f, 0.0f, 1.0f, 0.0f}; 11 | const float DEFAULT_SPOT_LIGHT_DIRECTION[] ={0.0f, 0.0f, -1.0f}; 12 | const float DEFAULT_LIGHT_COLOR[] ={1.0f, 1.0f, 1.0f, 1.0f}; 13 | const float DEFAULT_LIGHT_SPOT_CUTOFF =180.0f; 14 | } 15 | 16 | 17 | dx11::Light::Light() 18 | { 19 | } 20 | 21 | dx11::Light::~Light() 22 | { 23 | } 24 | 25 | void dx11::Light::UpdateLight(const double *,float ,const float[4]) const 26 | { 27 | } -------------------------------------------------------------------------------- /DirectX11/Light.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef DIRECTX11_LIGHT_H 4 | #define DIRECTX11_LIGHT_H 5 | 6 | #include "Export.h" 7 | #include "Material.h" 8 | #include "Platform/CrossPlatform/Light.h" 9 | 10 | namespace platform 11 | { 12 | namespace dx11 13 | { 14 | class SIMUL_DIRECTX11_EXPORT Light:public crossplatform::Light 15 | { 16 | public: 17 | Light(); 18 | ~Light(); 19 | void UpdateLight(const double *mat,float lConeAngle,const float lLightColor[4]) const; 20 | protected: 21 | //GLuint mLightIndex; 22 | }; 23 | } 24 | } 25 | #endif -------------------------------------------------------------------------------- /DirectX11/Material.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/DirectX11/Material.cpp -------------------------------------------------------------------------------- /DirectX11/Material.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/DirectX11/Material.h -------------------------------------------------------------------------------- /DirectX11/Mesh.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/DirectX11/Mesh.cpp -------------------------------------------------------------------------------- /DirectX11/Mesh.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/DirectX11/Mesh.h -------------------------------------------------------------------------------- /DirectX11/ResourcesDx1x.h: -------------------------------------------------------------------------------- 1 | 2 | extern unsigned GetResourceId(const char *filename); 3 | extern const wchar_t *GetResourceText(const char *filename); -------------------------------------------------------------------------------- /DirectX11/SaveTextureDX1x.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DirectXHeader.h" 4 | #ifndef SIMUL_WIN8_SDK 5 | #include 6 | #else 7 | //! Forward declaration for this, means we needn't include the dx11 headers yet. 8 | typedef enum D3DX11_IMAGE_FILE_FORMAT 9 | { 10 | D3DX11_IFF_BMP = 0, 11 | D3DX11_IFF_JPG = 1, 12 | D3DX11_IFF_PNG = 3, 13 | D3DX11_IFF_DDS = 4, 14 | D3DX11_IFF_TIFF = 10, 15 | D3DX11_IFF_GIF = 11, 16 | D3DX11_IFF_WMP = 12, 17 | D3DX11_IFF_FORCE_DWORD = 0x7fffffff 18 | 19 | } D3DX11_IMAGE_FILE_FORMAT; 20 | #endif 21 | #include "Platform/DirectX11/Export.h" 22 | 23 | namespace platform 24 | { 25 | namespace dx11 26 | { 27 | //extern void SaveScreenshot(ID3D11Device* pd3dDevice,const char *txt); 28 | extern SIMUL_DIRECTX11_EXPORT void SaveTexture(ID3D11Device *pd3dDevice,ID3D11Texture2D *texture,const char *filename_utf8); 29 | } 30 | } -------------------------------------------------------------------------------- /DirectX11/SfxBuildRule.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | Midl 6 | CustomBuild 7 | 8 | 9 | _SelectedFiles;$(PsfxDependsOn) 11 | 12 | 13 | 14 | defaultincludepath 15 | $(DXSDK_DIR)\Utilities\bin\x64\fxc.exe [inputs] [IncludePaths] [OutputPath] 16 | %(Filename).fxo 17 | 18 | 19 | -------------------------------------------------------------------------------- /DirectX11/SimulUseDXSDK.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | >$(DXSDK_DIR)\Utilities\bin\x64\fxc.exe "%(FullPath)" 9 | fxc 10 | 11 | 12 | $(SIMUL)\Platform\DirectX11\shaderbin 13 | $(SIMUL)\Platform\CrossPlatform\SL;$(SIMUL)\Platform\DirectX11\HLSL 14 | 15 | 16 | $(SIMUL)/External/DirectX/Effects11_DXSDK/Inc/;$(DXSDK_DIR)\Samples\C++;$(DXSDK_DIR)\Samples\C++\DXUT11\core;$(DXSDK_DIR)\Samples\C++\DXUT11\optional;$(DXSDK_DIR)\Include;$(DXSDK_DIR)\Samples\C++\Effects11;$(DXSDK_DIR)\Samples\C++\Effects11\Inc;%(AdditionalIncludeDirectories) 17 | 18 | 19 | ;$(DXSDK_DIR)/Lib/$(PlatformTarget);%(AdditionalLibraryDirectories) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DirectX11/SimulUseWin8SDK.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | $(WindowsSDK_ExecutablePath_x64)\..\$(TargetPlatformVersion);$(ExecutablePath) 7 | 8 | 9 | 10 | SIMUL_WIN8_SDK;%(PreprocessorDefinitions) 11 | $(DurangoXDK)/PC/include;$(SIMUL)/External/DirectX/Effects11_Win8SDK/Inc/;$(SIMUL)\External\DirectX\DirectXTex\DirectXTex;$(SIMUL)\External\DirectX\Effects11\include;%(AdditionalIncludeDirectories) 12 | 13 | 14 | $(DurangoXDK)/PC/lib/amd64;$(WindowsSDK80Path)\lib\win8\um\$(PlatformShortName);%(AdditionalLibraryDirectories) 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /DirectX11/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by DirectX11.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /DirectX12/BaseAccelerationStructure.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/DirectX12/BaseAccelerationStructure.cpp -------------------------------------------------------------------------------- /DirectX12/BaseAccelerationStructure.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/DirectX12/BaseAccelerationStructure.h -------------------------------------------------------------------------------- /DirectX12/BottomLevelAccelerationStructure.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Platform/CrossPlatform/BottomLevelAccelerationStructure.h" 4 | #include "Platform/CrossPlatform/RenderPlatform.h" 5 | 6 | #if defined(_GAMING_XBOX_XBOXONE) 7 | #define PLATFORM_SUPPORT_D3D12_RAYTRACING 0 8 | #endif 9 | 10 | namespace platform 11 | { 12 | namespace dx12 13 | { 14 | class BottomLevelAccelerationStructure final : public crossplatform::BottomLevelAccelerationStructure 15 | { 16 | public: 17 | BottomLevelAccelerationStructure(crossplatform::RenderPlatform* r); 18 | ~BottomLevelAccelerationStructure(); 19 | void RestoreDeviceObjects() override; 20 | void InvalidateDeviceObjects() override; 21 | ID3D12Resource* AsD3D12ShaderResource(crossplatform::DeviceContext& deviceContext); 22 | void BuildAccelerationStructureAtRuntime(crossplatform::DeviceContext& deviceContext) override; 23 | 24 | protected: 25 | #if PLATFORM_SUPPORT_D3D12_RAYTRACING 26 | D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS inputs; 27 | D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO prebuildInfo; 28 | 29 | D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC buildDesc; 30 | #endif 31 | 32 | ID3D12Resource* accelerationStructure = nullptr; 33 | ID3D12Resource* scratchResource = nullptr; 34 | ID3D12Resource* transforms = nullptr; 35 | }; 36 | } 37 | } -------------------------------------------------------------------------------- /DirectX12/Export.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_DIRECTX12_EXPORT_H 2 | #define SIMUL_DIRECTX12_EXPORT_H 3 | 4 | #include "Platform/Core/DebugMemory.h" 5 | 6 | #if defined(_MSC_VER) 7 | // Microsoft 8 | #define SIMUL_EXPORT __declspec(dllexport) 9 | #define SIMUL_IMPORT __declspec(dllimport) 10 | #elif defined(__GNUC__) 11 | // GCC or Clang 12 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 13 | #define SIMUL_IMPORT 14 | #else 15 | // do nothing and hope for the best? 16 | #define SIMUL_EXPORT 17 | #define SIMUL_IMPORT 18 | #pragma warning Unknown dynamic link import/export semantics. 19 | #endif 20 | 21 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 22 | // In this lib: 23 | #if !defined(SIMUL_DIRECTX12_DLL) 24 | // If we're building dll libraries but not in this library IMPORT the classes 25 | #define SIMUL_DIRECTX12_EXPORT SIMUL_IMPORT 26 | #else 27 | // In ALL OTHER CASES we EXPORT the classes! 28 | #define SIMUL_DIRECTX12_EXPORT SIMUL_EXPORT 29 | #endif 30 | #else 31 | #define SIMUL_DIRECTX12_EXPORT 32 | #endif 33 | 34 | #ifdef _MSC_VER 35 | #define SIMUL_DIRECTX12_EXPORT_FN SIMUL_DIRECTX12_EXPORT __cdecl 36 | #else 37 | #define SIMUL_DIRECTX12_EXPORT_FN SIMUL_DIRECTX12_EXPORT 38 | #endif 39 | 40 | #define SIMUL_DIRECTX12_EXPORT_CLASS class SIMUL_DIRECTX12_EXPORT 41 | #define SIMUL_DIRECTX12_EXPORT_STRUCT struct SIMUL_DIRECTX12_EXPORT 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /DirectX12/Framebuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/Framebuffer.h" 3 | #include "Platform/DirectX12/Export.h" 4 | #include "Platform/DirectX12/Texture.h" 5 | #include "SimulDirectXHeader.h" 6 | 7 | namespace platform 8 | { 9 | namespace dx12 10 | { 11 | //! A DirectX 12 framebuffer class. 12 | class SIMUL_DIRECTX12_EXPORT Framebuffer : public crossplatform::Framebuffer 13 | { 14 | public: 15 | Framebuffer(const char *name); 16 | virtual ~Framebuffer(); 17 | virtual void SetAntialiasing(int a); 18 | virtual void Activate(crossplatform::GraphicsDeviceContext &deviceContext); 19 | virtual void ActivateDepth(crossplatform::GraphicsDeviceContext &deviceContext); 20 | virtual void Deactivate(crossplatform::GraphicsDeviceContext &deviceContext); 21 | virtual void DeactivateDepth(crossplatform::GraphicsDeviceContext &deviceContext); 22 | 23 | private: 24 | DXGI_SAMPLE_DESC mCachedMSAAState; 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /DirectX12/Layout.cpp: -------------------------------------------------------------------------------- 1 | #include "Layout.h" 2 | #include "SimulDirectXHeader.h" 3 | #include "Platform/CrossPlatform/DeviceContext.h" 4 | #include "Platform/Core/RuntimeError.h" 5 | #include "Platform/DirectX12/RenderPlatform.h" 6 | 7 | using namespace platform; 8 | using namespace dx12; 9 | 10 | Layout::Layout(): 11 | previousTopology(D3D_PRIMITIVE_TOPOLOGY_UNDEFINED), 12 | mAppliedCount(0) 13 | { 14 | } 15 | 16 | Layout::~Layout() 17 | { 18 | } 19 | 20 | void Layout::InvalidateDeviceObjects() 21 | { 22 | 23 | } 24 | 25 | void Layout::Apply(crossplatform::DeviceContext &deviceContext) 26 | { 27 | mAppliedCount++; 28 | dx12::RenderPlatform* renderPlat = (dx12::RenderPlatform*)deviceContext.renderPlatform; 29 | renderPlat->SetCurrentInputLayout(&Dx12LayoutDesc); 30 | } 31 | 32 | void Layout::Unapply(crossplatform::DeviceContext &deviceContext) 33 | { 34 | if (mAppliedCount == 0) 35 | { 36 | SIMUL_BREAK("Calling Unapply without a previous Apply"); 37 | return; 38 | } 39 | mAppliedCount--; 40 | dx12::RenderPlatform* renderPlat = (dx12::RenderPlatform*)deviceContext.renderPlatform; 41 | renderPlat->SetCurrentInputLayout(nullptr); 42 | } -------------------------------------------------------------------------------- /DirectX12/Layout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Export.h" 3 | #include "Platform/CrossPlatform/Layout.h" 4 | #include "SimulDirectXHeader.h" 5 | 6 | //! Forward declaration for this, means we needn't include the dx11 headers yet. 7 | enum D3D_PRIMITIVE_TOPOLOGY; 8 | namespace platform 9 | { 10 | namespace dx12 11 | { 12 | class Layout:public crossplatform::Layout 13 | { 14 | D3D_PRIMITIVE_TOPOLOGY previousTopology; 15 | 16 | public: 17 | D3D12_INPUT_LAYOUT_DESC Dx12LayoutDesc; 18 | std::vector Dx12InputLayout; 19 | 20 | Layout(); 21 | ~Layout(); 22 | void InvalidateDeviceObjects(); 23 | void Apply(crossplatform::DeviceContext &deviceContext); 24 | void Unapply(crossplatform::DeviceContext &deviceContext); 25 | 26 | private: 27 | UINT mAppliedCount; 28 | }; 29 | } 30 | } -------------------------------------------------------------------------------- /DirectX12/ShaderBindingTable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/ShaderBindingTable.h" 3 | #include "Platform/CrossPlatform/RenderPlatform.h" 4 | 5 | namespace platform 6 | { 7 | namespace dx12 8 | { 9 | class ShaderBindingTable final : public crossplatform::ShaderBindingTable 10 | { 11 | public: 12 | std::map SBTResources; 13 | 14 | public: 15 | ShaderBindingTable(); 16 | ~ShaderBindingTable(); 17 | void RestoreDeviceObjects(crossplatform::RenderPlatform* r) override; 18 | void InvalidateDeviceObjects() override; 19 | 20 | std::map> GetShaderHandlesFromEffectPass(crossplatform::RenderPlatform* renderPlatform, crossplatform::EffectPass* pass) override; 21 | void BuildShaderBindingTableResources(crossplatform::RenderPlatform* renderPlatform) override; 22 | 23 | inline const std::map& GetShaderBindingTableStrides() const { return shaderBindingTableStrides; } 24 | inline std::map& GetShaderBindingTableStrides() { return shaderBindingTableStrides; } 25 | }; 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /DirectX12/TopLevelAccelerationStructure.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/CrossPlatform/TopLevelAccelerationStructure.h" 3 | #include "Platform/CrossPlatform/RenderPlatform.h" 4 | 5 | #if defined(_GAMING_XBOX_XBOXONE) 6 | #define PLATFORM_SUPPORT_D3D12_RAYTRACING 0 7 | #endif 8 | 9 | namespace platform 10 | { 11 | namespace dx12 12 | { 13 | class TopLevelAccelerationStructure final : public crossplatform::TopLevelAccelerationStructure 14 | { 15 | public: 16 | TopLevelAccelerationStructure(crossplatform::RenderPlatform* r); 17 | ~TopLevelAccelerationStructure(); 18 | void RestoreDeviceObjects() override; 19 | void InvalidateDeviceObjects() override; 20 | ID3D12Resource* AsD3D12ShaderResource(crossplatform::DeviceContext& deviceContext); 21 | void BuildAccelerationStructureAtRuntime(crossplatform::DeviceContext& deviceContext) override; 22 | 23 | protected: 24 | #if PLATFORM_SUPPORT_D3D12_RAYTRACING 25 | std::vector instanceDescs; 26 | 27 | D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS inputs; 28 | D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO prebuildInfo; 29 | 30 | D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC buildDesc; 31 | #endif 32 | 33 | ID3D12Resource* accelerationStructure = nullptr; 34 | ID3D12Resource* scratchResource = nullptr; 35 | ID3D12Resource* instanceDescsResource = nullptr; 36 | }; 37 | } 38 | } -------------------------------------------------------------------------------- /DirectX12/VideoBuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/DirectX12/Export.h" 3 | #include "SimulDirectXHeader.h" 4 | #include "Platform/CrossPlatform/VideoBuffer.h" 5 | 6 | #pragma warning(disable:4251) 7 | 8 | namespace platform 9 | { 10 | namespace dx12 11 | { 12 | /// DirectX12 buffer class that can be used as index buffer and vertex buffer 13 | class SIMUL_DIRECTX12_EXPORT VideoBuffer : public platform::crossplatform::VideoBuffer 14 | { 15 | public: 16 | VideoBuffer(); 17 | ~VideoBuffer(); 18 | void InvalidateDeviceObjects(); 19 | void EnsureBuffer(crossplatform::RenderPlatform* r, crossplatform::VideoBufferType bufferType, uint32_t dataSize) override; 20 | void ChangeState(void* videoContext, crossplatform::VideoBufferState bufferState) override; 21 | void Update(void* graphicsContext, const void* data, uint32_t dataSize) override; 22 | ID3D12Resource * const AsD3D12Buffer() const override 23 | { 24 | return mGpuHeap; 25 | } 26 | ID3D12Resource * AsD3D12Buffer() override 27 | { 28 | return mGpuHeap; 29 | } 30 | private: 31 | ID3D12Resource* mGpuHeap; 32 | AllocationInfo mGpuHeapAllocationInfo; 33 | ID3D12Resource* mIntermediateHeap; 34 | AllocationInfo mIntermediateHeapAllocationInfo; 35 | UINT32 mBufferSize; 36 | UINT8* mGpuMappedPtr; 37 | crossplatform::RenderPlatform* renderPlatform = nullptr; 38 | D3D12_RESOURCE_STATES mState; 39 | }; 40 | } 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /Docs/API/BaseFramebuffer.rst: -------------------------------------------------------------------------------- 1 | Base Framebuffer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::BaseFramebuffer 5 | :members: BaseFramebuffer, RestoreDeviceObjects, InvalidateDeviceObjects, Activate, Deactivate, SetFormat, Clear, ClearColour, SetWidthAndHeight, GetTexture 6 | -------------------------------------------------------------------------------- /Docs/API/Camera.rst: -------------------------------------------------------------------------------- 1 | Camera 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Camera 5 | :members: SetCameraViewStruct, MakeViewMatrix, SetHorizontalFieldOfViewDegrees, SetVerticalFieldOfViewDegrees, LookInDirection 6 | 7 | .. doxygenstruct:: simul::crossplatform::CameraViewStruct 8 | :members: 9 | -------------------------------------------------------------------------------- /Docs/API/CommandLine.rst: -------------------------------------------------------------------------------- 1 | Command Line Paramaters 2 | ============= 3 | 4 | .. doxygenstruct:: platform::core::CommandLineParams 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/API/ConstantBuffer.rst: -------------------------------------------------------------------------------- 1 | ConstantBuffer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::ConstantBuffer 5 | :members: RestoreDeviceObjects, InvalidateDeviceObjects, LinkToEffect, Unbind -------------------------------------------------------------------------------- /Docs/API/DisplaySurfaceManager.rst: -------------------------------------------------------------------------------- 1 | Display Surface Manager 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::DisplaySurfaceManager 5 | :members: DisplaySurfaceManager, Initialize, SetRenderer, Render, EndFrame, AddWindow, RemoveWindow, Shutdown -------------------------------------------------------------------------------- /Docs/API/Effect.rst: -------------------------------------------------------------------------------- 1 | Effect 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Effect 5 | :members: GetTechniqueByName, Apply, Unapply 6 | -------------------------------------------------------------------------------- /Docs/API/EffectTechnique.rst: -------------------------------------------------------------------------------- 1 | Effect Technique 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::EffectTechnique 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/API/GraphicsDeviceContext.rst: -------------------------------------------------------------------------------- 1 | Graphics Device Context 2 | ============= 3 | 4 | .. doxygenstruct:: simul::crossplatform::GraphicsDeviceContext 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/API/HdrRenderer.rst: -------------------------------------------------------------------------------- 1 | HDR Renderer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::HdrRenderer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/API/PlatformStructuredBuffer.rst: -------------------------------------------------------------------------------- 1 | Platform Structured Buffer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::PlatformStructuredBuffer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/API/RenderPlatform.rst: -------------------------------------------------------------------------------- 1 | Render Platform 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::RenderPlatform 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/API/Texture.rst: -------------------------------------------------------------------------------- 1 | Texture 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Texture 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/API/View.rst: -------------------------------------------------------------------------------- 1 | View 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::View 5 | :members: 6 | .. doxygenclass:: simul::crossplatform::ViewManager 7 | :members: 8 | -------------------------------------------------------------------------------- /Docs/API/apiindex.rst: -------------------------------------------------------------------------------- 1 | API 2 | ============= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :caption: API: 7 | 8 | apiindex.rst 9 | BaseFramebuffer.rst 10 | Camera.rst 11 | CommandLine.rst 12 | ConstantBuffer.rst 13 | DisplaySurfaceManager.rst 14 | Effect.rst 15 | EffectTechnique.rst 16 | GraphicsDeviceContext.rst 17 | HdrRenderer.rst 18 | PlatformStructuredBuffer.rst 19 | RenderPlatform.rst 20 | Texture.rst 21 | View.rst -------------------------------------------------------------------------------- /Docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /Docs/Reference/Core/BaseMouseHandler.rst: -------------------------------------------------------------------------------- 1 | Base Mouse Handler 2 | ============= 3 | 4 | .. doxygenclass:: simul::base::BaseMouseHandler 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/Core/CommandLine.rst: -------------------------------------------------------------------------------- 1 | Command Line Paramaters 2 | ============= 3 | 4 | .. doxygenstruct:: platform::core::CommandLineParams 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/Core/DefaultFileLoader.rst: -------------------------------------------------------------------------------- 1 | Default File Loader 2 | ============= 3 | 4 | .. doxygenclass:: simul::base::DefaultFileLoader 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/Core/FileLoader.rst: -------------------------------------------------------------------------------- 1 | File Loader 2 | ============= 3 | 4 | .. doxygenclass:: simul::base::FileLoader 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/Core/MemoryInterface.rst: -------------------------------------------------------------------------------- 1 | Memory Interface 2 | ============= 3 | 4 | .. doxygenclass:: simul::base::MemoryInterface 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/Core/Timer.rst: -------------------------------------------------------------------------------- 1 | Timer 2 | ============= 3 | 4 | .. doxygenclass:: simul::base::Timer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/BaseFramebuffer.rst: -------------------------------------------------------------------------------- 1 | Base Framebuffer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::BaseFramebuffer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/Buffer.rst: -------------------------------------------------------------------------------- 1 | Buffer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Buffer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/Camera.rst: -------------------------------------------------------------------------------- 1 | Camera 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Camera 5 | :members: 6 | 7 | .. doxygenstruct:: simul::crossplatform::CameraViewStruct 8 | :members: 9 | 10 | .. doxygenstruct:: simul::crossplatform::MouseCameraInput 11 | :members: 12 | 13 | .. doxygenstruct:: simul::crossplatform::MouseCameraState 14 | :members: 15 | 16 | .. doxygenstruct:: simul::crossplatform::Frustum 17 | :members: -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/DeviceContext.rst: -------------------------------------------------------------------------------- 1 | Device Context 2 | ============= 3 | 4 | .. doxygenstruct:: simul::crossplatform::DeviceContext 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/DisplaySurface.rst: -------------------------------------------------------------------------------- 1 | Display Surface 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::DisplaySurface 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/DisplaySurfaceManager.rst: -------------------------------------------------------------------------------- 1 | Display Surface Manager 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::DisplaySurfaceManager 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/Effect.rst: -------------------------------------------------------------------------------- 1 | Effect 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Effect 5 | :members: 6 | 7 | .. doxygenclass:: simul::crossplatform::EffectTechnique 8 | :members: 9 | 10 | .. doxygenclass:: simul::crossplatform::ConstantBuffer 11 | :members: -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/GpuProfiler.rst: -------------------------------------------------------------------------------- 1 | GPU Profiler 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::GpuProfilingInterface 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/GraphicsDeviceContext.rst: -------------------------------------------------------------------------------- 1 | Graphics Device Context 2 | ============= 3 | 4 | .. doxygenstruct:: simul::crossplatform::GraphicsDeviceContext 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/HdrRenderer.rst: -------------------------------------------------------------------------------- 1 | HDR Renderer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::HdrRenderer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/Layout.rst: -------------------------------------------------------------------------------- 1 | Layout 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Layout 5 | :members: 6 | 7 | .. doxygenstruct:: simul::crossplatform::LayoutDesc 8 | :members: 9 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/PixelFormat.rst: -------------------------------------------------------------------------------- 1 | Pixel Format 2 | ============= 3 | 4 | .. doxygenstruct:: simul::crossplatform::PixelFormat 5 | :members: 6 | 7 | .. doxygenstruct:: simul::crossplatform::ShaderResourceType 8 | :members: -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/PlatformStructuredBuffer.rst: -------------------------------------------------------------------------------- 1 | Platform Structured Buffer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::PlatformStructuredBuffer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/Quaterniond.rst: -------------------------------------------------------------------------------- 1 | Quaternion 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Quaternion 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/RenderPlatform.rst: -------------------------------------------------------------------------------- 1 | Render Platform 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::RenderPlatform 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/TextInputOutput.rst: -------------------------------------------------------------------------------- 1 | Text Input Output 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::TextInput 5 | :members: 6 | 7 | .. doxygenclass:: simul::crossplatform::TextOuput 8 | :members: 9 | 10 | .. doxygenclass:: simul::crossplatform::TextFileInput 11 | :members: 12 | 13 | .. doxygenclass:: simul::crossplatform::TextFileOuput 14 | :members: -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/TextRenderer.rst: -------------------------------------------------------------------------------- 1 | Text Renderer 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::TextRenderer 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/Texture.rst: -------------------------------------------------------------------------------- 1 | Texture 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::Texture 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/View.rst: -------------------------------------------------------------------------------- 1 | View 2 | ============= 3 | 4 | .. doxygenclass:: simul::crossplatform::View 5 | :members: 6 | .. doxygenclass:: simul::crossplatform::ViewManager 7 | :members: 8 | -------------------------------------------------------------------------------- /Docs/Reference/CrossPlatform/ViewStruct.rst: -------------------------------------------------------------------------------- 1 | ViewStruct 2 | ============= 3 | 4 | .. doxygenstruct:: simul::crossplatform::ViewStruct 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/Math/Matrix.rst: -------------------------------------------------------------------------------- 1 | Matrix 2 | ============= 3 | 4 | .. doxygenclass:: simul::math::Matrix 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/Math/Matrix4x4.rst: -------------------------------------------------------------------------------- 1 | Matrix4x4 2 | ============= 3 | 4 | .. doxygenclass:: simul::math::Matrix4x4 5 | :members: 6 | 7 | -------------------------------------------------------------------------------- /Docs/Reference/Math/Noise1D.rst: -------------------------------------------------------------------------------- 1 | Noise1D 2 | ============= 3 | 4 | .. doxygenclass:: simul::math::Noise1D 5 | :members: 6 | 7 | -------------------------------------------------------------------------------- /Docs/Reference/Math/Noise2D.rst: -------------------------------------------------------------------------------- 1 | Noise2D 2 | ============= 3 | 4 | .. doxygenclass:: simul::math::Noise2D 5 | :members: 6 | 7 | -------------------------------------------------------------------------------- /Docs/Reference/Math/Noise3D.rst: -------------------------------------------------------------------------------- 1 | Noise3D 2 | ============= 3 | 4 | .. doxygenclass:: simul::math::Noise3D 5 | :members: -------------------------------------------------------------------------------- /Docs/Reference/Math/Quaternion.rst: -------------------------------------------------------------------------------- 1 | Quaternion 2 | ============= 3 | 4 | .. doxygenclass:: simul::math::Quaternion 5 | :members: 6 | -------------------------------------------------------------------------------- /Docs/Reference/core.rst: -------------------------------------------------------------------------------- 1 | Core 2 | ====================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :caption: Classes: 7 | 8 | Core/BaseMouseHandler.rst 9 | Core/BaseProfilingInterface.rst 10 | Core/CommandLine.rst 11 | Core/DefaultFileLoader.rst 12 | Core/FileLoader.rst 13 | Core/MemoryInterface.rst 14 | Core/Timer.rst -------------------------------------------------------------------------------- /Docs/Reference/crossplatform.rst: -------------------------------------------------------------------------------- 1 | CrossPlatform 2 | ============= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :caption: Classes: 7 | 8 | CrossPlatform/BaseFramebuffer.rst 9 | CrossPlatform/Buffer.rst 10 | CrossPlatform/Camera.rst 11 | CrossPlatform/DeviceContext.rst 12 | CrossPlatform/DisplaySurface.rst 13 | CrossPlatform/DisplaySurfaceManager.rst 14 | CrossPlatform/Effect.rst 15 | CrossPlatform/GpuProfiler.rst 16 | CrossPlatform/GraphicsDeviceContext.rst 17 | CrossPlatform/HdrRenderer.rst 18 | CrossPlatform/Layout.rst 19 | CrossPlatform/PixelFormat.rst 20 | CrossPlatform/PlatformStructuredBuffer.rst 21 | CrossPlatform/Quaterniond.rst 22 | CrossPlatform/RenderPlatform.rst 23 | CrossPlatform/TextInputGenerator.rst 24 | CrossPlatform/TextRenderer.rst 25 | CrossPlatform/Texture.rst 26 | CrossPlatform/View.rst 27 | CrossPlatform/ViewStruct.rst -------------------------------------------------------------------------------- /Docs/Reference/math.rst: -------------------------------------------------------------------------------- 1 | Math 2 | ==== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :caption: Classes: 7 | 8 | Math/Matrix.rst 9 | Math/Matrix4x4.rst 10 | Math/Noise1D.rst 11 | Math/Noise2D.rst 12 | Math/Noise3D.rst 13 | Math/Quaternion.rst -------------------------------------------------------------------------------- /Docs/Reference/reference.rst: -------------------------------------------------------------------------------- 1 | Reference 2 | ====================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :caption: Reference: 7 | 8 | core.rst 9 | math.rst 10 | crossplatform.rst -------------------------------------------------------------------------------- /Docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/da/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/da/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/de/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/de/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/en/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/en/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/es/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/es/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/et/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/et/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/fa_IR/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/fa_IR/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/fr/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/fr/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/hr/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/hr/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/hr/LC_MESSAGES/sphinx.po: -------------------------------------------------------------------------------- 1 | # English translations for sphinx_rtd_theme. 2 | # Copyright (C) 2019 ORGANIZATION 3 | # This file is distributed under the same license as the sphinx_rtd_theme 4 | # project. 5 | # FIRST AUTHOR , 2019. 6 | # 7 | # Translators: 8 | # Ivan Bratović, 2022 9 | # 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" 13 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 14 | "POT-Creation-Date: 2023-02-06 15:36+0100\n" 15 | "PO-Revision-Date: 2019-07-16 21:44+0000\n" 16 | "Last-Translator: Ivan Bratović, 2022\n" 17 | "Language-Team: Croatian (https://www.transifex.com/readthedocs/teams/101354/hr/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Generated-By: Babel 2.11.0\n" 22 | "Language: hr\n" 23 | "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 24 | -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/hu/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/hu/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/hu/LC_MESSAGES/sphinx.po: -------------------------------------------------------------------------------- 1 | # English translations for sphinx_rtd_theme. 2 | # Copyright (C) 2019 ORGANIZATION 3 | # This file is distributed under the same license as the sphinx_rtd_theme 4 | # project. 5 | # FIRST AUTHOR , 2019. 6 | # 7 | # Translators: 8 | # Balázs Úr, 2022 9 | # 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" 13 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 14 | "POT-Creation-Date: 2023-02-06 15:36+0100\n" 15 | "PO-Revision-Date: 2019-07-16 21:44+0000\n" 16 | "Last-Translator: Balázs Úr, 2022\n" 17 | "Language-Team: Hungarian (https://www.transifex.com/readthedocs/teams/101354/hu/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Generated-By: Babel 2.11.0\n" 22 | "Language: hu\n" 23 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 24 | -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/it/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/it/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/lt/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/lt/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/nl/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/nl/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/pl/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/pl/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/pt/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/pt/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/pt_BR/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/pt_BR/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/ru/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/ru/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/sv/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/sv/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/tr/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/tr/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/zh_CN/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/zh_CN/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/zh_TW/LC_MESSAGES/sphinx.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/locale/zh_TW/LC_MESSAGES/sphinx.mo -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/locale/zh_TW/LC_MESSAGES/sphinx.po: -------------------------------------------------------------------------------- 1 | # English translations for sphinx_rtd_theme. 2 | # Copyright (C) 2019 ORGANIZATION 3 | # This file is distributed under the same license as the sphinx_rtd_theme 4 | # project. 5 | # FIRST AUTHOR , 2019. 6 | # 7 | # Translators: 8 | # Jason Zhou, 2023 9 | # 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n" 13 | "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" 14 | "POT-Creation-Date: 2023-02-06 15:36+0100\n" 15 | "PO-Revision-Date: 2019-07-16 21:44+0000\n" 16 | "Last-Translator: Jason Zhou, 2023\n" 17 | "Language-Team: Chinese (Taiwan) (https://www.transifex.com/readthedocs/teams/101354/zh_TW/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Generated-By: Babel 2.11.0\n" 22 | "Language: zh_TW\n" 23 | "Plural-Forms: nplurals=1; plural=0;\n" 24 | -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/platforms.html: -------------------------------------------------------------------------------- 1 |  2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/searchbox.html: -------------------------------------------------------------------------------- 1 | {%- if 'singlehtml' not in builder %} 2 |
3 |
4 | 5 | 6 | 7 | 8 |
9 |
10 | {%- endif %} 11 | -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Docs/platform_sphinx_theme/static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/theme.css 4 | pygments_style = default 5 | 6 | [options] 7 | canonical_url = 8 | analytics_id = 9 | analytics_anonymize_ip = False 10 | collapse_navigation = True 11 | sticky_navigation = True 12 | navigation_depth = 4 13 | includehidden = True 14 | titles_only = 15 | logo_only = 16 | display_version = True 17 | prev_next_buttons_location = bottom 18 | style_external_links = False 19 | style_nav_header_background = 20 | vcs_pageview_mode = 21 | -------------------------------------------------------------------------------- /Docs/platform_sphinx_theme/versions.html: -------------------------------------------------------------------------------- 1 | {% if READTHEDOCS %} 2 | {# Add rst-badge after rst-versions for small badge style. #} 3 |
4 | 5 | Read the Docs 6 | v: {{ current_version }} 7 | 8 | 9 |
10 |
11 |
{{ _('Versions') }}
12 | {% for slug, url in versions %} 13 |
{{ slug }}
14 | {% endfor %} 15 |
16 |
17 |
{{ _('Downloads') }}
18 | {% for type, url in downloads %} 19 |
{{ type }}
20 | {% endfor %} 21 |
22 |
23 | {# Translators: The phrase "Read the Docs" is not translated #} 24 |
{{ _('On Read the Docs') }}
25 |
26 | {{ _('Project Home') }} 27 |
28 |
29 | {{ _('Builds') }} 30 |
31 |
32 |
33 |
34 | {% endif %} 35 | -------------------------------------------------------------------------------- /Docs/requirements.txt: -------------------------------------------------------------------------------- 1 | rst2html 2 | sphinx 3 | sphinx_rtd_theme 4 | breathe 5 | myst-parser -------------------------------------------------------------------------------- /External/D3D12MemoryAllocator/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019-2022 Advanced Micro Devices, Inc. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /External/DirectX/DXCompiler/LICENCE-MIT.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) Microsoft Corporation. 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /External/DirectX/DXCompiler/dxc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DXCompiler/dxc.exe -------------------------------------------------------------------------------- /External/DirectX/DXCompiler/dxcompiler.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DXCompiler/dxcompiler.dll -------------------------------------------------------------------------------- /External/DirectX/DXCompiler/dxcompiler.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DXCompiler/dxcompiler.lib -------------------------------------------------------------------------------- /External/DirectX/DXCompiler/dxil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DXCompiler/dxil.dll -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.{cpp,h,inl,fx,hlsl}] 4 | indent_size = 4 5 | indent_style = space 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | end_of_line = crlf 9 | charset = latin1 10 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Explicitly declare code/VS files as CRLF 5 | *.cpp eol=crlf 6 | *.cmd eol=crlf 7 | *.h eol=crlf 8 | *.hlsl eol=crlf 9 | *.hlsli eol=crlf 10 | *.fx eol=crlf 11 | *.fxh eol=crlf 12 | *.inc eol=crlf 13 | *.inl eol=crlf 14 | *.vcxproj eol=crlf 15 | *.filters eol=crlf 16 | *.sln eol=crlf 17 | 18 | # Explicitly declare resource files as binary 19 | *.pdb binary 20 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/.gitignore: -------------------------------------------------------------------------------- 1 | *.psess 2 | *.vsp 3 | *.log 4 | *.err 5 | *.wrn 6 | *.suo 7 | *.sdf 8 | *.user 9 | *.i 10 | *.vspscc 11 | *.opensdf 12 | *.opendb 13 | *.ipch 14 | *.cache 15 | *.tlog 16 | *.lastbuildstate 17 | *.ilk 18 | *.VC.db 19 | *.nupkg 20 | .vs 21 | Bin 22 | /ipch 23 | Debug 24 | Profile 25 | Release 26 | x64 27 | /Tests 28 | /wiki 29 | /DirectXTex/out -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/.nuget/directxtex_desktop_2015.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | 7 | 8 | Release 9 | 10 | 11 | 12 | $(MSBuildThisFileDirectory)..\..\lib\$(Platform)\$(NuGetConfiguration) 13 | 14 | 15 | 16 | 17 | $(directxtex-LibPath);%(AdditionalLibraryDirectories) 18 | DirectXTex.lib;%(AdditionalDependencies) 19 | 20 | 21 | 22 | 23 | 24 | HAS_DIRECTXTEX;%(PreprocessorDefinitions) 25 | $(MSBuildThisFileDirectory)..\..\include;%(AdditionalIncludeDirectories) 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/.nuget/directxtex_uwp.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | 7 | 8 | Release 9 | 10 | 11 | 12 | $(MSBuildThisFileDirectory)..\..\lib\$(Platform)\$(NuGetConfiguration) 13 | 14 | 15 | 16 | 17 | $(directxtex-LibPath);%(AdditionalLibraryDirectories) 18 | DirectXTex.lib;%(AdditionalDependencies) 19 | 20 | 21 | 22 | 23 | 24 | HAS_DIRECTXTEX;%(PreprocessorDefinitions) 25 | $(MSBuildThisFileDirectory)..\..\include;%(AdditionalIncludeDirectories) 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/.nuget/signconfig_desktop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/.nuget/signconfig_uwp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/DDSView/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DirectXTex/DDSView/directx.ico -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/DDSView/hlsl.cmd: -------------------------------------------------------------------------------- 1 | fxc ddsview.fx /nologo /EVS /Tvs_4_1 /Fhshaders\vs.h 2 | fxc ddsview.fx /nologo /EPS_1D /Tps_4_1 /Fhshaders\ps1D.h 3 | fxc ddsview.fx /nologo /EPS_1DArray /Tps_4_1 /Fhshaders\ps1Darray.h 4 | fxc ddsview.fx /nologo /EPS_2D /Tps_4_1 /Fhshaders\ps2D.h 5 | fxc ddsview.fx /nologo /EPS_2DArray /Tps_4_1 /Fhshaders\ps2Darray.h 6 | fxc ddsview.fx /nologo /EPS_3D /Tps_4_1 /Fhshaders\ps3D.h 7 | fxc ddsview.fx /nologo /EPS_Cube /Tps_4_1 /Fhshaders\psCube.h 8 | 9 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/DirectXTex/Shaders/CompileShaders.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Copyright (c) Microsoft Corporation. All rights reserved. 3 | rem Licensed under the MIT License. 4 | 5 | setlocal 6 | set error=0 7 | 8 | set FXCOPTS=/nologo /WX /Ges /Zi /Zpc /Qstrip_reflect /Qstrip_debug 9 | 10 | set PCFXC="%WindowsSdkBinPath%%WindowsSDKVersion%\x86\fxc.exe" 11 | if exist %PCFXC% goto continue 12 | set PCFXC="%WindowsSdkDir%bin\%WindowsSDKVersion%\x86\fxc.exe" 13 | if exist %PCFXC% goto continue 14 | set PCFXC="%WindowsSdkDir%bin\x86\fxc.exe" 15 | if exist %PCFXC% goto continue 16 | 17 | set PCFXC=fxc.exe 18 | 19 | :continue 20 | @if not exist Compiled mkdir Compiled 21 | call :CompileShader BC7Encode TryMode456CS 22 | call :CompileShader BC7Encode TryMode137CS 23 | call :CompileShader BC7Encode TryMode02CS 24 | call :CompileShader BC7Encode EncodeBlockCS 25 | 26 | call :CompileShader BC6HEncode TryModeG10CS 27 | call :CompileShader BC6HEncode TryModeLE10CS 28 | call :CompileShader BC6HEncode EncodeBlockCS 29 | 30 | echo. 31 | 32 | if %error% == 0 ( 33 | echo Shaders compiled ok 34 | ) else ( 35 | echo There were shader compilation errors! 36 | ) 37 | 38 | endlocal 39 | exit /b 40 | 41 | :CompileShader 42 | set fxc=%PCFXC% %1.hlsl %FXCOPTS% /Tcs_4_0 /E%2 /FhCompiled\%1_%2.inc /FdCompiled\%1_%2.pdb /Vn%1_%2 43 | echo. 44 | echo %fxc% 45 | %fxc% || set error=1 46 | exit /b 47 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/DirectXTex_XboxOneXDK_2015.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectXTex", "DirectXTex\DirectXTex_XboxOneXDK_2015.vcxproj", "{879B5023-53B7-4108-AEAE-F019C2E9410D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Durango = Debug|Durango 11 | Profile|Durango = Profile|Durango 12 | Release|Durango = Release|Durango 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {879B5023-53B7-4108-AEAE-F019C2E9410D}.Debug|Durango.ActiveCfg = Debug|Durango 16 | {879B5023-53B7-4108-AEAE-F019C2E9410D}.Debug|Durango.Build.0 = Debug|Durango 17 | {879B5023-53B7-4108-AEAE-F019C2E9410D}.Profile|Durango.ActiveCfg = Profile|Durango 18 | {879B5023-53B7-4108-AEAE-F019C2E9410D}.Profile|Durango.Build.0 = Profile|Durango 19 | {879B5023-53B7-4108-AEAE-F019C2E9410D}.Release|Durango.ActiveCfg = Release|Durango 20 | {879B5023-53B7-4108-AEAE-F019C2E9410D}.Release|Durango.Build.0 = Release|Durango 21 | EndGlobalSection 22 | GlobalSection(SolutionProperties) = preSolution 23 | HideSolutionNode = FALSE 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2019 Microsoft Corp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 6 | software and associated documentation files (the "Software"), to deal in the Software 7 | without restriction, including without limitation the rights to use, copy, modify, 8 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all copies 13 | or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/Texassemble/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DirectXTex/Texassemble/directx.ico -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/Texconv/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DirectXTex/Texconv/directx.ico -------------------------------------------------------------------------------- /External/DirectX/DirectXTex/Texdiag/directx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/DirectX/DirectXTex/Texdiag/directx.ico -------------------------------------------------------------------------------- /External/DirectX/Effects11_Win8SDK/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.8) 2 | 3 | set(SOURCES d3dxGlobal.cpp 4 | EffectAPI.cpp 5 | EffectLoad.cpp 6 | EffectNonRuntime.cpp 7 | EffectReflection.cpp 8 | EffectRuntime.cpp) 9 | 10 | add_static_library(effects11 SOURCES ${SOURCES} INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/Binary" PUBLICINCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/inc" RUNTIME MD FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX}) 11 | add_static_library(effects11 SOURCES ${SOURCES} INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/Binary" PUBLICINCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/inc" FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX}) 12 | 13 | 14 | -------------------------------------------------------------------------------- /External/DirectX/Effects11_Win8SDK/Windows81SDKVS12_x64.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(ProgramFiles)\Windows Kits\8.1\bin\x64;$(ExecutablePath) 7 | $(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(IncludePath) 8 | $(ProgramFiles)\Windows Kits\8.1\lib\winv6.3\um\x64;$(LibraryPath) 9 | $(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(ExcludePath) 10 | 11 | 12 | -------------------------------------------------------------------------------- /External/DirectX/Effects11_Win8SDK/Windows81SDKVS12_x86.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(ProgramFiles)\Windows Kits\8.1\bin\x86;$(ExecutablePath) 7 | $(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(IncludePath) 8 | $(ProgramFiles)\Windows Kits\8.1\lib\winv6.3\um\x86;$(LibraryPath) 9 | $(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(ExcludePath) 10 | 11 | 12 | -------------------------------------------------------------------------------- /External/DirectX/Effects11_Win8SDK/Windows81SDK_x64.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(VCInstallDir)bin\x86_amd64;$(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(ProgramFiles)\Windows Kits\8.1\bin\x86;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH) 7 | $(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(FrameworkSDKDir)\include; 8 | $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(ProgramFiles)\Windows Kits\8.1\lib\winv6.3\um\x64;$(FrameworkSDKDir)\lib\x64 9 | $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(FrameworkSDKDir)\include;$(MSBuildToolsPath32);$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib; 10 | 11 | 12 | -------------------------------------------------------------------------------- /External/DirectX/Effects11_Win8SDK/Windows81SDK_x86.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(ProgramFiles)\Windows Kits\8.1\bin\x86;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH) 7 | $(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(FrameworkSDKDir)\include; 8 | $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(ProgramFiles)\Windows Kits\8.1\lib\winv6.3\um\x86;$(FrameworkSDKDir)\lib 9 | $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(ProgramFiles)\Windows Kits\8.1\Include\um;$(ProgramFiles)\Windows Kits\8.1\Include\shared;$(ProgramFiles)\Windows Kits\8.1\Include\winrt;$(FrameworkSDKDir)\include;$(MSBuildToolsPath32);$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib; 10 | 11 | 12 | -------------------------------------------------------------------------------- /External/DirectX/Effects11_Win8SDK/pchfx.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------------------------- 2 | // File: pchfx.h 3 | // 4 | // Direct3D 11 shader effects precompiled header 5 | // 6 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 7 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 8 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 9 | // PARTICULAR PURPOSE. 10 | // 11 | // Copyright (c) Microsoft Corporation. All rights reserved. 12 | // 13 | // http://go.microsoft.com/fwlink/p/?LinkId=271568 14 | //-------------------------------------------------------------------------------------- 15 | 16 | #pragma once 17 | 18 | #pragma warning(disable : 4102 4127 4201 4505 4616 4706 6326) 19 | 20 | #ifndef NOMINMAX 21 | #define NOMINMAX 22 | #endif 23 | 24 | #include 25 | #include 26 | 27 | #ifndef _WIN32_WINNT_WIN8 28 | #define _WIN32_WINNT_WIN8 0x0602 29 | #endif 30 | 31 | #undef DEFINE_GUID 32 | #include "INITGUID.h" 33 | 34 | #include "d3dx11effect.h" 35 | 36 | #define UNUSED -1 37 | 38 | ////////////////////////////////////////////////////////////////////////// 39 | 40 | #define offsetof_fx( a, b ) (uint32_t)offsetof( a, b ) 41 | 42 | #include "d3dxGlobal.h" 43 | 44 | #include 45 | #include 46 | 47 | #include "Effect.h" 48 | #include "EffectStateBase11.h" 49 | #include "EffectLoad.h" 50 | 51 | #include 52 | 53 | -------------------------------------------------------------------------------- /External/OpenXR-Android/OpenXR-SDK/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 The Khronos Group Inc. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Author: 18 | # 19 | 20 | add_subdirectory(openxr) 21 | -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Include/openxr/openxr_extension_helpers.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : openxr_extension_helpers.h 4 | Content : Helpers for private and experimental extension definition headers. 5 | Language : C99 6 | 7 | Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved. 8 | 9 | *************************************************************************************/ 10 | 11 | #pragma once 12 | 13 | #include 14 | 15 | #define XR_ENUM(type, enm, constant) static const type enm = (type)constant 16 | #define XR_STRUCT_ENUM(enm, constant) XR_ENUM(XrStructureType, enm, constant) 17 | #define XR_REFSPACE_ENUM(enm, constant) XR_ENUM(XrReferenceSpaceType, enm, constant) 18 | #define XR_RESULT_ENUM(enm, constant) XR_ENUM(XrResult, enm, constant) 19 | #define XR_COMPONENT_ENUM(enm, constant) XR_ENUM(XrComponentTypeFB, enm, constant) 20 | -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Include/openxr/openxr_oculus.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | 3 | Filename : openxr_oculus.h 4 | Content : Oculus OpenXR Extensions. 5 | Language : C99 6 | 7 | Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved. 8 | 9 | *************************************************************************************/ 10 | 11 | #ifndef OPENXR_OCULUS_H_ 12 | #define OPENXR_OCULUS_H_ 1 13 | 14 | #if defined(__cplusplus) 15 | extern "C" { 16 | #endif 17 | 18 | // XR_KHR_loader_init and XR_KHR_loader_init_android now available in 1.0.11 public spec. 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif // OPENXR_OCULUS_H_ 25 | -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Libs/Android/arm64-v8a/Debug/libopenxr_loader.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/OpenXR-Android/meta/OpenXR/Libs/Android/arm64-v8a/Debug/libopenxr_loader.so -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Libs/Android/arm64-v8a/Debug/libxrspacewarp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/OpenXR-Android/meta/OpenXR/Libs/Android/arm64-v8a/Debug/libxrspacewarp.so -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Libs/Android/arm64-v8a/Release/libopenxr_loader.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/OpenXR-Android/meta/OpenXR/Libs/Android/arm64-v8a/Release/libopenxr_loader.so -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Libs/Android/armeabi-v7a/Debug/libopenxr_loader.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/OpenXR-Android/meta/OpenXR/Libs/Android/armeabi-v7a/Debug/libopenxr_loader.so -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Libs/Android/armeabi-v7a/Release/libopenxr_loader.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/OpenXR-Android/meta/OpenXR/Libs/Android/armeabi-v7a/Release/libopenxr_loader.so -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Projects/AndroidPrebuilt/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /External/OpenXR-Android/meta/OpenXR/Projects/AndroidPrebuilt/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | ifeq ($(OVR_DEBUG),1) 4 | BUILDTYPE := Debug 5 | else 6 | BUILDTYPE := Release 7 | endif 8 | 9 | #-------------------------------------------------------- 10 | # libopenxr_loader.so 11 | # 12 | # OpenXR Loader 13 | #-------------------------------------------------------- 14 | include $(CLEAR_VARS) 15 | 16 | LOCAL_MODULE := openxr_loader 17 | 18 | LOCAL_SRC_FILES := ../../../Libs/Android/$(TARGET_ARCH_ABI)/$(BUILDTYPE)/lib$(LOCAL_MODULE).so 19 | 20 | # only export public headers 21 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../Include 22 | 23 | # NOTE: This check is added to prevent the following error when running a "make clean" where 24 | # the prebuilt lib may have been deleted: "LOCAL_SRC_FILES points to a missing file" 25 | ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_SRC_FILES))) 26 | include $(PREBUILT_SHARED_LIBRARY) 27 | endif 28 | -------------------------------------------------------------------------------- /External/OpenXR-Android/vulkan/bin/arm64-v8a/libVkLayer_khronos_validation.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/OpenXR-Android/vulkan/bin/arm64-v8a/libVkLayer_khronos_validation.so -------------------------------------------------------------------------------- /External/PIX/VERSION.txt: -------------------------------------------------------------------------------- 1 | WinPixEventRuntime 1.0.210209001 2021/02/09 2 | Redistribution - No Modifications. -------------------------------------------------------------------------------- /External/PIX/lib/WinPixEventRuntime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/PIX/lib/WinPixEventRuntime.dll -------------------------------------------------------------------------------- /External/PIX/lib/WinPixEventRuntime.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/PIX/lib/WinPixEventRuntime.lib -------------------------------------------------------------------------------- /External/RenderDoc/LICENCE.txt: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2020 Baldur Karlsson 4 | 5 | Copyright (c) 2014 Crytek 6 | 7 | Copyright (c) 1998-2018 [Third party code and tools](docs/credits_acknowledgements.rst) 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /External/VulkanMemoryAllocator/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /External/win_flex_bison/UNISTD_ERROR.readme: -------------------------------------------------------------------------------- 1 | In case compile errors like "cannot include " in win_flex generated file try add --wincompat invoke option. 2 | This new option changes unix header with windows analog and replaces isatty/fileno functions to 3 | "safe" windows analogs _isatty/_fileno as well. If you have compile issues with it afterwards please open ticket 4 | at http://sourceforge.net/p/winflexbison/tickets . 5 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc. 2 | 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation, either version 3 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program. If not, see . 15 | 16 | dist_pkgdata_DATA = README bison.m4 \ 17 | c-like.m4 \ 18 | c-skel.m4 c.m4 yacc.c glr.c \ 19 | c++-skel.m4 c++.m4 location.cc lalr1.cc glr.cc stack.hh \ 20 | java-skel.m4 java.m4 lalr1.java 21 | 22 | m4sugardir = $(pkgdatadir)/m4sugar 23 | dist_m4sugar_DATA = m4sugar/m4sugar.m4 m4sugar/foreach.m4 24 | 25 | xsltdir = $(pkgdatadir)/xslt 26 | dist_xslt_DATA = \ 27 | xslt/bison.xsl \ 28 | xslt/xml2dot.xsl \ 29 | xslt/xml2text.xsl \ 30 | xslt/xml2xhtml.xsl 31 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/c++-skel.m4: -------------------------------------------------------------------------------- 1 | -*- Autoconf -*- 2 | 3 | # C++ skeleton dispatching for Bison. 4 | 5 | # Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | b4_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])]) 21 | b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])]) 22 | 23 | m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.cc]]) 24 | m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) 25 | 26 | m4_include(b4_used_skeleton) 27 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/c-skel.m4: -------------------------------------------------------------------------------- 1 | -*- Autoconf -*- 2 | 3 | # C skeleton dispatching for Bison. 4 | 5 | # Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | b4_glr_if( [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])]) 21 | b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])]) 22 | 23 | m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[yacc.c]]) 24 | m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) 25 | 26 | m4_include(b4_used_skeleton) 27 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/java-skel.m4: -------------------------------------------------------------------------------- 1 | -*- Autoconf -*- 2 | 3 | # Java skeleton dispatching for Bison. 4 | 5 | # Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | b4_glr_if( [b4_complain([%%glr-parser not supported for Java])]) 21 | b4_nondeterministic_if([b4_complain([%%nondeterministic-parser not supported for Java])]) 22 | 23 | m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.java]]) 24 | m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) 25 | 26 | m4_include(b4_used_skeleton) 27 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/skeletons/c++-skel.m4: -------------------------------------------------------------------------------- 1 | -*- Autoconf -*- 2 | 3 | # C++ skeleton dispatching for Bison. 4 | 5 | # Copyright (C) 2006-2007, 2009-2015, 2018-2020 Free Software 6 | # Foundation, Inc. 7 | 8 | # This program is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | b4_glr_if( [m4_define([b4_used_skeleton], [b4_skeletonsdir/[glr.cc]])]) 22 | b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_skeletonsdir/[glr.cc]])]) 23 | 24 | m4_define_default([b4_used_skeleton], [b4_skeletonsdir/[lalr1.cc]]) 25 | m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) 26 | 27 | m4_include(b4_used_skeleton) 28 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/skeletons/c-skel.m4: -------------------------------------------------------------------------------- 1 | -*- Autoconf -*- 2 | 3 | # C skeleton dispatching for Bison. 4 | 5 | # Copyright (C) 2006-2007, 2009-2015, 2018-2020 Free Software 6 | # Foundation, Inc. 7 | 8 | # This program is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | b4_glr_if( [m4_define([b4_used_skeleton], [b4_skeletonsdir/[glr.c]])]) 22 | b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_skeletonsdir/[glr.c]])]) 23 | 24 | m4_define_default([b4_used_skeleton], [b4_skeletonsdir/[yacc.c]]) 25 | m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) 26 | 27 | m4_include(b4_used_skeleton) 28 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/skeletons/d-skel.m4: -------------------------------------------------------------------------------- 1 | -*- Autoconf -*- 2 | 3 | # D skeleton dispatching for Bison. 4 | 5 | # Copyright (C) 2018-2020 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | b4_glr_if( [b4_complain([%%glr-parser not supported for D])]) 21 | b4_nondeterministic_if([b4_complain([%%nondeterministic-parser not supported for D])]) 22 | 23 | m4_define_default([b4_used_skeleton], [b4_skeletonsdir/[lalr1.d]]) 24 | m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) 25 | 26 | m4_include(b4_used_skeleton) 27 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/skeletons/java-skel.m4: -------------------------------------------------------------------------------- 1 | -*- Autoconf -*- 2 | 3 | # Java skeleton dispatching for Bison. 4 | 5 | # Copyright (C) 2007, 2009-2015, 2018-2020 Free Software Foundation, 6 | # Inc. 7 | 8 | # This program is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | b4_glr_if( [b4_complain([%%glr-parser not supported for Java])]) 22 | b4_nondeterministic_if([b4_complain([%%nondeterministic-parser not supported for Java])]) 23 | 24 | m4_define_default([b4_used_skeleton], [b4_skeletonsdir/[lalr1.java]]) 25 | m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"]) 26 | 27 | m4_include(b4_used_skeleton) 28 | -------------------------------------------------------------------------------- /External/win_flex_bison/data/skeletons/traceon.m4: -------------------------------------------------------------------------------- 1 | dnl GNU M4 treats -dV in a position-independent manner. 2 | m4_debugmode(V)m4_traceon()dnl 3 | -------------------------------------------------------------------------------- /External/win_flex_bison/snazzle.l: -------------------------------------------------------------------------------- 1 | %{ 2 | #include 3 | using namespace std; 4 | #define YY_DECL extern "C" int yylex() 5 | %} 6 | %% 7 | [ \t\n] ; 8 | [0-9]+\.[0-9]+ { cout << "Found a floating-point number:" << yytext << endl; } 9 | [0-9]+ { cout << "Found an integer:" << yytext << endl; } 10 | [a-zA-Z0-9]+ { cout << "Found a string: " << yytext << endl; } 11 | %% 12 | main() { 13 | // lex through the input: 14 | yylex(); 15 | } -------------------------------------------------------------------------------- /External/win_flex_bison/win_bison.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/win_flex_bison/win_bison.exe -------------------------------------------------------------------------------- /External/win_flex_bison/win_flex.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/External/win_flex_bison/win_flex.exe -------------------------------------------------------------------------------- /GLES/Buffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Platform/GLES/Export.h" 4 | #include "Platform/CrossPlatform/Buffer.h" 5 | #include 6 | 7 | #ifdef _MSC_VER 8 | #pragma warning(push) 9 | #pragma warning(disable:4251) 10 | #endif 11 | 12 | namespace simul 13 | { 14 | namespace gles 15 | { 16 | //! GLES buffer (vertex/index) implementation 17 | class SIMUL_GLES_EXPORT Buffer:public simul::crossplatform::Buffer 18 | { 19 | public: 20 | Buffer(); 21 | ~Buffer() override; 22 | void InvalidateDeviceObjects() override; 23 | GLuint AsGLuint() override; 24 | void EnsureVertexBuffer(crossplatform::RenderPlatform* renderPlatform,int num_vertices,const crossplatform::Layout* layout,const void* data,bool cpu_access=false,bool streamout_target=false) override; 25 | void EnsureIndexBuffer(crossplatform::RenderPlatform* renderPlatform,int num_indices,int index_size_bytes,const void *data) override; 26 | void* Map(crossplatform::DeviceContext& deviceContext) override; 27 | void Unmap(crossplatform::DeviceContext& deviceContext) override; 28 | 29 | void BindVBO(crossplatform::DeviceContext& deviceContext); 30 | 31 | private: 32 | GLuint mBufferID; 33 | crossplatform::Layout* mBufferLayout; 34 | }; 35 | } 36 | }; 37 | 38 | #ifdef _MSC_VER 39 | #pragma warning(pop) 40 | #endif 41 | -------------------------------------------------------------------------------- /GLES/Export.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Platform/Core/DebugMemory.h" 4 | 5 | #if defined(_MSC_VER) 6 | // Microsoft 7 | #define SIMUL_EXPORT __declspec(dllexport) 8 | #define SIMUL_IMPORT __declspec(dllimport) 9 | #elif defined(__GNUC__) 10 | // GCC or Clang 11 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 12 | #define SIMUL_IMPORT 13 | #else 14 | // do nothing and hope for the best? 15 | #define SIMUL_EXPORT 16 | #define SIMUL_IMPORT 17 | #pragma warning Unknown dynamic link import/export semantics. 18 | #endif 19 | 20 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 21 | // In this lib: 22 | #if !defined(SIMUL_GLES_DLL) 23 | // If we're building dll libraries but not in this library IMPORT the classes 24 | #define SIMUL_GLES_EXPORT SIMUL_IMPORT 25 | #else 26 | // In ALL OTHER CASES we EXPORT the classes! 27 | #define SIMUL_GLES_EXPORT SIMUL_EXPORT 28 | #endif 29 | #else 30 | #define SIMUL_GLES_EXPORT 31 | #endif 32 | 33 | #ifdef _MSC_VER 34 | #define SIMUL_GLES_EXPORT_FN SIMUL_GLES_EXPORT __cdecl 35 | #else 36 | #define SIMUL_GLES_EXPORT_FN SIMUL_GLES_EXPORT 37 | #endif 38 | 39 | #define SIMUL_GLES_EXPORT_CLASS class SIMUL_GLES_EXPORT 40 | #define SIMUL_GLES_EXPORT_STRUCT struct SIMUL_GLES_EXPORT 41 | -------------------------------------------------------------------------------- /GLES/Layout.cpp: -------------------------------------------------------------------------------- 1 | #include "Layout.h" 2 | #include "RenderPlatform.h" 3 | 4 | using namespace simul; 5 | using namespace gles; 6 | 7 | Layout::Layout() 8 | { 9 | } 10 | 11 | Layout::~Layout() 12 | { 13 | InvalidateDeviceObjects(); 14 | } 15 | 16 | void Layout::InvalidateDeviceObjects() 17 | { 18 | } 19 | 20 | void Layout::Apply(crossplatform::DeviceContext& deviceContext) 21 | { 22 | } 23 | 24 | void Layout::Unapply(crossplatform::DeviceContext& deviceContext) 25 | { 26 | } -------------------------------------------------------------------------------- /GLES/Layout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Export.h" 3 | #include "Platform/CrossPlatform/Layout.h" 4 | 5 | 6 | namespace simul 7 | { 8 | namespace gles 9 | { 10 | //! Holds current vertex buffer layout information: 11 | class Layout:public crossplatform::Layout 12 | { 13 | public: 14 | Layout(); 15 | virtual ~Layout(); 16 | void InvalidateDeviceObjects(); 17 | void Apply(crossplatform::DeviceContext& deviceContext); 18 | void Unapply(crossplatform::DeviceContext& deviceContext); 19 | }; 20 | } 21 | } -------------------------------------------------------------------------------- /GLES/Light.cpp: -------------------------------------------------------------------------------- 1 | #include "Light.h" 2 | 3 | using namespace simul; 4 | 5 | gles::Light::Light() 6 | { 7 | mLightIndex = 0; 8 | } 9 | 10 | gles::Light::~Light() 11 | { 12 | } 13 | 14 | void gles::Light::UpdateLight(const double * /*lLightGlobalPosition*/,float lConeAngle,const float lLightColor[4]) const 15 | { 16 | } -------------------------------------------------------------------------------- /GLES/Light.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef GLES_LIGHT_H 4 | #define GLES_LIGHT_H 5 | 6 | #include "Export.h" 7 | #include "Platform/CrossPlatform/Light.h" 8 | 9 | 10 | namespace simul 11 | { 12 | namespace gles 13 | { 14 | class SIMUL_GLES_EXPORT Light:public crossplatform::Light 15 | { 16 | public: 17 | Light(); 18 | ~Light(); 19 | void UpdateLight(const double *mat,float lConeAngle,const float lLightColor[4]) const; 20 | protected: 21 | GLuint mLightIndex; 22 | }; 23 | } 24 | } 25 | #endif -------------------------------------------------------------------------------- /GLES/Mesh.cpp: -------------------------------------------------------------------------------- 1 | #include "Mesh.h" 2 | 3 | using namespace simul; 4 | using namespace gles; 5 | 6 | Mesh::Mesh(crossplatform::RenderPlatform*r) :crossplatform::Mesh(r) 7 | { 8 | } 9 | 10 | Mesh::~Mesh() 11 | { 12 | } 13 | 14 | bool Mesh::Initialize(crossplatform::RenderPlatform *,int lPolygonVertexCount,const float *lVertices,const float *lNormals,const float *lUVs,int lPolygonCount,const unsigned int *lIndices) 15 | { 16 | return true; 17 | } 18 | 19 | bool Mesh::Initialize(const std::vector &vertices,const std::vector &indices) 20 | { 21 | return true; 22 | } 23 | 24 | void Mesh::UpdateVertexPositions(int lVertexCount, float *lVertices) const 25 | { 26 | } 27 | 28 | void Mesh::BeginDraw(crossplatform::DeviceContext &,crossplatform::ShadingMode pShadingMode) const 29 | { 30 | } 31 | 32 | void Mesh::Draw(crossplatform::DeviceContext &deviceContext,int pMaterialIndex,crossplatform::ShadingMode pShadingMode) const 33 | { 34 | } 35 | 36 | void Mesh::EndDraw(crossplatform::DeviceContext &) const 37 | { 38 | } -------------------------------------------------------------------------------- /GLES/OpenGLCallbackInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef HANDLEMOUSEINTERFACE 2 | #define HANDLEMOUSEINTERFACE 3 | class HandleMouseInterface 4 | { 5 | public: 6 | virtual void mouseRelease(int button,int x,int y)=0; 7 | virtual void mousePress(int button,int x,int y)=0; 8 | virtual void mouseDoubleClick(int button,int x,int y)=0; 9 | virtual void mouseMove(int x,int y)=0; 10 | virtual void mouseWheel(int delta)=0; 11 | virtual void KeyboardProc(unsigned int nChar, bool bKeyDown, bool bAltDown)=0; 12 | }; 13 | #endif 14 | 15 | #ifndef GLESCALLBACKINTERFACE_H 16 | #define GLESCALLBACKINTERFACE_H 17 | class OpenGLCallbackInterface 18 | { 19 | public: 20 | //! Add a view. This tells the renderer to create any internal stuff it needs to handle a viewport, so that it is ready when Render() is called. It returns an identifier for that view. 21 | virtual int AddGLView()=0; 22 | virtual void RenderGL(int)=0; 23 | virtual void ResizeGL(int,int,int)=0; 24 | virtual void InitializeGL()=0; 25 | virtual void ShutdownGL()=0; 26 | }; 27 | #endif -------------------------------------------------------------------------------- /GLES/Profiler.cpp: -------------------------------------------------------------------------------- 1 | #include "Profiler.h" 2 | 3 | using namespace simul; 4 | using namespace gles; 5 | 6 | Profiler::~Profiler() 7 | { 8 | 9 | } 10 | 11 | void Profiler::Begin(crossplatform::DeviceContext& deviceContext, const char* name) 12 | { 13 | crossplatform::GpuProfiler::Begin(deviceContext, name); 14 | } 15 | 16 | void Profiler::End(crossplatform::DeviceContext& deviceContext) 17 | { 18 | crossplatform::GpuProfiler::End(deviceContext); 19 | } 20 | 21 | void Profiler::StartFrame(crossplatform::DeviceContext& deviceContext) 22 | { 23 | crossplatform::GpuProfiler::StartFrame(deviceContext); 24 | } 25 | 26 | void Profiler::EndFrame(crossplatform::DeviceContext& deviceContext) 27 | { 28 | crossplatform::GpuProfiler::EndFrame(deviceContext); 29 | } -------------------------------------------------------------------------------- /GLES/Profiler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/GLES/Export.h" 3 | #include "Platform/Core/Timer.h" 4 | #include "Platform/CrossPlatform/GpuProfiler.h" 5 | #ifdef _MSC_VER 6 | #pragma warning(disable:4251) 7 | #endif 8 | namespace simul 9 | { 10 | namespace gles 11 | { 12 | struct ProfilingQuery 13 | { 14 | ProfilingQuery() :timestamp(NULL) {} 15 | ~ProfilingQuery() {} 16 | unsigned long* timestamp; 17 | }; 18 | 19 | class SIMUL_GLES_EXPORT Profiler: public simul::crossplatform::GpuProfiler 20 | { 21 | public: 22 | static Profiler& GetGlobalProfiler(); 23 | ~Profiler(); 24 | 25 | void Begin(crossplatform::DeviceContext& deviceContext,const char* name); 26 | void End(crossplatform::DeviceContext& deviceContext); 27 | 28 | void StartFrame(crossplatform::DeviceContext& deviceContext); 29 | void EndFrame(crossplatform::DeviceContext& deviceContext); 30 | }; 31 | } 32 | } -------------------------------------------------------------------------------- /ImGui/Export.h: -------------------------------------------------------------------------------- 1 | #ifndef PLATFORM_IMGUI_EXPORT_H 2 | #define PLATFORM_IMGUI_EXPORT_H 3 | 4 | #if defined(_MSC_VER) 5 | // Microsoft 6 | #define SIMUL_EXPORT __declspec(dllexport) 7 | #define SIMUL_IMPORT __declspec(dllimport) 8 | #elif defined(__GNUC__) 9 | // GCC or Clang 10 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 11 | #define SIMUL_IMPORT 12 | #else 13 | // do nothing and hope for the best? 14 | #define SIMUL_EXPORT 15 | #define SIMUL_IMPORT 16 | #pragma warning Unknown dynamic link import/export semantics. 17 | #endif 18 | 19 | 20 | 21 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 22 | // In this lib: 23 | #if !defined(PLATFORM_IMGUI_DLL) 24 | // If we're building dll libraries but not in this library IMPORT the classes 25 | #define PLATFORM_IMGUI_EXPORT SIMUL_IMPORT 26 | #else 27 | // In ALL OTHER CASES we EXPORT the classes! 28 | #define PLATFORM_IMGUI_EXPORT SIMUL_EXPORT 29 | #endif 30 | #else 31 | #define PLATFORM_IMGUI_EXPORT 32 | #endif 33 | 34 | #ifdef _MSC_VER 35 | #define PLATFORM_IMGUI_EXPORT_FN PLATFORM_IMGUI_EXPORT __cdecl 36 | #else 37 | #define PLATFORM_IMGUI_EXPORT_FN PLATFORM_IMGUI_EXPORT 38 | #endif 39 | #define PLATFORM_IMGUI_EXPORT_CLASS class PLATFORM_IMGUI_EXPORT 40 | #define PLATFORM_IMGUI_EXPORT_STRUCT struct PLATFORM_IMGUI_EXPORT 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ImGui/addons/imguidatetime/Source.txt: -------------------------------------------------------------------------------- 1 | https://github.com/Flix01/imgui -------------------------------------------------------------------------------- /Linux/ThisPlatform/StringFunctions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(UNIX) || defined(__linux__) || defined(__ANDROID__) 4 | #include 5 | #define _strcpy(d,n,s) (strncpy(d,s,n)) 6 | #define strcpy_s(d, n, s) (strncpy(d,s,n)); 7 | 8 | template 9 | constexpr size_t _countof(T(&array)[SizeOfArray]) { return SizeOfArray; } 10 | #endif -------------------------------------------------------------------------------- /Linux/ThisPlatform/Threads.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #define THREAD_TYPE pthread_t 7 | #include 8 | #include 9 | 10 | inline void SetThreadName(std::thread &thread,const char *name) 11 | { 12 | pthread_setname_np(thread.native_handle(), name); 13 | } 14 | inline void SetThisThreadName(const char *name) 15 | { 16 | prctl(PR_SET_NAME, (long)name, 0, 0, 0); 17 | } 18 | 19 | inline void SetThreadPriority(std::thread &thread,int p) 20 | { 21 | sched_param sch_params; 22 | switch(p) 23 | { 24 | case -2: 25 | sch_params.sched_priority = 1; 26 | break; 27 | case -1: 28 | sch_params.sched_priority = 25; 29 | break; 30 | case 0: 31 | sch_params.sched_priority = 50; 32 | break; 33 | case 1: 34 | sch_params.sched_priority = 75; 35 | break; 36 | case 2: 37 | sch_params.sched_priority = 99; 38 | break; 39 | default: 40 | sch_params.sched_priority = 50; 41 | break; 42 | } 43 | pthread_setschedparam(thread.native_handle(), SCHED_RR, &sch_params); 44 | } 45 | 46 | inline int fopen_s(FILE** pFile, const char *filename, const char *mode) 47 | { 48 | *pFile = fopen(filename, mode); 49 | return errno; 50 | } 51 | 52 | inline int fdopen_s(FILE** pFile, int fildes, const char *mode) 53 | { 54 | *pFile = fdopen(fildes, mode); 55 | return errno; 56 | } -------------------------------------------------------------------------------- /Math/Align.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_ALIGN_H 2 | #define SIMUL_ALIGN_H 3 | #define CANNOT_ALIGN 4 | 5 | #if !defined(DOXYGEN) && !defined(__GNUC__) 6 | #define ALIGN16 _declspec(align(16)) 7 | #else 8 | #define ALIGN16 9 | #endif 10 | #endif 11 | -------------------------------------------------------------------------------- /Math/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | file(GLOB SOURCES 4 | "*.cpp" 5 | ) 6 | 7 | file(GLOB HEADERS 8 | "*.h" 9 | ) 10 | 11 | add_static_library( SimulMath SOURCES ${SOURCES} ${HEADERS} FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX}) 12 | 13 | 14 | 15 | if (SIMUL_DLL_SDK_LIBRARY) 16 | AddDLLCompileDefinitions( SimulMath${STATIC_LINK_SUFFIX} ) 17 | endif() -------------------------------------------------------------------------------- /Math/Decay.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_MATH_DECAY_H 2 | #define SIMUL_MATH_DECAY_H 3 | 4 | namespace platform 5 | { 6 | namespace math 7 | { 8 | //! Apply a first-order decay to a float variable, based on the timestep dt. 9 | inline void FirstOrderDecay(float &variable,float target,float rate,float dt) 10 | { 11 | float mix=1.f-1.f/(1.f+dt*rate); 12 | variable*=1.f-mix; 13 | variable+=mix*target; 14 | } 15 | template void Decay(T &variable,const T &target,float rate,float dt) 16 | { 17 | float mix=1.f-1.f/(1.f+dt*rate); 18 | variable*=1.f-mix; 19 | variable+=mix*target; 20 | } 21 | } 22 | } 23 | 24 | #endif -------------------------------------------------------------------------------- /Math/Export.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(_MSC_VER) 4 | // Microsoft 5 | #define SIMUL_EXPORT __declspec(dllexport) 6 | #define SIMUL_IMPORT __declspec(dllimport) 7 | #elif defined(__GNUC__) 8 | // GCC or Clang 9 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 10 | #define SIMUL_IMPORT 11 | #else 12 | // do nothing and hope for the best? 13 | #define SIMUL_EXPORT 14 | #define SIMUL_IMPORT 15 | #pragma warning Unknown dynamic link import/export semantics. 16 | #endif 17 | 18 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 19 | // In this lib: 20 | #if !defined(SIMUL_MATH_DLL) 21 | // If we're building dll libraries but not in this library IMPORT the classes 22 | #define SIMUL_MATH_EXPORT SIMUL_IMPORT 23 | #else 24 | // In ALL OTHER CASES we EXPORT the classes! 25 | #define SIMUL_MATH_EXPORT SIMUL_EXPORT 26 | #endif 27 | #else 28 | #define SIMUL_MATH_EXPORT 29 | #endif 30 | 31 | 32 | #if defined(_MSC_VER) && !defined(DOXYGEN) 33 | #define SIMUL_MATH_EXPORT_FN SIMUL_MATH_EXPORT __cdecl 34 | #else 35 | #define SIMUL_MATH_EXPORT_FN SIMUL_MATH_EXPORT 36 | #endif 37 | #define SIMUL_MATH_EXPORT_CLASS class SIMUL_MATH_EXPORT 38 | #define SIMUL_MATH_EXPORT_STRUCT struct SIMUL_MATH_EXPORT 39 | -------------------------------------------------------------------------------- /Math/Finite.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | namespace platform 4 | { 5 | namespace math 6 | { 7 | inline bool is_finite(float f) 8 | { 9 | #ifdef _MSC_VER 10 | if(_isnan(f)||!_finite(f)) 11 | #else 12 | if(isnan(f)||std::isinf(f)) 13 | #endif 14 | return false; 15 | return true; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Math/Float16.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Export.h" 3 | 4 | namespace platform 5 | { 6 | namespace math 7 | { 8 | union FP32 9 | { 10 | unsigned int u; 11 | float f; 12 | struct 13 | { 14 | unsigned int Mantissa : 23; 15 | unsigned int Exponent : 8; 16 | unsigned int Sign : 1; 17 | }; 18 | }; 19 | 20 | union FP16 21 | { 22 | unsigned short u; 23 | struct 24 | { 25 | unsigned int Mantissa : 10; 26 | unsigned int Exponent : 5; 27 | unsigned int Sign : 1; 28 | }; 29 | }; 30 | 31 | extern unsigned short SIMUL_MATH_EXPORT_FN ToFloat16(float f); 32 | extern float SIMUL_MATH_EXPORT_FN ToFloat32(unsigned short u); 33 | } 34 | } -------------------------------------------------------------------------------- /Math/GeometricFunctions.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Math/GeometricFunctions.cpp -------------------------------------------------------------------------------- /Math/GeometricFunctions.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_MATH_GEOMETRICFUNCTIONS_H 2 | #define SIMUL_MATH_GEOMETRICFUNCTIONS_H 3 | #include "Export.h" 4 | namespace platform 5 | { 6 | namespace math 7 | { 8 | class Vector3; 9 | extern void SIMUL_MATH_EXPORT_FN SupportPoint(float *PointsX,float *PointsY,float *PointsZ,const Vector3 &D,int NumPoints,Vector3 &X1,int &i1); 10 | } 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Math/Math.cpp: -------------------------------------------------------------------------------- 1 | namespace platform 2 | { 3 | //! The namespace corresponding to the Math module. 4 | 5 | //! Math is the mathematics library for Simul. It contains Vector, Matrix and 6 | //! Quaternion classes, vector-matrix, vector-quat and matrix-quat functions, 7 | //! and some low-level maths functions. 8 | //! 9 | //! Static library: (BUILD FOLDER)/lib/(ConfigurationName)/Core_(RUNTIME).lib 10 | //! 11 | //! Dynamic library: (BUILD FOLDER)/bin/ConfigurationName)/Core_(RUNTIME).dll 12 | //! 13 | //! The Math library depends on the Simul/Base library. 14 | namespace math 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Math/MathFunctions.cpp: -------------------------------------------------------------------------------- 1 | #define SIM_MATH 2 | #include "MathFunctions.h" 3 | #include 4 | #include 5 | 6 | namespace platform 7 | { 8 | namespace math 9 | { 10 | float Sine(float x) 11 | { 12 | return sinf(x); 13 | } 14 | 15 | float Cosine(float x) 16 | { 17 | return (float)cos(x); 18 | } 19 | 20 | float InverseTangent(float y,float x) 21 | { 22 | return (float)atan2((float)y,(float)x); 23 | } 24 | float InverseCosine(float x) 25 | { 26 | return acosf(x); 27 | } 28 | class BadNumber{}; 29 | float Sqrt(float x) 30 | { 31 | return sqrtf(x); 32 | } 33 | void IntegerPowerOfTen(float num,float &man,int &Exp) 34 | { 35 | if(fabs(num)<1e-8f) 36 | num=1; 37 | float expf=logf(num); 38 | expf/=logf(10.f); 39 | if(expf>=0) 40 | Exp=(int)(expf+0.5f); 41 | else 42 | Exp=(int)(expf-0.5f); 43 | float powr=powf(10.f,(float)Exp); 44 | man=num/powr; 45 | 46 | } 47 | void PowerOfTen(float num,float &Exp) 48 | { 49 | if(fabs(num)<1e-8f) 50 | num=1.f; 51 | Exp=(float)log(num); 52 | Exp/=(float)log(10.f); 53 | } 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Math/MatrixVector.h: -------------------------------------------------------------------------------- 1 | #ifndef MatrixVectorH 2 | #define MatrixVectorH 3 | 4 | #endif 5 | -------------------------------------------------------------------------------- /Math/MatrixVector3.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Math/MatrixVector3.inl -------------------------------------------------------------------------------- /Math/Noise1D.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_MATH_NOISE1D_H 2 | #define SIMUL_MATH_NOISE1D_H 3 | #include "Platform/Math/Export.h" 4 | #include "Platform/Math/Noise3D.h" 5 | 6 | namespace platform 7 | { 8 | namespace math 9 | { 10 | //! A 1D Perlin noise class. 11 | class SIMUL_MATH_EXPORT Noise1D 12 | { 13 | unsigned frequency; 14 | float *noise_buffer; 15 | float value_at(unsigned i) const; 16 | float noise1(float p) const; 17 | int numOctaves; 18 | float persistence; 19 | NoiseFilter *filter; 20 | unsigned buffer_size; 21 | platform::core::MemoryInterface *memoryInterface; 22 | RandomNumberGenerator *noise_random; 23 | int generation_number; 24 | public: 25 | Noise1D(platform::core::MemoryInterface *mem=NULL); 26 | virtual ~Noise1D(); 27 | //! Define the grid of pseudo-random numbers to be used in the PerlinNoise3D function. The parameter freq is the 28 | //! frequency, or grid-size. 29 | void Setup(unsigned freq,int RandomSeed,int octaves,float persistence=.5f); 30 | int GetNoiseFrequency() const; 31 | float PerlinNoise1D(float x) const; 32 | void SetFilter(NoiseFilter *nf); 33 | // MemoryUsageInterface 34 | virtual unsigned GetMemoryUsage() const; 35 | virtual int GetGenerationNumber() const 36 | { 37 | return generation_number; 38 | } 39 | }; 40 | } 41 | } 42 | 43 | #endif // NOISE_H 44 | -------------------------------------------------------------------------------- /Math/OrientationInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_META_ORIENTATION_INTERFACE_H 2 | #define SIMUL_META_ORIENTATION_INTERFACE_H 3 | namespace platform 4 | { 5 | namespace math 6 | { 7 | class OrientationOutputInterface 8 | { 9 | public: 10 | virtual const float *GetOrientationAsPermanentMatrix() const=0; //! Permanent: this means that for as long as the interface exists, the address is valid. 11 | virtual const float *GetRotationAsQuaternion() const=0; 12 | virtual const float *GetPosition() const=0; 13 | }; 14 | class OrientationInterface:public OrientationOutputInterface 15 | { 16 | public: 17 | virtual void SetOrientationAsMatrix(const float *)=0; 18 | virtual void SetOrientationAsQuaternion(const float *)=0; 19 | virtual void SetPosition(const float *)=0; 20 | virtual void SetPositionAsXYZ(float,float,float)=0; 21 | virtual void Move(const float *)=0; 22 | virtual void LocalMove(const float *)=0; 23 | virtual void Rotate(float,const float *)=0; 24 | }; 25 | } 26 | } 27 | #endif -------------------------------------------------------------------------------- /Math/Pi.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_PI_H 2 | #define SIMUL_PI_H 3 | //! This may not be included before windows.h or gl.h as it defines as a constant 4 | //! something that these headers use as a variable name! 5 | #define SIMUL_PI_F (3.1415926536f) 6 | #define SIMUL_PI_D (3.1415926535897932384626433832795) 7 | #define SIMUL_SQRT_2_D (1.4142135623730950488016887242097) 8 | #define SIMUL_PI_OVER_180 (3.1415926535897932384626433832795/180.0) 9 | #define SIMUL_RAD_TO_DEG (180.0/3.1415926535897932384626433832795) 10 | #define SIMUL_RAD_TO_DEGF (180.0f/3.1415926535897932384626433832795f) 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Math/PointerList.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Math/PointerList.cpp -------------------------------------------------------------------------------- /Math/PowerOfTwo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/Core/RuntimeError.h" 3 | 4 | namespace platform 5 | { 6 | namespace math 7 | { 8 | bool IsPowerOfTwo(uint64_t n) 9 | { 10 | return ((n & (n - 1)) == 0 && (n) != 0); 11 | } 12 | 13 | uint64_t NextMultiple(uint64_t value, uint64_t multiple) 14 | { 15 | SIMUL_ASSERT(IsPowerOfTwo(multiple)); 16 | 17 | return (value + multiple - 1) & ~(multiple - 1); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Math/RandomNumberGenerator.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMULMATH_RANDOMNUMBERGENERATOR_H 2 | #define SIMULMATH_RANDOMNUMBERGENERATOR_H 3 | #include "Platform/Math/Export.h" 4 | #include "Platform/Core/MemoryInterface.h" 5 | namespace platform 6 | { 7 | namespace math 8 | { 9 | class SIMUL_MATH_EXPORT RandomNumberGenerator 10 | { 11 | void *gnr; 12 | int last_seed; 13 | public: 14 | RandomNumberGenerator(platform::core::MemoryInterface *mem=NULL); 15 | virtual ~RandomNumberGenerator(); 16 | void Seed(int RandomSeed); 17 | int GetSeed() const; 18 | float FRand(float minval=0.f,float maxval=1.f) const; 19 | unsigned URand(unsigned maximum) const; 20 | int IRand(int maximum) const; 21 | void RandomDirection(float &x,float &y,float &z); 22 | void SphericalRandom(float &x,float &y,float &z); 23 | void RandomAngle(float &az,float &el); 24 | platform::core::MemoryInterface *memoryInterface; 25 | }; 26 | } 27 | } 28 | 29 | #endif // NOISE_H 30 | -------------------------------------------------------------------------------- /Math/Vector3.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Math/Vector3.inl -------------------------------------------------------------------------------- /Math/afxres.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Math/afxres.h -------------------------------------------------------------------------------- /Math/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Math.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /OpenGL/Buffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Platform/OpenGL/Export.h" 4 | #include "Platform/CrossPlatform/Buffer.h" 5 | #include "glad/glad.h" 6 | 7 | #ifdef _MSC_VER 8 | #pragma warning(push) 9 | #pragma warning(disable:4251) 10 | #endif 11 | 12 | namespace platform 13 | { 14 | namespace opengl 15 | { 16 | //! OpenGL buffer (vertex/index) implementation 17 | class SIMUL_OPENGL_EXPORT Buffer:public platform::crossplatform::Buffer 18 | { 19 | public: 20 | Buffer(); 21 | ~Buffer() override; 22 | void InvalidateDeviceObjects() override; 23 | GLuint AsGLuint() override; 24 | void EnsureVertexBuffer(crossplatform::RenderPlatform* renderPlatform,int num_vertices,int structSize,std::shared_ptr> data,bool cpu_access=false,bool streamout_target=false) override; 25 | void EnsureIndexBuffer(crossplatform::RenderPlatform* renderPlatform,int num_indices,int index_size_bytes,std::shared_ptr> data, bool cpu_access = false) override; 26 | void* Map(crossplatform::DeviceContext& deviceContext) override; 27 | void Unmap(crossplatform::DeviceContext& deviceContext) override; 28 | 29 | void BindVBO(crossplatform::DeviceContext& deviceContext, const crossplatform::Layout* layout); 30 | 31 | private: 32 | GLuint mBufferID; 33 | crossplatform::Layout* mBufferLayout; 34 | }; 35 | } 36 | }; 37 | 38 | #ifdef _MSC_VER 39 | #pragma warning(pop) 40 | #endif 41 | -------------------------------------------------------------------------------- /OpenGL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12) 2 | 3 | file(GLOB CMAKE 4 | "*.cmake" 5 | ) 6 | 7 | file(GLOB SOURCES 8 | "*.cpp" "glad.c" 9 | ) 10 | 11 | file(GLOB HEADERS 12 | "*.h" 13 | ) 14 | 15 | file(GLOB SHADERS 16 | "${SIMUL_PLATFORM_DIR}/OpenGL/Sfx/*.sfx" 17 | ) 18 | file(GLOB SHADER_INCLUDES 19 | "${SIMUL_PLATFORM_DIR}/OpenGL/Sfx/*.sl" 20 | ) 21 | file(GLOB SHADER_DEFS 22 | "${SIMUL_PLATFORM_DIR}/OpenGL/Sfx/*.json" 23 | ) 24 | 25 | source_group("Shaders" FILES ${SHADERS} ) 26 | source_group("Shader Includes" FILES ${SHADER_INCLUDES} ) 27 | 28 | add_static_library(SimulOpenGL SOURCES ${SOURCES} ${HEADERS} ${SHADERS} ${SHADER_INCLUDES} ${SHADER_DEFS} FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX}) 29 | if(SIMUL_SOURCE_BUILD) 30 | target_include_directories(SimulOpenGL${STATIC_LINK_SUFFIX} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../External/stb") 31 | target_include_directories(SimulOpenGL${STATIC_LINK_SUFFIX} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../OpenGL") 32 | target_include_directories(SimulOpenGL${STATIC_LINK_SUFFIX} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../External/glfw/include") 33 | 34 | set( JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Sfx/OpenGL.json" ) 35 | endif() 36 | 37 | if (SIMUL_DLL_SDK_LIBRARY) 38 | AddDLLCompileDefinitions( SimulOpenGL${STATIC_LINK_SUFFIX} ) 39 | endif() 40 | -------------------------------------------------------------------------------- /OpenGL/Export.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMUL_OPENGL_EXPORT_H 2 | #define SIMUL_OPENGL_EXPORT_H 3 | 4 | #include "Platform/Core/DebugMemory.h" 5 | 6 | #if defined(_MSC_VER) 7 | // Microsoft 8 | #define SIMUL_EXPORT __declspec(dllexport) 9 | #define SIMUL_IMPORT __declspec(dllimport) 10 | #elif defined(__GNUC__) 11 | // GCC or Clang 12 | #define SIMUL_EXPORT __attribute__((visibility("default"))) 13 | #define SIMUL_IMPORT 14 | #else 15 | // do nothing and hope for the best? 16 | #define SIMUL_EXPORT 17 | #define SIMUL_IMPORT 18 | #pragma warning Unknown dynamic link import/export semantics. 19 | #endif 20 | 21 | #if defined(SIMUL_DYNAMIC_LINK) && !defined(DOXYGEN) 22 | // In this lib: 23 | #if !defined(SIMUL_OPENGL_DLL) 24 | // If we're building dll libraries but not in this library IMPORT the classes 25 | #define SIMUL_OPENGL_EXPORT SIMUL_IMPORT 26 | #else 27 | // In ALL OTHER CASES we EXPORT the classes! 28 | #define SIMUL_OPENGL_EXPORT SIMUL_EXPORT 29 | #endif 30 | #else 31 | #define SIMUL_OPENGL_EXPORT 32 | #endif 33 | 34 | #ifdef _MSC_VER 35 | #define SIMUL_OPENGL_EXPORT_FN SIMUL_OPENGL_EXPORT __cdecl 36 | #else 37 | #define SIMUL_OPENGL_EXPORT_FN SIMUL_OPENGL_EXPORT 38 | #endif 39 | 40 | #define SIMUL_OPENGL_EXPORT_CLASS class SIMUL_OPENGL_EXPORT 41 | #define SIMUL_OPENGL_EXPORT_STRUCT struct SIMUL_OPENGL_EXPORT 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /OpenGL/Layout.cpp: -------------------------------------------------------------------------------- 1 | #include "Layout.h" 2 | #include "RenderPlatform.h" 3 | 4 | using namespace platform; 5 | using namespace opengl; 6 | 7 | Layout::Layout() 8 | { 9 | } 10 | 11 | Layout::~Layout() 12 | { 13 | InvalidateDeviceObjects(); 14 | } 15 | 16 | void Layout::InvalidateDeviceObjects() 17 | { 18 | } 19 | 20 | void Layout::Apply(crossplatform::DeviceContext& deviceContext) 21 | { 22 | } 23 | 24 | void Layout::Unapply(crossplatform::DeviceContext& deviceContext) 25 | { 26 | } -------------------------------------------------------------------------------- /OpenGL/Layout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Export.h" 3 | #include "Platform/CrossPlatform/Layout.h" 4 | #include "glad/glad.h" 5 | 6 | namespace platform 7 | { 8 | namespace opengl 9 | { 10 | //! Holds current vertex buffer layout information: 11 | class Layout:public crossplatform::Layout 12 | { 13 | public: 14 | Layout(); 15 | virtual ~Layout(); 16 | void InvalidateDeviceObjects(); 17 | void Apply(crossplatform::DeviceContext& deviceContext); 18 | void Unapply(crossplatform::DeviceContext& deviceContext); 19 | }; 20 | } 21 | } -------------------------------------------------------------------------------- /OpenGL/Light.cpp: -------------------------------------------------------------------------------- 1 | #include "Light.h" 2 | 3 | using namespace platform; 4 | 5 | opengl::Light::Light() 6 | { 7 | mLightIndex = 0; 8 | } 9 | 10 | opengl::Light::~Light() 11 | { 12 | } 13 | 14 | void opengl::Light::UpdateLight(const double * /*lLightGlobalPosition*/,float lConeAngle,const float lLightColor[4]) const 15 | { 16 | } -------------------------------------------------------------------------------- /OpenGL/Light.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef OPENGL_LIGHT_H 4 | #define OPENGL_LIGHT_H 5 | 6 | #include "Export.h" 7 | #include "Platform/CrossPlatform/Light.h" 8 | #include "glad/glad.h" 9 | 10 | namespace platform 11 | { 12 | namespace opengl 13 | { 14 | class SIMUL_OPENGL_EXPORT Light:public crossplatform::Light 15 | { 16 | public: 17 | Light(); 18 | ~Light(); 19 | void UpdateLight(const double *mat,float lConeAngle,const float lLightColor[4]) const; 20 | protected: 21 | GLuint mLightIndex; 22 | }; 23 | } 24 | } 25 | #endif -------------------------------------------------------------------------------- /OpenGL/Mesh.cpp: -------------------------------------------------------------------------------- 1 | #include "Mesh.h" 2 | 3 | using namespace platform; 4 | using namespace opengl; 5 | 6 | Mesh::Mesh(crossplatform::RenderPlatform*r) :crossplatform::Mesh(r) 7 | { 8 | } 9 | 10 | Mesh::~Mesh() 11 | { 12 | } 13 | 14 | bool Mesh::Initialize(crossplatform::RenderPlatform *,int lPolygonVertexCount,const float *lVertices,const float *lNormals,const float *lUVs,int lPolygonCount,const unsigned int *lIndices) 15 | { 16 | return true; 17 | } 18 | 19 | bool Mesh::Initialize(const std::vector &vertices,const std::vector &indices) 20 | { 21 | return true; 22 | } 23 | 24 | void Mesh::UpdateVertexPositions(int lVertexCount, float *lVertices) const 25 | { 26 | } 27 | 28 | void Mesh::BeginDraw(crossplatform::DeviceContext &,crossplatform::ShadingMode pShadingMode) const 29 | { 30 | } 31 | 32 | void Mesh::Draw(crossplatform::DeviceContext &deviceContext,int pMaterialIndex,crossplatform::ShadingMode pShadingMode) const 33 | { 34 | } 35 | 36 | void Mesh::EndDraw(crossplatform::DeviceContext &) const 37 | { 38 | } -------------------------------------------------------------------------------- /OpenGL/OpenGLCallbackInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef HANDLEMOUSEINTERFACE 2 | #define HANDLEMOUSEINTERFACE 3 | class HandleMouseInterface 4 | { 5 | public: 6 | virtual void mouseRelease(int button,int x,int y)=0; 7 | virtual void mousePress(int button,int x,int y)=0; 8 | virtual void mouseDoubleClick(int button,int x,int y)=0; 9 | virtual void mouseMove(int x,int y)=0; 10 | virtual void mouseWheel(int delta)=0; 11 | virtual void KeyboardProc(unsigned int nChar, bool bKeyDown, bool bAltDown)=0; 12 | }; 13 | #endif 14 | 15 | #ifndef OPENGLCALLBACKINTERFACE_H 16 | #define OPENGLCALLBACKINTERFACE_H 17 | class OpenGLCallbackInterface 18 | { 19 | public: 20 | //! Add a view. This tells the renderer to create any internal stuff it needs to handle a viewport, so that it is ready when Render() is called. It returns an identifier for that view. 21 | virtual int AddGLView()=0; 22 | virtual void RenderGL(int)=0; 23 | virtual void ResizeGL(int,int,int)=0; 24 | virtual void InitializeGL()=0; 25 | virtual void ShutdownGL()=0; 26 | }; 27 | #endif -------------------------------------------------------------------------------- /OpenGL/Profiler.cpp: -------------------------------------------------------------------------------- 1 | #include "Profiler.h" 2 | 3 | using namespace platform; 4 | using namespace opengl; 5 | 6 | Profiler::~Profiler() 7 | { 8 | 9 | } 10 | 11 | void Profiler::Begin(crossplatform::DeviceContext& deviceContext, const char* name) 12 | { 13 | crossplatform::GpuProfiler::Begin(deviceContext, name); 14 | } 15 | 16 | void Profiler::End(crossplatform::DeviceContext& deviceContext) 17 | { 18 | crossplatform::GpuProfiler::End(deviceContext); 19 | } 20 | 21 | void Profiler::StartFrame(crossplatform::DeviceContext& deviceContext) 22 | { 23 | crossplatform::GpuProfiler::StartFrame(deviceContext); 24 | } 25 | 26 | void Profiler::EndFrame(crossplatform::DeviceContext& deviceContext) 27 | { 28 | crossplatform::GpuProfiler::EndFrame(deviceContext); 29 | } -------------------------------------------------------------------------------- /OpenGL/Profiler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform/OpenGL/Export.h" 3 | #include "Platform/Core/Timer.h" 4 | #include "Platform/CrossPlatform/GpuProfiler.h" 5 | 6 | #pragma warning(disable:4251) 7 | 8 | namespace platform 9 | { 10 | namespace opengl 11 | { 12 | struct ProfilingQuery 13 | { 14 | ProfilingQuery() :timestamp(NULL) {} 15 | ~ProfilingQuery() {} 16 | unsigned long* timestamp; 17 | }; 18 | 19 | class SIMUL_OPENGL_EXPORT Profiler: public platform::crossplatform::GpuProfiler 20 | { 21 | public: 22 | static Profiler& GetGlobalProfiler(); 23 | ~Profiler(); 24 | 25 | void Begin(crossplatform::DeviceContext& deviceContext,const char* name); 26 | void End(crossplatform::DeviceContext& deviceContext); 27 | 28 | void StartFrame(crossplatform::DeviceContext& deviceContext); 29 | void EndFrame(crossplatform::DeviceContext& deviceContext); 30 | }; 31 | } 32 | } -------------------------------------------------------------------------------- /OpenGL/Sfx.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | Midl 4 | CustomBuild 5 | 6 | 7 | _SelectedFiles;$(Sfx_RuleDependsOn) 8 | 9 | 10 | 11 | $(SIMUL)/Tools/bin/Sfx.exe [inputs] [IncludePaths] [OutputPath] [SfxConfig] -m"$(SIMUL)\Platform\OpenGL\shaderbin" [AdditionalOptions] 12 | %(Filename).sfxo 13 | Sfx.exe %(Filename) 14 | 15 | 16 | -------------------------------------------------------------------------------- /OpenGL/UseNvFX.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | $(SIMUL)\External\nvFX\include;$(SIMUL)/..;%(AdditionalIncludeDirectories) 9 | SIMUL_USE_NVFX;SIMUL_DYNAMIC_LINK;%(PreprocessorDefinitions) 10 | 11 | 12 | $(SIMUL)\External\nvFX\lib\$(Configuration);$(SIMUL)/lib/$(Platform)/VC11/$(Configuration) 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Resources/Textures/Font16-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simul/Platform/bda19e4dea502381bb432f166da55c2221cefaef/Resources/Textures/Font16-11.png -------------------------------------------------------------------------------- /Shaders/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | file(GLOB SHADERS 3 | "${CMAKE_CURRENT_SOURCE_DIR}/SFX/*.sfx" 4 | ) 5 | 6 | file(GLOB SHADER_INCLUDES 7 | "${CMAKE_CURRENT_SOURCE_DIR}/SL/*.sl" 8 | ) 9 | if(NOT "${SHADERS}" STREQUAL "") 10 | add_multiplatform_sfx_shader_project( CoreShaders INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/Sfx" 11 | "${CMAKE_CURRENT_SOURCE_DIR}/SL" "${SIMUL_PLATFORM_DIR}/.." 12 | SOURCES ${SHADERS} ${SHADER_INCLUDES} OPTIONS DEFINES VULKAN_SDK=${VULKAN_SDK_DIR} 13 | OUTPUT "${CMAKE_BINARY_DIR}/shaderbin/$PLATFORM_NAME" FOLDER ${SIMUL_PLATFORM_FOLDER_PREFIX}/Shaders) 14 | endif() -------------------------------------------------------------------------------- /Vulkan/Allocation.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "vk_mem_alloc.h" 3 | 4 | namespace platform::vulkan 5 | { 6 | struct AllocationInfo 7 | { 8 | VmaAllocator allocator; // The allocator used to create the allocation. 9 | VmaAllocation allocation; // VMA's internal allocation reference. 10 | VmaAllocationInfo allocationInfo; // Information about the alloaction. 11 | }; 12 | } -------------------------------------------------------------------------------- /Vulkan/Layout.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Layout.h" 3 | #include "RenderPlatform.h" 4 | 5 | using namespace platform; 6 | using namespace vulkan; 7 | 8 | Layout::Layout() 9 | { 10 | } 11 | 12 | Layout::~Layout() 13 | { 14 | InvalidateDeviceObjects(); 15 | } 16 | 17 | void Layout::InvalidateDeviceObjects() 18 | { 19 | } 20 | 21 | void Layout::Apply(crossplatform::DeviceContext& deviceContext) 22 | { 23 | } 24 | 25 | void Layout::Unapply(crossplatform::DeviceContext& deviceContext) 26 | { 27 | } -------------------------------------------------------------------------------- /Vulkan/Layout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Export.h" 3 | #include "Platform/CrossPlatform/Layout.h" 4 | 5 | namespace platform 6 | { 7 | namespace vulkan 8 | { 9 | //! Holds current vertex buffer layout information: 10 | class Layout:public crossplatform::Layout 11 | { 12 | public: 13 | Layout(); 14 | virtual ~Layout(); 15 | void InvalidateDeviceObjects(); 16 | void Apply(crossplatform::DeviceContext& deviceContext); 17 | void Unapply(crossplatform::DeviceContext& deviceContext); 18 | }; 19 | } 20 | } -------------------------------------------------------------------------------- /Vulkan/Sfx.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | Midl 4 | CustomBuild 5 | 6 | 7 | _SelectedFiles;$(Sfx_RuleDependsOn) 8 | 9 | 10 | 11 | $(SIMUL)/Tools/bin/Sfx.exe [inputs] [IncludePaths] [OutputPath] [SfxConfig] -m"$(SIMUL)\Platform\Vulkan\sfx_intermediate" [AdditionalOptions] 12 | %(Filename).sfxo 13 | Sfx.exe %(Filename) 14 | 15 | 16 | -------------------------------------------------------------------------------- /Vulkan/Shader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Platform/Vulkan/Export.h" 4 | #include "Platform/CrossPlatform/Effect.h" 5 | 6 | #ifdef _MSC_VER 7 | #pragma warning(push) 8 | #pragma warning(disable:4251) 9 | #endif 10 | 11 | namespace platform 12 | { 13 | namespace vulkan 14 | { 15 | //! A Vulkan shader 16 | class SIMUL_VULKAN_EXPORT Shader:public platform::crossplatform::Shader 17 | { 18 | public: 19 | Shader(); 20 | ~Shader(); 21 | bool load(crossplatform::RenderPlatform *r, const char *filename_utf8, const void *data, size_t len, crossplatform::ShaderType t) override; 22 | vk::ShaderModule mShader; 23 | private: 24 | void Release() override; 25 | //temp: 26 | std::string src; 27 | }; 28 | } 29 | } 30 | 31 | #ifdef _MSC_VER 32 | #pragma warning(pop) 33 | #endif -------------------------------------------------------------------------------- /WebGL/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | WebGL 4 | 5 | 6 | 7 | 8 | 9 | com.aptana.ide.core.unifiedBuilder 10 | 11 | 12 | 13 | 14 | 15 | com.aptana.projects.webnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Windows/ThisPlatform/DateTime.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | //struct tm *localtime(const time_t *timer); 6 | // reimplement this standard function as microsoft does not support it: 7 | inline struct tm *localtime_r(const time_t * tt,struct tm * result) 8 | { 9 | // signature of localtime_s is: 10 | // errno_t __CRTDECL localtime_s( 11 | // _Out_ struct tm* const _Tm, 12 | // _In_ time_t const* const _Time 13 | // ) 14 | auto res=localtime_s(result,tt); 15 | res; 16 | return result; 17 | } -------------------------------------------------------------------------------- /Windows/ThisPlatform/StringFunctions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /Windows/ThisPlatformGDK.properties: -------------------------------------------------------------------------------- 1 | PLATFORM_NAME=WinGDK 2 | PLATFORM_NAME_ALT=WinGDK 3 | PLATFORM_NAME_VS=Gaming.Desktop.x64 4 | VISUAL_STUDIO_VERSION=Visual Studio 17 2022 5 | CMAKE_TOOLCHAIN=CMake\toolchain-WinGDK.cmake 6 | SDK_DIR="" 7 | SDK_VERSION=221001 -------------------------------------------------------------------------------- /Windows/WindowsErrorHandling.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #if defined(_WIN32) 6 | #ifndef WIN32_LEAN_AND_MEAN 7 | #define WIN32_LEAN_AND_MEAN 8 | #endif 9 | #ifndef NOMINMAX 10 | #define NOMINMAX 11 | #endif 12 | #include 13 | #endif 14 | 15 | 16 | namespace platform::windows 17 | { 18 | std::string GetLastErrorToString(DWORD error) 19 | { 20 | #if defined(_WIN32) 21 | if (error != 0) 22 | { 23 | char *formatedMessage = nullptr; 24 | DWORD formatedMessageSize = FormatMessageA( 25 | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 26 | nullptr, error, 0, (char *)&formatedMessage, 0, nullptr); 27 | 28 | if (formatedMessage != nullptr && formatedMessageSize > 0) 29 | { 30 | std::string result(formatedMessage, formatedMessageSize); 31 | LocalFree(formatedMessage); 32 | return result; 33 | } 34 | } 35 | #endif 36 | return std::string(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /shadertoolsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "hlsl.preprocessorDefinitions": { 3 | "vec2": "float2", 4 | "vec3": "float3", 5 | "vec4": "float4", 6 | "char4": "snorm float4", 7 | "uchar4": "unorm float4", 8 | "mat2": "float2x2", 9 | "mat3": "float3x3", 10 | "mat4": "float4x4", 11 | "float16_t": "min16float", 12 | "f16vec2": "min16float2", 13 | "f16vec3": "min16float3", 14 | "f16vec4": "min16float4", 15 | "f16mat2": "min16float2x2", 16 | "f16mat3": "min16float3x3", 17 | "f16mat4": "min16float4x4", 18 | "int16_t": "min16int", 19 | "i16vec2": "min16int2", 20 | "i16vec3": "min16int3", 21 | "i16vec4": "min16int4", 22 | "uint16_t": "min16uint", 23 | "u16vec2": "min16uint2", 24 | "u16vec3": "min16uint3", 25 | "u16vec4": "min16uint4", 26 | "mix": "lerp", 27 | "fract": "frac" 28 | }, 29 | "hlsl.additionalIncludeDirectories": [ 30 | "../", 31 | "CrossPlatform/Shaders", 32 | "DirectX11/Sfx", 33 | "DirectX12/Sfx", 34 | "Vulkan/Sfx", 35 | "OpenGL/Sfx" 36 | ] 37 | } -------------------------------------------------------------------------------- /version.properties: -------------------------------------------------------------------------------- 1 | PS4_SDK_VERSION=6.500 2 | NINTENDO_SDK_VERSION=832 3 | XDK_VERSION=180709 4 | XDKPathExtension=180709 --------------------------------------------------------------------------------