├── DirectXUtil ├── Readme.md ├── packages.config └── BindingManager.h ├── SystemCommon ├── UnInterface.h ├── UnInterface.cpp ├── CharConvs.h ├── AsyncExecutor.natvis ├── MiniLogger.natvis ├── SharedMemory.h ├── StringDetect.h ├── MiniLoggerBackend.h ├── MiniLogger.md ├── AsyncAgent.h └── Exceptions.natvis ├── 3rdParty ├── CL ├── EGL ├── GL ├── KHR ├── gsl ├── GLES2 ├── GLES3 ├── Projects │ ├── date │ │ ├── date.rc │ │ ├── resource.h │ │ ├── xzbuild.proj.json │ │ └── date.cpp │ ├── OpenCLICDLoader │ │ ├── icd_cmake_config.h │ │ └── xzbuild.proj.json │ ├── googletest │ │ ├── gtest-enhanced.cpp │ │ ├── gtest-enhanced.h │ │ ├── googletest.vcxproj.filters │ │ └── xzbuild.proj.json │ ├── boost.charconv │ │ ├── xzbuild.proj.json │ │ └── boost.charconv.vcxproj.filters │ ├── ispc_texcomp │ │ ├── xzbuild.proj.json │ │ └── ispc_texcomp.vcxproj.filters │ ├── cpuid │ │ └── xzbuild.proj.json │ ├── uchardet │ │ └── xzbuild.proj.json │ ├── libpng │ │ └── xzbuild.proj.json │ ├── libjpeg-turbo-16 │ │ └── xzbuild.proj.json │ ├── boost.context │ │ └── xzbuild.proj.json │ ├── libjpeg-turbo │ │ └── neon-compat.h │ └── FreeType │ │ └── freetype │ │ └── config │ │ └── ftconfig.h ├── README.md └── half │ └── LICENSE.txt ├── dizz.png ├── RenderCoreWrap ├── RenderCoreWrapRely.cpp ├── resource.h ├── Resource.rc ├── AssemblyInfo.cpp └── ImageUtil.h ├── Tests ├── NailangTest │ ├── rely.cpp │ ├── rely.h │ ├── xzbuild.proj.json │ ├── ParserCommon.h │ └── NailangTest.vcxproj.filters ├── SystemCommonTest │ ├── rely.h │ ├── xzbuild.proj.json │ ├── SystemCommonTest.vcxproj.filters │ └── rely.cpp ├── UtilTest │ ├── Resource.rc │ ├── titleicon.png │ ├── resource.h │ ├── LogTest.cpp │ └── xzbuild.proj.json ├── ImageUtilTest │ ├── Resource.rc │ ├── imgs │ │ ├── bmp-rgb.bmp │ │ ├── bmp-rgba.bmp │ │ ├── png-rgb.png │ │ ├── png-rgba.png │ │ ├── tga-rgb.tga │ │ ├── tga-rgba.tga │ │ ├── tga-rle-rgb.tga │ │ └── tga-rle-rgba.tga │ ├── rely.h │ ├── xzbuild.proj.json │ ├── resource.h │ └── ImageUtilTest.vcxproj.filters ├── BasicsTest │ ├── cpuinfolog.c │ ├── pch.h │ ├── TestARMA32.cpp │ ├── TestAVX512.cpp │ └── xzbuild.proj.json ├── AnyDockTest │ ├── Properties │ │ ├── Settings.settings │ │ └── Settings.Designer.cs │ ├── App.xaml.cs │ ├── App.xaml │ ├── App.config │ ├── DPITestWindow.xaml │ ├── NewDockPanel.xaml.cs │ ├── DPITestWindow.xaml.cs │ ├── RealDockWindow.xaml.cs │ ├── AnyDockTest.csproj │ ├── RealDockWindow.xaml │ └── MainWindow.xaml.cs ├── Blur │ ├── xzbuild.proj.json │ └── Blur.vcxproj.filters └── DizzTest │ ├── xzbuild.proj.json │ └── DizzTest.vcxproj.filters ├── OpenGLView ├── app.rc ├── app.ico ├── AssemblyInfo.cpp ├── resource.h ├── OpenGLView.vcxproj.filters ├── ReadMe.txt └── OpenGLViewEvents.h ├── RenderCore ├── ShadowMapping.cpp ├── Resource.rc ├── ShadowMapping.h ├── RenderCoreUtil.hpp ├── dllmain.cpp ├── shadow.glsl ├── 2d.glsl ├── RenderCoreRely.cpp ├── xzbuild.proj.json ├── resource.h ├── ThumbnailManager.h ├── GLShader.h ├── Model.h ├── Model │ ├── OBJSaver.hpp │ └── ModelMesh.h ├── RenderCoreRely.h └── postprocess.glsl ├── WPFTest ├── dizz.ico ├── icon │ ├── cube.png │ ├── dizz.png │ ├── save.png │ ├── camera.png │ ├── sunlight.png │ ├── pointlight.png │ ├── screenshot.png │ └── spotlight.png ├── Properties │ ├── launchSettings.json │ ├── Settings.settings │ └── Settings.Designer.cs ├── App.config ├── App.xaml ├── TextDialog.xaml ├── ControllableGroup.xaml ├── ControllableGrid.res.xaml ├── Pages │ └── BasicPages.res.xaml └── TextDialog.xaml.cs ├── Nailang ├── Nailang.ico ├── xzbuild.proj.json └── NailangPch.h ├── FontHelper ├── Resource.rc ├── FontHelper.h ├── FontPch.h ├── dllmain.cpp ├── FontRely.cpp ├── resource.h ├── xzbuild.proj.json ├── FontViewer.h ├── FontRely.h ├── FontCreator.h ├── FreeType.h └── printfont.glsl ├── TextureUtil ├── Resource.rc ├── TexCompressor.h ├── mipmap.py ├── dllmain.cpp ├── TexUtilPch.h ├── resource.h ├── TexUtilRely.cpp ├── xzbuild.proj.json ├── TexUtilRely.h ├── TexUtilWorker.h ├── TexMipmap.h └── TexUtilWorker.cpp ├── OpenGLUtil ├── XZGLParser.cpp ├── XZGLParser.h ├── OpenGLUtil.h ├── xzbuild.proj.json ├── oglWorker.h └── oglRely.cpp ├── WinFormTest ├── Properties │ ├── launchSettings.json │ ├── Settings.settings │ └── Settings.Designer.cs ├── App.config ├── WinFormTest.csproj └── Form1.Designer.cs ├── AnyDock ├── AnyGrid.cs ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── AnyDockHost.res.xaml ├── DraggableTabPanel.res.xaml ├── ResizeThumb.xaml ├── ResizeThumb.xaml.cs ├── ObservableCollectionEx.cs ├── AnyDock.csproj ├── DraggingWindow.xaml └── AnyDockTabLabel.xaml.cs ├── WPFControlExt ├── Properties │ ├── Settings.settings │ └── Settings.Designer.cs ├── WPFControlExt.csproj └── Extensions.cs ├── OpenCLUtil ├── OpenCLUtil.h ├── xzbuild.proj.json ├── oclKernelDebug.h ├── oclPch.h ├── oclUtil.h ├── oclCmdQue.h └── oclCmdQue.cpp ├── common ├── ResourceHelper.h ├── DelayLoader.h ├── AvgCounter.hpp ├── simd │ ├── SIMD256.hpp │ ├── SIMD128.hpp │ └── SIMD512AVXHelper.hpp ├── SharedResource.hpp ├── DelayLoader.inl ├── StrParsePack.hpp ├── AlignedBufer.natvis └── Stream.natvis ├── ResourcePackager ├── ResourcePackagerRely.cpp ├── xzbuild.proj.json ├── ResourceUtil.h ├── ResourcePackager.vcxproj.filters └── ResourcePackagerRely.h ├── SolutionInclude.props ├── CommonUtil ├── ReflectionEx.cs ├── CollectionHelper.cs └── CommonUtil.csproj ├── OpenCLInterop ├── xzbuild.proj.json ├── OpenCLInteropRely.h ├── README.md └── OpenCLInterop.vcxproj.filters ├── XComputeBase ├── xzbuild.proj.json └── XCompDebugExt.h ├── WindowHost ├── README.md └── xzbuild.proj.json ├── ImageUtil ├── ImageUtilPch.h ├── License.txt ├── ImageUtil.h ├── ImagePNG.h ├── ImageJPEG.h ├── ImageSTB.h └── ImageNDK.h ├── NewIdea.md ├── License.txt ├── xzbuild.sol.json ├── xzbuild ├── __init__.py └── xzbuild.pyproj └── License └── boost.txt /DirectXUtil/Readme.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SystemCommon/UnInterface.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /3rdParty/CL: -------------------------------------------------------------------------------- 1 | ./OpenCL-Headers/CL -------------------------------------------------------------------------------- /3rdParty/EGL: -------------------------------------------------------------------------------- 1 | ./EGL-Headers/EGL -------------------------------------------------------------------------------- /3rdParty/GL: -------------------------------------------------------------------------------- 1 | ./OpenGL-Headers/GL -------------------------------------------------------------------------------- /3rdParty/KHR: -------------------------------------------------------------------------------- 1 | ./EGL-Headers/KHR -------------------------------------------------------------------------------- /3rdParty/gsl: -------------------------------------------------------------------------------- 1 | ./MS-GSL/include/gsl -------------------------------------------------------------------------------- /3rdParty/GLES2: -------------------------------------------------------------------------------- 1 | ./OpenGL-Headers/GLES2 -------------------------------------------------------------------------------- /3rdParty/GLES3: -------------------------------------------------------------------------------- 1 | ./OpenGL-Headers/GLES3 -------------------------------------------------------------------------------- /SystemCommon/UnInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "SystemCommonPch.h" 2 | -------------------------------------------------------------------------------- /dizz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/dizz.png -------------------------------------------------------------------------------- /RenderCoreWrap/RenderCoreWrapRely.cpp: -------------------------------------------------------------------------------- 1 | #include "RenderCoreWrapRely.h" 2 | 3 | -------------------------------------------------------------------------------- /Tests/NailangTest/rely.cpp: -------------------------------------------------------------------------------- 1 | #include "rely.h" 2 | 3 | 4 | GTEST_DEFAULT_MAIN -------------------------------------------------------------------------------- /OpenGLView/app.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/OpenGLView/app.rc -------------------------------------------------------------------------------- /RenderCore/ShadowMapping.cpp: -------------------------------------------------------------------------------- 1 | #include "RenderCorePch.h" 2 | #include "ShadowMapping.h" -------------------------------------------------------------------------------- /WPFTest/dizz.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/dizz.ico -------------------------------------------------------------------------------- /Nailang/Nailang.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Nailang/Nailang.ico -------------------------------------------------------------------------------- /OpenGLView/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/OpenGLView/app.ico -------------------------------------------------------------------------------- /Tests/SystemCommonTest/rely.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../Shared/GTestCommon.h" 3 | 4 | -------------------------------------------------------------------------------- /FontHelper/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/FontHelper/Resource.rc -------------------------------------------------------------------------------- /RenderCore/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/RenderCore/Resource.rc -------------------------------------------------------------------------------- /WPFTest/icon/cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/cube.png -------------------------------------------------------------------------------- /WPFTest/icon/dizz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/dizz.png -------------------------------------------------------------------------------- /WPFTest/icon/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/save.png -------------------------------------------------------------------------------- /RenderCore/ShadowMapping.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "RenderCoreRely.h" 3 | #include "Light.h" 4 | 5 | -------------------------------------------------------------------------------- /RenderCoreWrap/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/RenderCoreWrap/resource.h -------------------------------------------------------------------------------- /TextureUtil/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/TextureUtil/Resource.rc -------------------------------------------------------------------------------- /WPFTest/icon/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/camera.png -------------------------------------------------------------------------------- /WPFTest/icon/sunlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/sunlight.png -------------------------------------------------------------------------------- /OpenGLView/AssemblyInfo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/OpenGLView/AssemblyInfo.cpp -------------------------------------------------------------------------------- /RenderCoreWrap/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/RenderCoreWrap/Resource.rc -------------------------------------------------------------------------------- /Tests/UtilTest/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/UtilTest/Resource.rc -------------------------------------------------------------------------------- /WPFTest/icon/pointlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/pointlight.png -------------------------------------------------------------------------------- /WPFTest/icon/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/screenshot.png -------------------------------------------------------------------------------- /WPFTest/icon/spotlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/WPFTest/icon/spotlight.png -------------------------------------------------------------------------------- /3rdParty/Projects/date/date.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/3rdParty/Projects/date/date.rc -------------------------------------------------------------------------------- /Tests/UtilTest/titleicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/UtilTest/titleicon.png -------------------------------------------------------------------------------- /Tests/ImageUtilTest/Resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/Resource.rc -------------------------------------------------------------------------------- /FontHelper/FontHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "FontRely.h" 4 | #include "FontCreator.h" 5 | #include "FontViewer.h" -------------------------------------------------------------------------------- /OpenGLView/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by app.rc 4 | -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/bmp-rgb.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/bmp-rgb.bmp -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/bmp-rgba.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/bmp-rgba.bmp -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/png-rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/png-rgb.png -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/png-rgba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/png-rgba.png -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/tga-rgb.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/tga-rgb.tga -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/tga-rgba.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/tga-rgba.tga -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/tga-rle-rgb.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/tga-rle-rgb.tga -------------------------------------------------------------------------------- /OpenGLUtil/XZGLParser.cpp: -------------------------------------------------------------------------------- 1 | #include "oglPch.h" 2 | #include "XZGLParser.h" 3 | 4 | namespace oglu 5 | { 6 | 7 | 8 | 9 | 10 | } -------------------------------------------------------------------------------- /Tests/BasicsTest/cpuinfolog.c: -------------------------------------------------------------------------------- 1 | #define CPUINFO_LOG_LEVEL 5 2 | #define CPUINFO_LOG_TO_STDIO 1 3 | 4 | #include "3rdParty/cpuinfo/src/log.c" -------------------------------------------------------------------------------- /Tests/ImageUtilTest/imgs/tga-rle-rgba.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XZiar/RayRenderer/HEAD/Tests/ImageUtilTest/imgs/tga-rle-rgba.tga -------------------------------------------------------------------------------- /RenderCore/RenderCoreUtil.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "RenderCoreRely.h" 3 | 4 | 5 | namespace dizz 6 | { 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /WPFTest/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "WPFTest": { 4 | "commandName": "Project", 5 | "nativeDebugging": true 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /WinFormTest/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "WinFormTest": { 4 | "commandName": "Project", 5 | "nativeDebugging": true 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /DirectXUtil/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /OpenGLUtil/XZGLParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "oglRely.h" 4 | 5 | namespace oglu 6 | { 7 | 8 | 9 | class OGLUAPI XZGLParser 10 | { 11 | private: 12 | 13 | public: 14 | 15 | }; 16 | 17 | 18 | 19 | } -------------------------------------------------------------------------------- /Tests/ImageUtilTest/rely.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../Shared/GTestCommon.h" 3 | #include "common/ResourceHelper.h" 4 | #include "resource.h" 5 | 6 | common::span GetRandVals() noexcept; 7 | bool IsSlimTest() noexcept; 8 | -------------------------------------------------------------------------------- /AnyDock/AnyGrid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AnyDock 8 | { 9 | class AnyGrid 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /AnyDock/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WPFTest/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WPFControlExt/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/AnyDockTest/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /OpenGLUtil/OpenGLUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "oglRely.h" 4 | #include "oglContext.h" 5 | #include "oglBuffer.h" 6 | #include "oglShader.h" 7 | #include "oglVAO.h" 8 | #include "oglTexture.h" 9 | #include "oglProgram.h" 10 | #include "oglFBO.h" 11 | #include "oglUtil.h" 12 | -------------------------------------------------------------------------------- /OpenCLUtil/OpenCLUtil.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "oclRely.h" 4 | #include "oclDevice.h" 5 | #include "oclPlatform.h" 6 | #include "oclContext.h" 7 | #include "oclCmdQue.h" 8 | #include "oclProgram.h" 9 | #include "oclBuffer.h" 10 | #include "oclImage.h" 11 | #include "oclUtil.h" 12 | -------------------------------------------------------------------------------- /WinFormTest/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FontHelper/FontPch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "FontRely.h" 3 | #include "FreeType.h" 4 | #include "SystemCommon/MiniLogger.h" 5 | #include 6 | #include "resource.h" 7 | 8 | namespace oglu 9 | { 10 | common::mlog::MiniLogger& fntLog(); 11 | std::string LoadShaderFromDLL(int32_t id); 12 | } -------------------------------------------------------------------------------- /TextureUtil/TexCompressor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TexUtilRely.h" 3 | 4 | namespace oglu::texutil 5 | { 6 | 7 | TEXUTILAPI common::AlignedBuffer CompressToDat(const xziar::img::ImageView& img, const xziar::img::TextureFormat format, const bool needAlpha = true, const bool preferIspc = true); 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /common/ResourceHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CommonRely.hpp" 4 | #include 5 | 6 | namespace common 7 | { 8 | 9 | class ResourceHelper 10 | { 11 | public: 12 | static void Init(void* dll); 13 | static common::span GetData(const wchar_t *type, const int32_t id); 14 | }; 15 | 16 | } -------------------------------------------------------------------------------- /TextureUtil/mipmap.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | n = int(input("number of pixels")) 4 | coordX = range(0, 2*n, 2) 5 | mat = np.mat([[pow(x,i) for i in range(0,n)] for x in coordX]) 6 | middle = np.array([pow(n-1,i) for i in range(0,n)]) 7 | ret = middle * np.linalg.inv(mat) 8 | print(mat) 9 | print(middle) 10 | print(ret) 11 | -------------------------------------------------------------------------------- /3rdParty/Projects/OpenCLICDLoader/icd_cmake_config.h: -------------------------------------------------------------------------------- 1 | #include 2 | #if defined(__GLIBC__) && __GLIBC__ >= 2 3 | // https://man7.org/linux/man-pages/man3/getenv.3.html 4 | // secure_getenv() first appeared in glibc 2.17. 5 | # if __GLIBC_MINOR__ >= 17 6 | # define HAVE_SECURE_GETENV 7 | # else 8 | # define HAVE___SECURE_GETENV 9 | # endif 10 | #endif 11 | -------------------------------------------------------------------------------- /ResourcePackager/ResourcePackagerRely.cpp: -------------------------------------------------------------------------------- 1 | #include "ResourcePackagerRely.h" 2 | #include "SystemCommon/MiniLogger.h" 3 | 4 | namespace xziar::respak 5 | { 6 | 7 | using namespace common::mlog; 8 | MiniLogger& rpakLog() 9 | { 10 | static MiniLogger respaklog(u"ResourcePacker", { GetConsoleBackend() }); 11 | return respaklog; 12 | } 13 | 14 | 15 | } -------------------------------------------------------------------------------- /AnyDock/AnyDockHost.res.xaml: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /WinFormTest/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /3rdParty/Projects/googletest/gtest-enhanced.cpp: -------------------------------------------------------------------------------- 1 | #include "gtest-enhanced.h" 2 | #include "src/gtest-all.cc" 3 | #include "src/gmock-all.cc" 4 | 5 | 6 | TestCout::~TestCout() 7 | { 8 | testing::internal::ColoredPrintf(testing::internal::GTestColor::kGreen, "[ ] "); 9 | testing::internal::ColoredPrintf(testing::internal::GTestColor::kYellow, "%s", Source.str().c_str()); 10 | } 11 | -------------------------------------------------------------------------------- /common/DelayLoader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace common 8 | { 9 | 10 | class DelayLoader 11 | { 12 | public: 13 | using LoadFunc = std::function; 14 | static LoadFunc onLoadDLL; 15 | static LoadFunc onGetFuncAddr; 16 | static bool unload(const std::string& name); 17 | }; 18 | 19 | 20 | } -------------------------------------------------------------------------------- /Tests/AnyDockTest/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace AnyDockTest 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /3rdParty/README.md: -------------------------------------------------------------------------------- 1 | # 3rdParty libraries 2 | 3 | This folder includes almost all the 3rd-party libraries that RayRenderer uses. 4 | 5 | ## About Submodules 6 | 7 | Due to historic reasons and build toolchian issue, some libs are included with source code. I am working on moving them into submodules. 8 | 9 | ## License 10 | 11 | Each library is licensed under its license. You can find a copy under its library. -------------------------------------------------------------------------------- /Tests/NailangTest/rely.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "3rdParty/Projects/googletest/gtest-enhanced.h" 3 | #include 4 | #include 5 | 6 | template 7 | std::string WideToChar(std::basic_string_view str) 8 | { 9 | std::string ret; ret.reserve(str.size()); 10 | for (const auto ch : str) 11 | ret.push_back(static_cast(ch)); 12 | return ret; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Tests/AnyDockTest/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Tests/Blur/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Blur", 3 | "type": "executable", 4 | "description": "Blur test", 5 | "dependency": ["ImageUtil", "OpenCLUtil", "SystemCommon", "XComputeBase"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "sources": ["*.cpp"] 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /SolutionInclude.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionDir);$(SolutionDir)3rdParty;$(SolutionDir)3rdParty\Projects;$(IncludePath) 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /CommonUtil/ReflectionEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace XZiar.Util 9 | { 10 | public static class ReflectionHelper 11 | { 12 | public static T ToDelegate(this MethodInfo method) where T : Delegate 13 | { 14 | return (T)method.CreateDelegate(typeof(T)); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RenderCore/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "common/ResourceHelper.h" 2 | #define WIN32_LEAN_AND_MEAN 1 3 | #include 4 | 5 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) 6 | { 7 | switch (fdwReason) 8 | { 9 | case DLL_PROCESS_ATTACH: 10 | common::ResourceHelper::Init(hinstDLL); 11 | break; 12 | case DLL_PROCESS_DETACH: 13 | break; 14 | case DLL_THREAD_ATTACH: 15 | break; 16 | case DLL_THREAD_DETACH: 17 | break; 18 | } 19 | return TRUE; 20 | } -------------------------------------------------------------------------------- /ResourcePackager/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ResourcePackager", 3 | "type": "dynamic", 4 | "description": "Resource package and management library", 5 | "dependency": ["SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "sources": ["*.cpp"], 16 | "defines": ["RESPAK_EXPORT"] 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /TextureUtil/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "common/ResourceHelper.h" 2 | #define WIN32_LEAN_AND_MEAN 1 3 | #include 4 | 5 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) 6 | { 7 | switch (fdwReason) 8 | { 9 | case DLL_PROCESS_ATTACH: 10 | common::ResourceHelper::Init(hinstDLL); 11 | break; 12 | case DLL_PROCESS_DETACH: 13 | break; 14 | case DLL_THREAD_ATTACH: 15 | break; 16 | case DLL_THREAD_DETACH: 17 | break; 18 | } 19 | return TRUE; 20 | } -------------------------------------------------------------------------------- /OpenCLInterop/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OpenCLInterop", 3 | "type": "dynamic", 4 | "description": "OpenCL Interoperation Utility", 5 | "dependency": ["ImageUtil", "OpenCLUtil", "OpenGLUtil"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "sources": ["*.cpp"], 16 | "defines": ["OCLIOP_EXPORT"] 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /FontHelper/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "common/ResourceHelper.h" 2 | #define WIN32_LEAN_AND_MEAN 1 3 | #include 4 | 5 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 6 | { 7 | switch (fdwReason) 8 | { 9 | case DLL_PROCESS_ATTACH: 10 | common::ResourceHelper::Init(hinstDLL); 11 | break; 12 | case DLL_PROCESS_DETACH: 13 | break; 14 | case DLL_THREAD_ATTACH: 15 | break; 16 | case DLL_THREAD_DETACH: 17 | break; 18 | } 19 | return TRUE; 20 | } -------------------------------------------------------------------------------- /Nailang/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Nailang", 3 | "type": "dynamic", 4 | "description": "Nailang, not an intresting language", 5 | "dependency": ["SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "sources": ["*.cpp"], 16 | "defines": ["NAILANG_EXPORT"], 17 | "pch": "NailangPch.h" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /OpenCLUtil/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OpenCLUtil", 3 | "type": "dynamic", 4 | "description": "Wrapper of OpenCL Utility", 5 | "dependency": ["SystemCommon", "ImageUtil", "Nailang", "XComputeBase", "OpenCLICDLoader"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "sources": ["*.cpp"], 16 | "defines": ["OCLU_EXPORT"], 17 | "pch": "oclPch.h" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /TextureUtil/TexUtilPch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TexUtilRely.h" 3 | #include "TexUtilWorker.h" 4 | #include "OpenCLInterop/GLInterop.h" 5 | #include "ImageUtil/ImageUtil.h" 6 | #include "SystemCommon/MiniLogger.h" 7 | #include "SystemCommon/FileEx.h" 8 | #include "SystemCommon/ThreadEx.h" 9 | #include "common/ContainerEx.hpp" 10 | #include "common/TimeUtil.hpp" 11 | #include "common/Linq2.hpp" 12 | 13 | 14 | namespace oglu::texutil 15 | { 16 | common::mlog::MiniLogger& texLog(); 17 | std::string LoadShaderFromDLL(int32_t id); 18 | } 19 | -------------------------------------------------------------------------------- /WPFTest/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /common/AvgCounter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace common 5 | { 6 | 7 | template 8 | class AvgCounter 9 | { 10 | private: 11 | T Data[N] = {0}; 12 | uint64_t Count = 0; 13 | T Sum = 0; 14 | public: 15 | T GetAvg() const { return Sum / (Count > N ? N : Count); } 16 | T Push(const T dat) 17 | { 18 | T& slot = Data[(Count++) % 32]; 19 | Sum -= slot; 20 | slot = dat; 21 | Sum += dat; 22 | return GetAvg(); 23 | } 24 | }; 25 | 26 | 27 | } -------------------------------------------------------------------------------- /FontHelper/FontRely.cpp: -------------------------------------------------------------------------------- 1 | #include "FontPch.h" 2 | #include "common/ResourceHelper.inl" 3 | 4 | namespace oglu 5 | { 6 | using common::ResourceHelper; 7 | 8 | 9 | using namespace common::mlog; 10 | MiniLogger& fntLog() 11 | { 12 | static MiniLogger fntlog(u"FontHelper", { GetConsoleBackend() }); 13 | return fntlog; 14 | } 15 | 16 | std::string LoadShaderFromDLL(int32_t id) 17 | { 18 | auto data = ResourceHelper::GetData(L"SHADER", id); 19 | return std::string(reinterpret_cast(data.data()), data.size()); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /Tests/AnyDockTest/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Tests/NailangTest/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NailangTest", 3 | "type": "executable", 4 | "description": "Sector Parser Test", 5 | "dependency": ["googletest", "Nailang", "SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "incpath": ["$(SolutionDir)/3rdParty/googletest/googletest/include/", "$(SolutionDir)/3rdParty/googletest/googlemock/include/"], 16 | "sources": ["*.cpp"] 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /XComputeBase/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XComputeBase", 3 | "type": "dynamic", 4 | "description": "Base of XCompute", 5 | "dependency": ["Nailang", "SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "incpath": ["$(usrDir)/include/drm", "$(usrDir)/include/libdrm"], 16 | "sources": ["*.cpp", {"-": "DeviceDiscoveryWin32.cpp"}], 17 | "defines": ["XCOMPBAS_EXPORT"] 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Tests/SystemCommonTest/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SystemCommonTest", 3 | "type": "executable", 4 | "description": "test for SystemCommon", 5 | "dependency": ["googletest", "SystemCommon", "date"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "incpath": ["$(SolutionDir)/3rdParty/googletest/googletest/include/", "$(SolutionDir)/3rdParty/googletest/googlemock/include/"], 16 | "sources": ["*.cpp"] 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /FontHelper/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | #define IDR_SHADER_PRINTFONT 108 5 | #define IDR_SHADER_SDFTEST 109 6 | #define IDR_SHADER_DWNSAMP 110 7 | // 新对象的下一组默认值 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 101 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /AnyDock/DraggableTabPanel.res.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SystemCommon/CharConvs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SystemCommonRely.h" 3 | 4 | 5 | #ifndef SYSCOMMON_CHARCONV_BUILD 6 | namespace common::detail 7 | { 8 | template 9 | SYSCOMMONAPI std::pair StrToInt(const std::string_view str, T& val, const int32_t base); 10 | template 11 | SYSCOMMONAPI std::pair StrToFP(const std::string_view str, T& val, [[maybe_unused]] const bool isScientific); 12 | } 13 | # define SYSCOMMON_CHARCONV_USE 1 14 | #else 15 | # define SYSCOMMON_CHARCONV_FUNC SYSCOMMONAPI 16 | #endif 17 | #include "common/CharConvs.hpp" 18 | 19 | -------------------------------------------------------------------------------- /Tests/UtilTest/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | #define IDR_CL_TEST 108 5 | #define IDR_GL_FGTEST 109 6 | #define IDR_GL_FGLUT 110 7 | #define IDR_IMG_TITLEICON 111 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 101 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /3rdParty/Projects/boost.charconv/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "boost.charconv", 3 | "type": "static", 4 | "description": "C++11 compatible charconv", 5 | "dependency": [], 6 | "srcPath": "../../boost.charconv/src", 7 | "library": 8 | { 9 | "static": [], 10 | "dynamic": [] 11 | }, 12 | "targets": 13 | { 14 | "cxx": 15 | { 16 | "defines": ["BOOST_CHARCONV_SOURCE"] 17 | }, 18 | "cpp": 19 | { 20 | "sources": ["from_chars.cpp", "to_chars.cpp"], 21 | "incpath": ["../include"] 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /CommonUtil/CollectionHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace XZiar.Util.Collections 8 | { 9 | public static class CollectionHelper 10 | { 11 | public static TValue GetOrCreate(this IDictionary dict, TKey key) where TValue : new() 12 | { 13 | if (!dict.TryGetValue(key, out TValue val)) 14 | { 15 | val = new TValue(); 16 | dict.Add(key, val); 17 | } 18 | return val; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /RenderCore/shadow.glsl: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | precision mediump float; 3 | precision lowp sampler2D; 4 | //@OGLU@Stage("VERT", "FRAG") 5 | 6 | const float oglu_PI = 3.1415926f; 7 | 8 | 9 | //@OGLU@Mapping(LightMat, "matLight") 10 | uniform mat4 matLight; 11 | //@OGLU@Mapping(ModelMat, "matModel") 12 | uniform mat4 matModel; 13 | 14 | 15 | //////////////// 16 | #ifdef OGLU_VERT 17 | 18 | //@OGLU@Mapping(VertPos, "vertPos") 19 | in vec3 vertPos; 20 | 21 | void main() 22 | { 23 | gl_Position = matLight * matModel * vec4(vertPos, 1.0f); 24 | } 25 | 26 | #endif 27 | 28 | #ifdef OGLU_FRAG 29 | 30 | void main() 31 | { 32 | } 33 | 34 | #endif -------------------------------------------------------------------------------- /3rdParty/Projects/ispc_texcomp/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ispc_texcomp", 3 | "type": "static", 4 | "description": "ISPC Texture Compressor", 5 | "dependency": [], 6 | "srcPath": "../../ISPCTextureCompressor/ispc_texcomp", 7 | "library": 8 | { 9 | "static": [], 10 | "dynamic": [] 11 | }, 12 | "targets": 13 | { 14 | "cpp": 15 | { 16 | "incpath": ["$(BuildDir)", "."], 17 | "sources": ["*.cpp"] 18 | }, 19 | "ispc": 20 | { 21 | "sources": ["*.ispc"], 22 | "targets": ["sse4", "avx2"] 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Tests/ImageUtilTest/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ImageUtilTest", 3 | "type": "executable", 4 | "description": "test for ImageUtil", 5 | "dependency": ["googletest", "ImageUtil", "SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "incpath": ["$(SolutionDir)/3rdParty/googletest/googletest/include/", "$(SolutionDir)/3rdParty/googletest/googlemock/include/"], 16 | "sources": ["*.cpp"] 17 | }, 18 | "rc": 19 | { 20 | "sources": ["*.rc"] 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Tests/BasicsTest/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "common/CommonRely.hpp" 4 | #include "common/EnumEx.hpp" 5 | #include "3rdParty/Projects/googletest/gtest-enhanced.h" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | 26 | std::mt19937& GetRanEng(); 27 | uint32_t GetARand(); 28 | -------------------------------------------------------------------------------- /TextureUtil/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by TextureCompressor.rc 4 | #define IDR_SHADER_GLRESIZER 108 5 | #define IDR_SHADER_CLRESIZER 109 6 | #define IDR_SHADER_MIPMAP 110 7 | #define IDR_SHADER_GASIIR 111 8 | 9 | // 新对象的下一组默认值 10 | // 11 | #ifdef APSTUDIO_INVOKED 12 | #ifndef APSTUDIO_READONLY_SYMBOLS 13 | #define _APS_NEXT_RESOURCE_VALUE 101 14 | #define _APS_NEXT_COMMAND_VALUE 40001 15 | #define _APS_NEXT_CONTROL_VALUE 1001 16 | #define _APS_NEXT_SYMED_VALUE 101 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /TextureUtil/TexUtilRely.cpp: -------------------------------------------------------------------------------- 1 | #include "TexUtilPch.h" 2 | #include "common/ResourceHelper.inl" 3 | 4 | #pragma message("Compiling TextureUtil with " STRINGIZE(COMMON_SIMD_INTRIN) ) 5 | 6 | namespace oglu::texutil 7 | { 8 | using common::ResourceHelper; 9 | 10 | 11 | 12 | common::mlog::MiniLogger& texLog() 13 | { 14 | static common::mlog::MiniLogger texclog(u"TexUtil", { common::mlog::GetConsoleBackend() }); 15 | return texclog; 16 | } 17 | 18 | std::string LoadShaderFromDLL(int32_t id) 19 | { 20 | auto data = ResourceHelper::GetData(L"SHADER", id); 21 | return std::string(reinterpret_cast(data.data()), data.size()); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /WPFTest/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OpenCLInterop/OpenCLInteropRely.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(_WIN32) || defined(__CYGWIN__) 4 | # ifdef OCLIOP_EXPORT 5 | # define OCLIOPAPI _declspec(dllexport) 6 | # else 7 | # define OCLIOPAPI _declspec(dllimport) 8 | # endif 9 | #else 10 | # define OCLIOPAPI [[gnu::visibility("default")]] 11 | #endif 12 | 13 | #include "ImageUtil/ImageCore.h" 14 | #include "OpenCLUtil/oclMem.h" 15 | #include "OpenCLUtil/oclBuffer.h" 16 | #include "OpenCLUtil/oclImage.h" 17 | #include "OpenCLUtil/oclDevice.h" 18 | #include "OpenCLUtil/oclPlatform.h" 19 | #include "OpenCLUtil/oclUtil.h" 20 | 21 | #include "common/CommonRely.hpp" 22 | #include "common/EnumEx.hpp" 23 | #include "SystemCommon/Exceptions.h" 24 | 25 | 26 | -------------------------------------------------------------------------------- /FontHelper/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FontHelper", 3 | "type": "dynamic", 4 | "description": "Font Utility", 5 | "dependency": ["OpenGLUtil", "SystemCommon", "FreeType", "ImageUtil", "OpenCLUtil"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "incpath": ["$(SolutionDir)/3rdParty/Projects/FreeType/", "$(SolutionDir)/3rdParty/FreeType/include/"], 16 | "sources": ["*.cpp", {"-": "dllmain.cpp"}], 17 | "defines": ["FONTHELPER_EXPORT"] 18 | }, 19 | "rc": 20 | { 21 | "sources": ["*.rc"] 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /RenderCore/2d.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | //@OGLU@Stage("VERT", "FRAG") 4 | 5 | GLVARY perVert 6 | { 7 | vec2 pos; 8 | vec2 tpos; 9 | }; 10 | 11 | #ifdef OGLU_VERT 12 | 13 | //@OGLU@Mapping(VertPos, "vertPos") 14 | layout(location = 0) in vec2 vertPos; 15 | //@OGLU@Mapping(VertTexc, "vertTexc") 16 | layout(location = 1) in vec2 vertTexc; 17 | 18 | void main() 19 | { 20 | pos = vertPos; 21 | tpos = vertTexc; 22 | gl_Position = vec4(pos, 1.0f, 1.0f); 23 | } 24 | 25 | #endif 26 | 27 | #ifdef OGLU_FRAG 28 | 29 | uniform sampler2D tex[16]; 30 | 31 | out vec4 FragColor; 32 | 33 | void main() 34 | { 35 | FragColor = texture(tex[0], tpos); 36 | FragColor.w = 1.0f; 37 | } 38 | 39 | #endif -------------------------------------------------------------------------------- /Tests/AnyDockTest/DPITestWindow.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Tests/AnyDockTest/NewDockPanel.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace AnyDockTest 16 | { 17 | /// 18 | /// NewDockPanel.xaml 的交互逻辑 19 | /// 20 | public partial class NewDockPanel : Window 21 | { 22 | public NewDockPanel() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /TextureUtil/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TextureUtil", 3 | "type": "dynamic", 4 | "description": "Texture Utility", 5 | "dependency": ["OpenGLUtil", "ispc_texcomp", "ImageUtil", "OpenCLUtil", "OpenCLInterop", "SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": [] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "incpath": ["$(SolutionDir)/3rdParty/Projects/ispc_texcomp"], 16 | "sources": ["*.cpp", {"-": "dllmain.cpp"}], 17 | "defines": ["TEXUTIL_EXPORT"], 18 | "pch": "TexUtilPch.h" 19 | }, 20 | "rc": 21 | { 22 | "sources": ["*.rc"] 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /AnyDock/ResizeThumb.xaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Tests/DizzTest/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DizzTest", 3 | "type": "executable", 4 | "description": "Test Program based on WindowHost", 5 | "dependency": ["WindowHost", "OpenGLUtil", "RenderCore", "FontHelper", "ResourcePackager", "ImageUtil", "SystemCommon"], 6 | "library": 7 | { 8 | "static": 9 | [ 10 | {"ifhas": "fslib_s", "+": "@fslib_s"} 11 | ], 12 | "dynamic": 13 | [ 14 | "X11", 15 | {"ifhas": "fslib_d", "+": "@fslib_d"} 16 | ] 17 | }, 18 | "targets": 19 | { 20 | "cpp": 21 | { 22 | "sources": ["*.cpp"], 23 | "flags": ["-Wno-unused-function", "-Wno-switch"] 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /OpenGLUtil/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OpenGLUtil", 3 | "type": "dynamic", 4 | "description": "Wrapper of OpenGL Utility", 5 | "dependency": ["XComputeBase", "ImageUtil", "SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": ["dl"] 10 | }, 11 | "framework": 12 | { 13 | "framework": ["OpenGLES", "CoreFoundation"] 14 | }, 15 | "targets": 16 | { 17 | "cpp": 18 | { 19 | "sources": 20 | [ 21 | "*.cpp", {"-": "WGLInterface.cpp"}, 22 | {"ifno": "iOS", "-": "EAGLInterface.cpp"} 23 | ], 24 | "defines": ["OGLU_EXPORT"], 25 | "pch": "oglPch.h" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /RenderCore/RenderCoreRely.cpp: -------------------------------------------------------------------------------- 1 | #include "RenderCorePch.h" 2 | #include "common/ResourceHelper.inl" 3 | 4 | #include 5 | #pragma message("Compiling RenderCore with boost[" STRINGIZE(BOOST_LIB_VERSION) "]" ) 6 | #pragma message("Compiling RenderCore with " STRINGIZE(COMMON_SIMD_INTRIN) ) 7 | 8 | namespace dizz 9 | { 10 | using common::ResourceHelper; 11 | 12 | using namespace common::mlog; 13 | MiniLogger& dizzLog() 14 | { 15 | static MiniLogger dizzlog(u"RenderCore", { GetConsoleBackend() }); 16 | return dizzlog; 17 | } 18 | 19 | std::string LoadShaderFromDLL(int32_t id) 20 | { 21 | auto data = ResourceHelper::GetData(L"SHADER", id); 22 | return std::string(reinterpret_cast(data.data()), data.size()); 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /SystemCommon/AsyncExecutor.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{[{Name}],[{Status}]}} 5 | 6 | 7 | {{Current={Current}}} 8 | 9 | Current 10 | Context 11 | 12 | *(common::asyexe::detail::AsyncTaskNode**)&Head 13 | Next 14 | this 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /OpenCLUtil/oclKernelDebug.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "oclRely.h" 4 | #include "XComputeBase/XCompDebug.h" 5 | 6 | #if COMMON_COMPILER_MSVC 7 | # pragma warning(push) 8 | # pragma warning(disable:4275 4251) 9 | #endif 10 | 11 | namespace oclu::debug 12 | { 13 | struct NLCLDebugExtension; 14 | 15 | OCLUAPI void SetAllowDebug(const NLCLContext& context) noexcept; 16 | xcomp::debug::DebugManager* ExtractDebugManager(const NLCLContext& context) noexcept; 17 | 18 | 19 | struct SubgroupWgInfo : public xcomp::debug::WorkItemInfo 20 | { 21 | uint16_t SubgroupId, SubgroupLocalId; 22 | }; 23 | 24 | OCLUAPI bool HasSubgroupInfo(const xcomp::debug::InfoProvider& infoProv) noexcept; 25 | 26 | 27 | } 28 | 29 | 30 | #if COMMON_COMPILER_MSVC 31 | # pragma warning(pop) 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /AnyDock/ResizeThumb.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Controls.Primitives; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | 17 | namespace AnyDock 18 | { 19 | /// 20 | /// ResizeThumb.xaml 的交互逻辑 21 | /// 22 | internal partial class ResizeThumb : Thumb 23 | { 24 | public ResizeThumb() 25 | { 26 | InitializeComponent(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /FontHelper/FontViewer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "FontRely.h" 4 | 5 | namespace oglu 6 | { 7 | 8 | #if COMMON_COMPILER_MSVC 9 | # pragma warning(push) 10 | # pragma warning(disable:4275 4251) 11 | #endif 12 | class FONTHELPAPI FontViewer : public common::NonCopyable, public common::Controllable 13 | { 14 | private: 15 | oglVBO viewRect; 16 | oglVAO viewVAO; 17 | void RegisterControllable(); 18 | public: 19 | oglDrawProgram prog; 20 | FontViewer(); 21 | virtual std::u16string_view GetControlType() const override 22 | { 23 | using namespace std::literals; 24 | return u"FontViewer"sv; 25 | } 26 | void Draw(); 27 | void BindTexture(const oglTex2D& tex); 28 | }; 29 | #if COMMON_COMPILER_MSVC 30 | # pragma warning(pop) 31 | #endif 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Tests/ImageUtilTest/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Resource.rc 4 | #define IDR_IMG_BMP_RGBA 108 5 | #define IDR_IMG_PNG_RGBA 109 6 | #define IDR_IMG_TGA_RGBA 110 7 | #define IDR_IMG_TGA_RLE_RGBA 111 8 | #define IDR_IMG_BMP_RGB 112 9 | #define IDR_IMG_PNG_RGB 113 10 | #define IDR_IMG_TGA_RGB 114 11 | #define IDR_IMG_TGA_RLE_RGB 115 12 | 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NEXT_RESOURCE_VALUE 101 17 | #define _APS_NEXT_COMMAND_VALUE 40001 18 | #define _APS_NEXT_CONTROL_VALUE 1001 19 | #define _APS_NEXT_SYMED_VALUE 101 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /TextureUtil/TexUtilRely.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(_WIN32) || defined(__CYGWIN__) 4 | # ifdef TEXUTIL_EXPORT 5 | # define TEXUTILAPI _declspec(dllexport) 6 | # else 7 | # define TEXUTILAPI _declspec(dllimport) 8 | # endif 9 | #else 10 | # define TEXUTILAPI [[gnu::visibility("default")]] 11 | #endif 12 | 13 | 14 | 15 | #include "OpenGLUtil/OpenGLUtil.h" 16 | #include "OpenCLUtil/oclCmdQue.h" 17 | #include "OpenCLUtil/oclProgram.h" 18 | #include "OpenCLUtil/oclImage.h" 19 | #include "OpenCLUtil/oclBuffer.h" 20 | #include "ImageUtil/ImageCore.h" 21 | #include "SystemCommon/PromiseTask.h" 22 | #include "SystemCommon/Exceptions.h" 23 | #include 24 | #include 25 | #include 26 | 27 | 28 | namespace oglu::texutil 29 | { 30 | 31 | class TexUtilWorker; 32 | 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /3rdParty/Projects/cpuid/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cpuid", 3 | "type": "static", 4 | "description": "A small C library for x86 CPU detection and feature extraction", 5 | "kvSource": [{"type": "cmake", "file": "../CMakeLists.txt", "targets":["VERSION"]}], 6 | "version": {"targets":["VERSION"]}, 7 | "dependency": [], 8 | "srcPath": "../../libcpuid/libcpuid", 9 | "library": 10 | { 11 | "static": [], 12 | "dynamic": [] 13 | }, 14 | "targets": 15 | { 16 | "cxx": 17 | { 18 | "defines": ["_LIB", "VERSION='\"${version}\"'"], 19 | "flags": ["-Wno-format", "-Wno-overlength-strings"] 20 | }, 21 | "c": 22 | { 23 | "sources": ["*.c"], 24 | "version": "" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /common/simd/SIMD256.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SIMD.hpp" 3 | 4 | #if COMMON_ARCH_X86 5 | # include "SIMD256AVX.hpp" 6 | #else 7 | #endif 8 | 9 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U8x32 ) == 32); 10 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I8x32 ) == 32); 11 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U16x16) == 32); 12 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I16x16) == 32); 13 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U32x8 ) == 32); 14 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I32x8 ) == 32); 15 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U64x4 ) == 32); 16 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I64x4 ) == 32); 17 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::F32x8 ) == 32); 18 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::F64x4 ) == 32); 19 | 20 | #define COMMON_SIMD_HAS_256 1 21 | -------------------------------------------------------------------------------- /AnyDock/ObservableCollectionEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Specialized; 3 | using System.Collections.Generic; 4 | using System.Collections.ObjectModel; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Collections; 9 | 10 | namespace AnyDock 11 | { 12 | public class ObservableCollectionEx : ObservableCollection 13 | { 14 | protected override void ClearItems() 15 | { 16 | //var arg = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove); 17 | foreach (var ele in Items) 18 | { 19 | OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, ele)); 20 | } 21 | base.ClearItems(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Tests/BasicsTest/TestARMA32.cpp: -------------------------------------------------------------------------------- 1 | #include "SIMDRely.h" 2 | 3 | #define COMMON_SIMD_LV_NAMESPACE 1 4 | #define COMMON_SIMD_LV 100 5 | #include "common/simd/SIMD.hpp" 6 | #if COMMON_SIMD_LV_ < COMMON_SIMD_LV 7 | # error requires SIMDLV >= 100 8 | #endif 9 | #include "common/simd/SIMD128.hpp" 10 | 11 | namespace a32 12 | { 13 | using namespace common; 14 | using namespace common::simd; 15 | using namespace COMMON_SIMD_NAMESPACE; 16 | #include "SIMDBaseTest.h" 17 | 18 | 19 | RegisterSIMDCastTest(I64x2, 100, I8x16, I16x8, I32x4 ); 20 | RegisterSIMDCastTest(U64x2, 100, U8x16, U16x8, U32x4 ); 21 | RegisterSIMDCastTest(I16x8, 100, F16x8); 22 | RegisterSIMDCastTest(U16x8, 100, F16x8); 23 | 24 | RegisterSIMDBaseTest(F32x4, 100, Rnd); 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /OpenCLUtil/oclPch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "oclRely.h" 3 | 4 | #include "XComputeBase/XCompNailang.h" 5 | #include "XComputeBase/XCompDebug.h" 6 | #include "Nailang/NailangParser.h" 7 | #include "Nailang/NailangRuntime.h" 8 | #include "SystemCommon/StringConvert.h" 9 | #include "SystemCommon/Format.h" 10 | 11 | #include "common/Linq2.hpp" 12 | #include "common/StringLinq.hpp" 13 | #include "common/StringEx.hpp" 14 | #include "common/StrParsePack.hpp" 15 | #include "common/ContainerHelper.hpp" 16 | 17 | #include "oclInternal.h" 18 | 19 | #define FMTSTR2(syntax, ...) common::str::Formatter{}.FormatStatic(FmtString(syntax), __VA_ARGS__) 20 | 21 | namespace oclu 22 | { 23 | 24 | common::mlog::MiniLogger& oclLog(); 25 | std::pair ParseVersionString(std::u16string_view str, const size_t verPos = 0); 26 | 27 | } -------------------------------------------------------------------------------- /common/simd/SIMD128.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SIMD.hpp" 3 | 4 | #if COMMON_ARCH_X86 5 | # include "SIMD128SSE.hpp" 6 | #else 7 | # include "SIMD128NEON.hpp" 8 | #endif 9 | 10 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U8x16) == 16); 11 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I8x16) == 16); 12 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U16x8) == 16); 13 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I16x8) == 16); 14 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U32x4) == 16); 15 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I32x4) == 16); 16 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::U64x2) == 16); 17 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::I64x2) == 16); 18 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::F32x4) == 16); 19 | static_assert(sizeof(COMMON_SIMD_NAMESPACE::F64x2) == 16); 20 | 21 | #define COMMON_SIMD_HAS_128 1 -------------------------------------------------------------------------------- /RenderCore/xzbuild.proj.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RenderCore", 3 | "type": "dynamic", 4 | "description": "Renderer core", 5 | "dependency": ["OpenGLUtil", "ImageUtil", "OpenCLUtil", "OpenCLInterop", "ResourcePackager", "FontHelper", "TextureUtil", "SystemCommon"], 6 | "library": 7 | { 8 | "static": [], 9 | "dynamic": ["pthread"] 10 | }, 11 | "targets": 12 | { 13 | "cpp": 14 | { 15 | "sources": 16 | [ 17 | "*.cpp", "Model/*.cpp", 18 | {"-": ["dllmain.cpp", "ShadowMapping.cpp"]} 19 | ], 20 | "defines": ["RENDERCORE_EXPORT"], 21 | "incpath": ["."], 22 | "pch": "RenderCoreRely.h" 23 | }, 24 | "rc": 25 | { 26 | "sources": ["*.rc"] 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /TextureUtil/TexUtilWorker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TexUtilRely.h" 3 | #include "SystemCommon/AsyncManager.h" 4 | 5 | 6 | #if COMMON_COMPILER_MSVC 7 | # pragma warning(push) 8 | # pragma warning(disable:4275 4251) 9 | #endif 10 | 11 | namespace oglu::texutil 12 | { 13 | 14 | class TEXUTILAPI TexUtilWorker : public common::NonCopyable, public common::NonMovable 15 | { 16 | private: 17 | common::asyexe::AsyncManager Executor; 18 | public: 19 | oglContext GLContext; 20 | oclu::oclContext CLContext; 21 | oclu::oclCmdQue CmdQue; 22 | TexUtilWorker(oglContext&& glContext, const oclu::oclContext& clContext); 23 | ~TexUtilWorker(); 24 | template 25 | auto AddTask(T&& task) { return Executor.AddTask(task); } 26 | }; 27 | 28 | } 29 | 30 | #if COMMON_COMPILER_MSVC 31 | # pragma warning(pop) 32 | #endif 33 | -------------------------------------------------------------------------------- /WPFTest/TextDialog.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |