├── .gitignore
├── Ghurund.sln
├── LICENSE
├── README.md
├── apps
├── Demo.UI
│ ├── .gitignore
│ ├── Demo.UI.vcxproj
│ ├── premake5.lua
│ ├── res
│ │ ├── TabIconLayout.xml
│ │ ├── TestRecycler.xml
│ │ ├── TestRow.xml
│ │ ├── buttonsTab.xml
│ │ └── layout.xml
│ └── src
│ │ ├── DemoApplication.h
│ │ ├── DemoLayout.h
│ │ ├── DemoWindow.h
│ │ ├── TestRecycler.h
│ │ └── main.cpp
├── Editor
│ ├── .gitignore
│ ├── Editor.vcxproj
│ ├── cpp.hint
│ ├── premake5.lua
│ ├── res
│ │ ├── EditorWindow.xml
│ │ ├── LayoutEditor.xml
│ │ ├── LogPanel.xml
│ │ ├── LogRow.xml
│ │ ├── PropertyPanel.xml
│ │ ├── SearchField.xml
│ │ ├── TitleBar.xml
│ │ └── ToolWindow.xml
│ └── src
│ │ ├── EditorApplication.h
│ │ ├── EditorLayout.h
│ │ ├── EditorWindow.h
│ │ ├── MainMenu.h
│ │ ├── control
│ │ ├── FpsText.h
│ │ ├── SearchField.h
│ │ ├── SearchFieldLayout.h
│ │ ├── TitleBar.h
│ │ └── ToolWindow.h
│ │ ├── main.cpp
│ │ └── tool
│ │ ├── LogPanel.h
│ │ ├── PropertyPanel.h
│ │ └── WidgetHierarchyPanel.h
├── Messenger
│ ├── Messenger.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── MessengerApplication.h
│ │ ├── MessengerWindow.cpp
│ │ ├── MessengerWindow.h
│ │ ├── TextMessage.h
│ │ └── main.cpp
├── Preview
│ ├── .gitignore
│ ├── Preview.vcxproj
│ ├── premake5.lua
│ ├── res
│ │ └── layout.xml
│ └── src
│ │ ├── PreviewApplication.h
│ │ ├── PreviewLayout.h
│ │ ├── PreviewWindow.h
│ │ └── main.cpp
├── engine.props
└── premake5.lua
├── engine
├── Engine.Core.DirectX
│ ├── Engine.Core.DirectX.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── Ghurund.Core.DirectX.h
│ │ ├── core
│ │ └── directx
│ │ │ ├── CommandList.cpp
│ │ │ ├── CommandList.h
│ │ │ ├── DirectXTypes.cpp
│ │ │ ├── DirectXTypes.h
│ │ │ ├── Exceptions.h
│ │ │ ├── Fence.cpp
│ │ │ ├── Fence.h
│ │ │ ├── Frame.cpp
│ │ │ ├── Frame.h
│ │ │ ├── Graphics.cpp
│ │ │ ├── Graphics.h
│ │ │ ├── MathTypes.cpp
│ │ │ ├── MathTypes.h
│ │ │ ├── SwapChain.cpp
│ │ │ ├── SwapChain.h
│ │ │ ├── adapter
│ │ │ ├── AdapterOutput.cpp
│ │ │ ├── AdapterOutput.h
│ │ │ ├── DisplayMode.cpp
│ │ │ ├── DisplayMode.h
│ │ │ ├── GraphicsAdapter.cpp
│ │ │ └── GraphicsAdapter.h
│ │ │ ├── buffer
│ │ │ ├── DepthBuffer.cpp
│ │ │ ├── DepthBuffer.h
│ │ │ ├── DescriptorHeap.cpp
│ │ │ ├── DescriptorHeap.h
│ │ │ ├── DynamicBuffer.h
│ │ │ ├── GPUBuffer.cpp
│ │ │ ├── GPUBuffer.h
│ │ │ ├── RenderTarget.cpp
│ │ │ └── RenderTarget.h
│ │ │ ├── memory
│ │ │ ├── GPUResourceFactory.cpp
│ │ │ ├── GPUResourceFactory.h
│ │ │ ├── GPUResourcePointer.cpp
│ │ │ ├── GPUResourcePointer.h
│ │ │ ├── HeapAllocator.cpp
│ │ │ └── HeapAllocator.h
│ │ │ ├── shader
│ │ │ ├── CompilationTarget.cpp
│ │ │ ├── CompilationTarget.h
│ │ │ ├── CompilerInclude.cpp
│ │ │ ├── CompilerInclude.h
│ │ │ ├── ConstantBuffer.cpp
│ │ │ ├── ConstantBuffer.h
│ │ │ ├── ConstantBufferField.h
│ │ │ ├── Sampler.h
│ │ │ ├── Shader.cpp
│ │ │ ├── Shader.h
│ │ │ ├── ShaderConstant.h
│ │ │ ├── ShaderProgram.cpp
│ │ │ ├── ShaderProgram.h
│ │ │ ├── ShaderType.cpp
│ │ │ ├── ShaderType.h
│ │ │ ├── TextureBufferConstant.h
│ │ │ └── TextureConstant.h
│ │ │ └── texture
│ │ │ ├── Texture.cpp
│ │ │ └── Texture.h
│ │ ├── ghcdxpch.cpp
│ │ └── ghcdxpch.h
├── Engine.Core
│ ├── Engine.Core.natvis
│ ├── Engine.Core.vcxproj
│ ├── packages.config
│ ├── premake5.lua
│ └── src
│ │ ├── Common.h
│ │ ├── Ghurund.Core.h
│ │ ├── Status.h
│ │ ├── core
│ │ ├── Buffer.h
│ │ ├── Concepts.h
│ │ ├── DataParsing.h
│ │ ├── Enum.h
│ │ ├── Event.h
│ │ ├── EventHandler.h
│ │ ├── Exceptions.h
│ │ ├── Hashing.h
│ │ ├── IUnknownImpl.h
│ │ ├── Id.h
│ │ ├── NamedObject.h
│ │ ├── Noncopyable.h
│ │ ├── Object.cpp
│ │ ├── Object.h
│ │ ├── Observable.h
│ │ ├── ObservableHandler.h
│ │ ├── Pointer.cpp
│ │ ├── Pointer.h
│ │ ├── SharedPointer.h
│ │ ├── StackTrace.h
│ │ ├── StateMachine.h
│ │ ├── SystemInfo.h
│ │ ├── Timer.cpp
│ │ ├── Timer.h
│ │ ├── Translations.h
│ │ ├── TypeSequence.h
│ │ ├── TypeWrapper.h
│ │ ├── allocation
│ │ │ ├── AllocationStrategy.h
│ │ │ ├── Allocator.h
│ │ │ ├── AllocatorMap.h
│ │ │ ├── CircularBufferStrategy.h
│ │ │ ├── PoolAllocator.h
│ │ │ ├── SimpleAllocator.h
│ │ │ └── SimpleBufferStrategy.h
│ │ ├── application
│ │ │ ├── Application.cpp
│ │ │ ├── Application.h
│ │ │ ├── Feature.cpp
│ │ │ ├── Feature.h
│ │ │ ├── FeatureCollection.h
│ │ │ ├── Settings.cpp
│ │ │ ├── Settings.h
│ │ │ ├── WindowCloseAction.h
│ │ │ └── WindowList.h
│ │ ├── collection
│ │ │ ├── Array.h
│ │ │ ├── ArrayCollection.h
│ │ │ ├── AverageValue.h
│ │ │ ├── Bag.h
│ │ │ ├── BufferedValue.h
│ │ │ ├── Collection.h
│ │ │ ├── CollectionWithCapacity.h
│ │ │ ├── HashMap.h
│ │ │ ├── LinkedList.h
│ │ │ ├── List.h
│ │ │ ├── Map.h
│ │ │ ├── ObservableList.h
│ │ │ ├── ObservablePointerList.h
│ │ │ ├── PointerArray.h
│ │ │ ├── PointerList.h
│ │ │ ├── PointerSet.h
│ │ │ ├── Queue.h
│ │ │ ├── Range.h
│ │ │ ├── Set.h
│ │ │ ├── Stack.h
│ │ │ ├── Tree.h
│ │ │ ├── TreeMap.h
│ │ │ ├── TypeMap.h
│ │ │ └── iterator
│ │ │ │ ├── ArrayIterator.h
│ │ │ │ ├── ListNodeIterator.h
│ │ │ │ ├── ReverseArrayIterator.h
│ │ │ │ ├── ReverseListNodeIterator.h
│ │ │ │ ├── ReverseTreeNodeIterator.h
│ │ │ │ └── TreeNodeIterator.h
│ │ ├── image
│ │ │ ├── Image.cpp
│ │ │ ├── Image.h
│ │ │ ├── ImageLoader.cpp
│ │ │ └── ImageLoader.h
│ │ ├── input
│ │ │ ├── EventConsumer.h
│ │ │ ├── Input.cpp
│ │ │ ├── Input.h
│ │ │ ├── InputEventArgs.h
│ │ │ ├── Keyboard.h
│ │ │ └── Mouse.h
│ │ ├── io
│ │ │ ├── DirectoryLibrary.h
│ │ │ ├── DirectoryPath.cpp
│ │ │ ├── DirectoryPath.h
│ │ │ ├── File.cpp
│ │ │ ├── File.h
│ │ │ ├── FileLibrary.h
│ │ │ ├── FilePath.cpp
│ │ │ ├── FilePath.h
│ │ │ ├── FileUtils.cpp
│ │ │ ├── FileUtils.h
│ │ │ ├── Library.h
│ │ │ ├── LibraryList.h
│ │ │ ├── MemoryStream.h
│ │ │ ├── Path.h
│ │ │ └── watcher
│ │ │ │ ├── DirectoryWatch.cpp
│ │ │ │ ├── DirectoryWatch.h
│ │ │ │ ├── FileChange.cpp
│ │ │ │ ├── FileChange.h
│ │ │ │ ├── FileWatcher.cpp
│ │ │ │ └── FileWatcher.h
│ │ ├── logging
│ │ │ ├── Formatter.h
│ │ │ ├── Log.h
│ │ │ ├── LogOutput.h
│ │ │ ├── LogType.cpp
│ │ │ ├── LogType.h
│ │ │ ├── Logger.cpp
│ │ │ └── Logger.h
│ │ ├── math
│ │ │ ├── MathUtils.h
│ │ │ ├── Matrix3x2.h
│ │ │ ├── Point.h
│ │ │ ├── Rect.h
│ │ │ └── Size.h
│ │ ├── reflection
│ │ │ ├── BaseProperty.h
│ │ │ ├── BaseTypedProperty.h
│ │ │ ├── Constructor.h
│ │ │ ├── Method.h
│ │ │ ├── OperationNotSupportedException.h
│ │ │ ├── Parameter.h
│ │ │ ├── Property.h
│ │ │ ├── ReadOnlyProperty.h
│ │ │ ├── StandardTypes.cpp
│ │ │ ├── StandardTypes.h
│ │ │ ├── Type.h
│ │ │ ├── TypeBuilder.h
│ │ │ ├── TypeModifier.cpp
│ │ │ ├── TypeModifier.h
│ │ │ └── WriteOnlyProperty.h
│ │ ├── resource
│ │ │ ├── Loader.h
│ │ │ ├── LoaderCollection.h
│ │ │ ├── ReloadTask.h
│ │ │ ├── Resource.cpp
│ │ │ ├── Resource.h
│ │ │ ├── ResourceFormat.h
│ │ │ ├── ResourceManager.cpp
│ │ │ ├── ResourceManager.h
│ │ │ ├── TextLoader.h
│ │ │ └── TextResource.h
│ │ ├── string
│ │ │ ├── FixedString.h
│ │ │ ├── GenericString.cpp
│ │ │ ├── GenericString.h
│ │ │ ├── GenericStringView.h
│ │ │ ├── String.h
│ │ │ ├── StringView.h
│ │ │ ├── TextConversionUtils.h
│ │ │ └── TextUtils.h
│ │ ├── threading
│ │ │ ├── APCThread.h
│ │ │ ├── ConcurrentTaskQueue.h
│ │ │ ├── ConditionVariable.h
│ │ │ ├── CriticalSection.h
│ │ │ ├── FunctionQueue.cpp
│ │ │ ├── FunctionQueue.h
│ │ │ ├── Task.cpp
│ │ │ ├── Task.h
│ │ │ ├── Thread.h
│ │ │ ├── ThreadPoolExecutor.cpp
│ │ │ ├── ThreadPoolExecutor.h
│ │ │ ├── Waitable.h
│ │ │ ├── WorkerThread.cpp
│ │ │ └── WorkerThread.h
│ │ └── window
│ │ │ ├── Clipboard.h
│ │ │ ├── DragDropManager.cpp
│ │ │ ├── DragDropManager.h
│ │ │ ├── SystemWindow.cpp
│ │ │ ├── SystemWindow.h
│ │ │ ├── Window.cpp
│ │ │ ├── Window.h
│ │ │ ├── WindowClass.cpp
│ │ │ ├── WindowClass.h
│ │ │ ├── WindowManager.h
│ │ │ ├── WindowMessage.h
│ │ │ ├── WindowProc.cpp
│ │ │ ├── WindowProc.h
│ │ │ └── WindowStyle.h
│ │ ├── ghcpch.cpp
│ │ └── ghcpch.h
├── Engine.UI.Direct2D
│ ├── Engine.UI.Direct2D.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── Ghurund.UI.Direct2D.h
│ │ ├── ghuidxpch.cpp
│ │ ├── ghuidxpch.h
│ │ └── ui
│ │ └── direct2d
│ │ ├── Canvas.cpp
│ │ ├── Canvas.h
│ │ ├── Graphics2D.cpp
│ │ ├── Graphics2D.h
│ │ ├── RenderTarget2D.cpp
│ │ ├── RenderTarget2D.h
│ │ ├── Shape.cpp
│ │ ├── Shape.h
│ │ ├── StrokeStyle.h
│ │ ├── UIContext.cpp
│ │ ├── UIContext.h
│ │ ├── drawable
│ │ ├── BitmapDrawable.cpp
│ │ ├── BitmapDrawable.h
│ │ ├── SvgDrawable.cpp
│ │ └── SvgDrawable.h
│ │ ├── effects
│ │ ├── ShadowEffect.h
│ │ └── TintEffect.h
│ │ ├── font
│ │ ├── Font.cpp
│ │ ├── Font.h
│ │ ├── FontCollectionLoader.cpp
│ │ ├── FontCollectionLoader.h
│ │ ├── FontFileEnumerator.cpp
│ │ ├── FontFileEnumerator.h
│ │ ├── FontLoader.cpp
│ │ └── FontLoader.h
│ │ ├── image
│ │ ├── Bitmap.cpp
│ │ ├── Bitmap.h
│ │ ├── BitmapLoader.h
│ │ ├── SvgDocument.cpp
│ │ └── SvgDocument.h
│ │ ├── loading
│ │ ├── ImageDrawableFactory.h
│ │ ├── LayoutLoader.h
│ │ ├── ShapeFactory.h
│ │ └── TextFormatFactory.h
│ │ └── text
│ │ ├── TextFormat.cpp
│ │ ├── TextFormat.h
│ │ ├── TextLayout.cpp
│ │ └── TextLayout.h
├── Engine.UI.GDI
│ ├── Engine.UI.GDI.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── Ghurund.UI.GDI.h
│ │ ├── ghuigdipch.cpp
│ │ ├── ghuigdipch.h
│ │ └── ui
│ │ └── gdi
│ │ ├── Canvas.cpp
│ │ ├── Canvas.h
│ │ ├── Gdi.h
│ │ ├── Shape.cpp
│ │ ├── Shape.h
│ │ ├── StrokeStyle.h
│ │ ├── UIContext.cpp
│ │ ├── UIContext.h
│ │ ├── drawable
│ │ ├── BitmapDrawable.cpp
│ │ ├── BitmapDrawable.h
│ │ ├── SvgDrawable.cpp
│ │ └── SvgDrawable.h
│ │ ├── effects
│ │ ├── ShadowEffect.h
│ │ └── TintEffect.h
│ │ ├── font
│ │ ├── Font.cpp
│ │ ├── Font.h
│ │ ├── FontLoader.cpp
│ │ └── FontLoader.h
│ │ ├── image
│ │ ├── Bitmap.cpp
│ │ ├── Bitmap.h
│ │ ├── BitmapLoader.h
│ │ ├── SvgDocument.cpp
│ │ └── SvgDocument.h
│ │ ├── loading
│ │ ├── ImageDrawableFactory.h
│ │ ├── ShapeFactory.h
│ │ └── TextFormatFactory.h
│ │ └── text
│ │ ├── TextFormat.cpp
│ │ ├── TextFormat.h
│ │ ├── TextLayout.cpp
│ │ └── TextLayout.h
├── Engine.UI
│ ├── .gitignore
│ ├── Engine.UI.natvis
│ ├── Engine.UI.vcxproj
│ ├── UISchema.xsd
│ ├── packages.config
│ ├── premake5.lua
│ ├── res
│ │ ├── Button.xml
│ │ ├── CheckBox.xml
│ │ ├── ExpandableContainer.xml
│ │ ├── ScrollBar.xml
│ │ ├── Tab.xml
│ │ ├── TabContainer.xml
│ │ ├── Toolbar.xml
│ │ └── TreeRow.xml
│ └── src
│ │ ├── Ghurund.UI.h
│ │ ├── ghuipch.cpp
│ │ ├── ghuipch.h
│ │ └── ui
│ │ ├── Alignment.cpp
│ │ ├── Alignment.h
│ │ ├── Animation.h
│ │ ├── Binding.h
│ │ ├── Canvas.h
│ │ ├── Color.cpp
│ │ ├── Color.h
│ │ ├── Cursor.cpp
│ │ ├── Cursor.h
│ │ ├── Orientation.h
│ │ ├── Padding.h
│ │ ├── PreferredSize.cpp
│ │ ├── PreferredSize.h
│ │ ├── README.md
│ │ ├── RootView.cpp
│ │ ├── RootView.h
│ │ ├── Shape.cpp
│ │ ├── Shape.h
│ │ ├── StrokeStyle.h
│ │ ├── UIContext.cpp
│ │ ├── UIContext.h
│ │ ├── adapter
│ │ ├── AdapterChildrenProvider.h
│ │ ├── ControlPool.h
│ │ ├── ItemAdapter.h
│ │ ├── ItemSource.h
│ │ ├── RecyclerView.cpp
│ │ └── RecyclerView.h
│ │ ├── control
│ │ ├── Border.cpp
│ │ ├── Border.h
│ │ ├── ChildrenProvider.h
│ │ ├── ClickableControl.cpp
│ │ ├── ClickableControl.h
│ │ ├── Clip.cpp
│ │ ├── Clip.h
│ │ ├── ColorView.cpp
│ │ ├── ColorView.h
│ │ ├── Control.cpp
│ │ ├── Control.h
│ │ ├── ControlContainer.cpp
│ │ ├── ControlContainer.h
│ │ ├── ControlGroup.cpp
│ │ ├── ControlGroup.h
│ │ ├── ControlList.h
│ │ ├── ControlParent.cpp
│ │ ├── ControlParent.h
│ │ ├── ImageView.cpp
│ │ ├── ImageView.h
│ │ ├── InvalidControl.cpp
│ │ ├── InvalidControl.h
│ │ ├── MouseEvents.h
│ │ ├── PaddingContainer.cpp
│ │ ├── PaddingContainer.h
│ │ ├── ScrollView.cpp
│ │ ├── ScrollView.h
│ │ ├── SelectableView.cpp
│ │ ├── SelectableView.h
│ │ ├── Shadow.cpp
│ │ ├── Shadow.h
│ │ ├── Space.cpp
│ │ └── Space.h
│ │ ├── drawable
│ │ ├── CursorDrawable.cpp
│ │ ├── CursorDrawable.h
│ │ ├── Drawable.cpp
│ │ ├── Drawable.h
│ │ ├── ImageDrawable.h
│ │ ├── InvalidImageDrawable.cpp
│ │ └── InvalidImageDrawable.h
│ │ ├── effects
│ │ ├── DrawingEffect.h
│ │ ├── ShadowEffect.h
│ │ └── TintEffect.h
│ │ ├── font
│ │ ├── Font.cpp
│ │ └── Font.h
│ │ ├── image
│ │ ├── Bitmap.cpp
│ │ ├── Bitmap.h
│ │ ├── VectorImage.cpp
│ │ └── VectorImage.h
│ │ ├── layout
│ │ ├── DesktopLayout.cpp
│ │ ├── DesktopLayout.h
│ │ ├── FlowLayout.cpp
│ │ ├── FlowLayout.h
│ │ ├── FlowLayoutManager.cpp
│ │ ├── FlowLayoutManager.h
│ │ ├── HorizontalLayoutManager.h
│ │ ├── LayoutManager.cpp
│ │ ├── LayoutManager.h
│ │ ├── LinearLayout.cpp
│ │ ├── LinearLayout.h
│ │ ├── LinearLayoutManager.cpp
│ │ ├── LinearLayoutManager.h
│ │ ├── ManualLayout.cpp
│ │ ├── ManualLayout.h
│ │ ├── ManualLayoutManager.cpp
│ │ ├── ManualLayoutManager.h
│ │ ├── StackLayout.cpp
│ │ ├── StackLayout.h
│ │ ├── StackLayoutManager.cpp
│ │ ├── StackLayoutManager.h
│ │ ├── VerticalLayoutManager.cpp
│ │ └── VerticalLayoutManager.h
│ │ ├── loading
│ │ ├── ImageDrawableFactory.h
│ │ ├── LayoutLoader.cpp
│ │ ├── LayoutLoader.h
│ │ ├── ShapeFactory.h
│ │ └── TextFormatFactory.h
│ │ ├── style
│ │ ├── BaseTheme.h
│ │ ├── ColorAttr.cpp
│ │ ├── ColorAttr.h
│ │ ├── DarkTheme.h
│ │ ├── LightTheme.h
│ │ ├── Style.cpp
│ │ ├── Style.h
│ │ ├── Theme.cpp
│ │ ├── Theme.h
│ │ └── WindowsTheme.h
│ │ ├── text
│ │ ├── ITextLayout.h
│ │ ├── Selection.h
│ │ ├── SetSelectionMode.h
│ │ ├── TextBlock.cpp
│ │ ├── TextBlock.h
│ │ ├── TextBlockStyle.cpp
│ │ ├── TextBlockStyle.h
│ │ ├── TextField.cpp
│ │ ├── TextField.h
│ │ ├── TextFormat.cpp
│ │ ├── TextFormat.h
│ │ ├── TextMetrics.h
│ │ ├── TextView.cpp
│ │ ├── TextView.h
│ │ └── license.txt
│ │ ├── widget
│ │ ├── ClickResponseView.cpp
│ │ ├── ClickResponseView.h
│ │ ├── ContentWidget.h
│ │ ├── DragHelper.cpp
│ │ ├── DragHelper.h
│ │ ├── ExpandableContainer.cpp
│ │ ├── ExpandableContainer.h
│ │ ├── LayoutBinding.h
│ │ ├── ProgressBar.cpp
│ │ ├── ProgressBar.h
│ │ ├── Separator.cpp
│ │ ├── Separator.h
│ │ ├── SeparatorStyle.h
│ │ ├── SplitLayout.cpp
│ │ ├── SplitLayout.h
│ │ ├── StateIndicator.cpp
│ │ ├── StateIndicator.h
│ │ ├── VerticalScrollBar.cpp
│ │ ├── VerticalScrollBar.h
│ │ ├── Widget.h
│ │ ├── button
│ │ │ ├── Button.cpp
│ │ │ ├── Button.h
│ │ │ ├── CheckBox.cpp
│ │ │ ├── CheckBox.h
│ │ │ ├── CheckBoxRadio.cpp
│ │ │ ├── CheckBoxRadio.h
│ │ │ ├── RadioButton.cpp
│ │ │ ├── RadioButton.h
│ │ │ └── RadioGroup.h
│ │ ├── menu
│ │ │ ├── DropDown.h
│ │ │ ├── DropDownLayout.h
│ │ │ ├── MenuItem.h
│ │ │ ├── PopupMenu.h
│ │ │ ├── PopupMenuAdapter.h
│ │ │ ├── Toolbar.h
│ │ │ ├── ToolbarAdapter.cpp
│ │ │ └── ToolbarAdapter.h
│ │ ├── property
│ │ │ ├── BoolPropertyRow.h
│ │ │ ├── ObjectProperty.h
│ │ │ ├── PropertyList.h
│ │ │ ├── PropertyRow.h
│ │ │ └── StringPropertyRow.h
│ │ ├── tab
│ │ │ ├── Tab.h
│ │ │ ├── TabContainer.cpp
│ │ │ ├── TabContainer.h
│ │ │ ├── TabItemAdapter.cpp
│ │ │ └── TabItemAdapter.h
│ │ └── tree
│ │ │ ├── TreeItem.h
│ │ │ ├── TreeRow.h
│ │ │ ├── TreeRowAdapter.h
│ │ │ ├── TreeView.cpp
│ │ │ └── TreeView.h
│ │ └── window
│ │ ├── VirtualWindow.h
│ │ ├── VirtualWindowManager.h
│ │ ├── WindowFrame.cpp
│ │ └── WindowFrame.h
├── Engine
│ ├── Engine.vcxproj
│ ├── packages.config
│ ├── premake5.lua
│ └── src
│ │ ├── Ghurund.Engine.h
│ │ ├── application
│ │ ├── ApplicationWindow.cpp
│ │ ├── ApplicationWindow.h
│ │ ├── Layer.h
│ │ ├── LayerList.cpp
│ │ └── LayerList.h
│ │ ├── audio
│ │ ├── Audio.cpp
│ │ ├── Audio.h
│ │ ├── Sound.cpp
│ │ ├── Sound.h
│ │ └── Sound3d.h
│ │ ├── editor
│ │ ├── CameraUtils.h
│ │ ├── EditorComponent.h
│ │ ├── ObservableObject.h
│ │ ├── ThumbnailRenderer.cpp
│ │ └── ThumbnailRenderer.h
│ │ ├── game
│ │ ├── GameAction.cpp
│ │ ├── GameAction.h
│ │ ├── KeyMap.h
│ │ ├── entity
│ │ │ ├── Entity.h
│ │ │ ├── Scene.cpp
│ │ │ ├── Scene.h
│ │ │ ├── Scenes.h
│ │ │ ├── TransformComponent.h
│ │ │ ├── camera
│ │ │ │ ├── Camera.cpp
│ │ │ │ ├── Camera.h
│ │ │ │ ├── CameraComponent.h
│ │ │ │ ├── CameraController.cpp
│ │ │ │ ├── CameraController.h
│ │ │ │ └── CameraEntity.h
│ │ │ └── light
│ │ │ │ ├── Light.cpp
│ │ │ │ ├── Light.h
│ │ │ │ ├── LightComponent.h
│ │ │ │ └── LightEntity.h
│ │ ├── parameter
│ │ │ ├── Parameter.cpp
│ │ │ ├── Parameter.h
│ │ │ ├── ParameterId.cpp
│ │ │ ├── ParameterId.h
│ │ │ ├── ParameterManager.cpp
│ │ │ ├── ParameterManager.h
│ │ │ ├── ParameterProvider.cpp
│ │ │ ├── ParameterProvider.h
│ │ │ ├── ParameterType.cpp
│ │ │ ├── ParameterType.h
│ │ │ ├── TextureParameter.h
│ │ │ └── ValueParameter.h
│ │ └── sky
│ │ │ ├── AdvancedSky.h
│ │ │ ├── BasicSky.h
│ │ │ └── Sky.h
│ │ ├── ghpch.cpp
│ │ ├── ghpch.h
│ │ ├── graphics
│ │ ├── DrawableComponent.h
│ │ ├── DrawableComponents.cpp
│ │ ├── DrawableComponents.h
│ │ ├── DrawingSystem.h
│ │ ├── LightSystem.h
│ │ ├── Material.cpp
│ │ ├── Material.h
│ │ ├── Materials.cpp
│ │ ├── Materials.h
│ │ ├── Postprocess.h
│ │ ├── Renderer.cpp
│ │ ├── Renderer.h
│ │ ├── RenderingStatistics.cpp
│ │ ├── RenderingStatistics.h
│ │ ├── Shaders.h
│ │ ├── Textures.h
│ │ └── mesh
│ │ │ ├── ConeMesh.cpp
│ │ │ ├── ConeMesh.h
│ │ │ ├── CubeMesh.cpp
│ │ │ ├── CubeMesh.h
│ │ │ ├── Mesh.cpp
│ │ │ ├── Mesh.h
│ │ │ ├── PlaneMesh.h
│ │ │ ├── QuadMesh.h
│ │ │ ├── SphereMesh.cpp
│ │ │ ├── SphereMesh.h
│ │ │ └── Vertex.h
│ │ ├── net
│ │ ├── Client.cpp
│ │ ├── Client.h
│ │ ├── ClientMessage.h
│ │ ├── Connection.h
│ │ ├── Message.cpp
│ │ ├── Message.h
│ │ ├── MessageType.cpp
│ │ ├── MessageType.h
│ │ ├── Networking.cpp
│ │ ├── Networking.h
│ │ ├── ReliableUDP.cpp
│ │ ├── ReliableUDP.h
│ │ ├── Server.cpp
│ │ ├── Server.h
│ │ ├── ServerMessage.h
│ │ ├── Socket.cpp
│ │ └── Socket.h
│ │ ├── physics
│ │ ├── Physics.cpp
│ │ ├── Physics.h
│ │ ├── PhysicsComponent.h
│ │ ├── PhysicsSystem.h
│ │ └── RigidBodyComponent.h
│ │ ├── script
│ │ ├── Script.cpp
│ │ ├── Script.h
│ │ ├── ScriptComponent.h
│ │ ├── ScriptEngine.cpp
│ │ ├── ScriptEngine.h
│ │ ├── Scripts.h
│ │ ├── StringFactory.h
│ │ ├── angelscript
│ │ │ ├── scriptmath.cpp
│ │ │ └── scriptmath.h
│ │ └── bindings
│ │ │ ├── CameraScriptBindings.h
│ │ │ ├── CollectionScriptBindings.h
│ │ │ ├── EntityScriptBindings.h
│ │ │ ├── Float3ScriptBindings.h
│ │ │ ├── LightScriptBindings.h
│ │ │ ├── ModelScriptBindings.h
│ │ │ ├── SceneScriptBindings.h
│ │ │ ├── ScriptBindings.h
│ │ │ └── TimerScriptBindings.h
│ │ └── ui
│ │ ├── UIFeature.cpp
│ │ ├── UIFeature.h
│ │ └── UILayer.h
├── UnitTest.Core
│ ├── UnitTest.Core.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── MemoryGuard.h
│ │ ├── TestClass.h
│ │ ├── TestUtils.h
│ │ ├── core
│ │ ├── ObservableTest.cpp
│ │ ├── TypeWrapperTest.cpp
│ │ ├── collection
│ │ │ ├── ArrayIteratorTest.cpp
│ │ │ ├── BagTest.cpp
│ │ │ ├── LinkedListTest.cpp
│ │ │ ├── ListTest.cpp
│ │ │ ├── MapTest.cpp
│ │ │ ├── QueueTest.cpp
│ │ │ ├── RangeTest.cpp
│ │ │ ├── ReverseIteratorTest.cpp
│ │ │ ├── SetTest.cpp
│ │ │ ├── StackTest.cpp
│ │ │ ├── TestAllocator.h
│ │ │ └── TreeTest.cpp
│ │ ├── io
│ │ │ └── PathTest.cpp
│ │ ├── reflection
│ │ │ ├── ReflectionTest.cpp
│ │ │ ├── TestClass.h
│ │ │ └── TypeTest.cpp
│ │ ├── resource
│ │ │ └── ResourceManagerTest.cpp
│ │ ├── string
│ │ │ └── StringTest.cpp
│ │ └── threading
│ │ │ ├── ThreadPoolExecutorTest.cpp
│ │ │ └── WorkerThreadTest.cpp
│ │ ├── pch.cpp
│ │ └── pch.h
├── UnitTest.UI
│ ├── UnitTest.UI.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── FloatSize.h
│ │ ├── TestImage.h
│ │ ├── pch.cpp
│ │ ├── pch.h
│ │ └── ui
│ │ ├── AlignmentTest.cpp
│ │ ├── ColorTest.cpp
│ │ ├── PreferredSizeTest.cpp
│ │ └── control
│ │ ├── ImageViewTest.cpp
│ │ └── TextBlockTest.cpp
├── UnitTest
│ ├── UnitTest.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── TestUtils.h
│ │ ├── main.cpp
│ │ ├── net
│ │ └── MessageTest.cpp
│ │ ├── pch.cpp
│ │ └── pch.h
└── premake5.lua
├── images
└── buttons.png
├── libs.props
├── premake5.lua
├── resources
├── fonts
│ ├── lato_bold.ttf
│ ├── lato_bolditalic.ttf
│ ├── lato_italic.ttf
│ ├── lato_light.ttf
│ ├── lato_lightitalic.ttf
│ ├── lato_medium.ttf
│ ├── lato_mediumitalic.ttf
│ └── lato_regular.ttf
├── icons
│ ├── arrow down 18.png
│ ├── arrow right 18.png
│ ├── arrow up 18.png
│ ├── category 18.png
│ ├── checkBox checked 32.png
│ ├── checkBox unchecked 32.png
│ ├── checkbox checked 18.png
│ ├── checkbox unchecked 18.png
│ ├── copy 18.png
│ ├── cut 18.png
│ ├── face 24.svg
│ ├── file 18.png
│ ├── folder 18.png
│ ├── icon save 32.png
│ ├── lock 24.svg
│ ├── material
│ │ ├── close 18.png
│ │ ├── help 18.png
│ │ ├── maximize 18.png
│ │ └── minimize 18.png
│ ├── more 18.png
│ ├── paste 18.png
│ ├── play 18.png
│ ├── radiobutton checked 18.png
│ ├── radiobutton unchecked 18.png
│ ├── search 18.png
│ ├── sort 18.png
│ ├── stop 18.png
│ └── windows
│ │ ├── close 18.png
│ │ ├── help 18.png
│ │ ├── maximize 18.png
│ │ └── minimize 18.png
├── layouts
│ ├── ButtonAccentLayout.xml
│ ├── ButtonDefaultLayout.xml
│ ├── ButtonFlatLayout.xml
│ ├── ButtonIconLayout.xml
│ ├── ButtonIconOnAccentLayout.xml
│ ├── ButtonImageLayout.xml
│ ├── ButtonLayout.xml
│ ├── ButtonOutlinedLayout.xml
│ ├── CheckBoxLayout.xml
│ ├── ExpandableContainer.xml
│ ├── HorizontalScrollBar.xml
│ ├── LogRow.xml
│ ├── RadioButtonLayout.xml
│ ├── ToolbarLarge.xml
│ ├── ToolbarSmall.xml
│ ├── TreeItem.xml
│ ├── VerticalScrollBar.xml
│ ├── WindowFrame.xml
│ ├── scrollBar test.xml
│ └── test.xml
├── shaders
│ ├── advancedSky.hlsl
│ ├── basic.hlsl
│ ├── basicLight.hlsl
│ ├── basicSky.hlsl
│ ├── common.hlsli
│ ├── invalid.hlsl
│ ├── lightPass.hlsl
│ ├── normals.hlsl
│ ├── outline.hlsl
│ ├── toon.hlsl
│ └── wireframe.hlsl
└── textures
│ ├── checker.png
│ ├── diffuse.png
│ ├── normal.png
│ └── specular.png
├── samples
├── UI.Direct2D
│ ├── UI.Direct2D.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── Direct2DWindow.cpp
│ │ ├── Direct2DWindow.h
│ │ └── main.cpp
├── UI.GDI
│ ├── UI.GDI.vcxproj
│ ├── premake5.lua
│ └── src
│ │ ├── GdiWindow.cpp
│ │ ├── GdiWindow.h
│ │ └── main.cpp
├── UI.Text
│ ├── UI.Text.vcxproj
│ └── premake5.lua
└── premake5.lua
└── tools
├── SystemInfo
├── SystemInfo.cpp
├── SystemInfo.vcxproj
└── premake5.lua
└── premake5.lua
/apps/Demo.UI/.gitignore:
--------------------------------------------------------------------------------
1 | generated
--------------------------------------------------------------------------------
/apps/Demo.UI/res/TabIconLayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/apps/Demo.UI/res/TestRecycler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/apps/Demo.UI/res/buttonsTab.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/Demo.UI/res/layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/Demo.UI/src/DemoApplication.h:
--------------------------------------------------------------------------------
1 | #include "core/math/MathUtils.h"
2 | #include "DemoWindow.h"
3 |
4 | namespace Demo {
5 | using namespace Ghurund;
6 | using namespace Ghurund::UI;
7 |
8 | class DemoApplication:public Application {
9 | public:
10 | DemoApplication() {
11 | Features.add(ghnew UIFeature(*this));
12 | }
13 |
14 | virtual Status onInit() override {
15 | auto window = ghnew DemoWindow(*this);
16 | window->Size = Settings.windowSize;
17 | Windows.add(window);
18 | window->Visible = true;
19 | window->bringToFront();
20 | return Status::OK;
21 | }
22 | };
23 | }
24 |
--------------------------------------------------------------------------------
/apps/Demo.UI/src/DemoLayout.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "LayoutBinding.h"
4 | #include "ui/widget/Widget.h"
5 | #include
6 | #include
7 | #include "ui/layout/StackLayout.h"
8 | #include
9 |
10 | namespace Demo {
11 | using namespace Ghurund::UI;
12 |
13 | class DemoLayout:public Widget {
14 | private:
15 | TestRecycler* testRecycler;
16 |
17 | protected:
18 | virtual void onLayoutChanged() override {
19 | if (!Layout)
20 | return;
21 |
22 | testRecycler = ghnew TestRecycler();
23 | Layout->Container->Children.add(testRecycler);
24 | }
25 |
26 | public:
27 | inline StackLayout* getContainer() {
28 | return Layout->Container;
29 | }
30 |
31 | __declspec(property(get = getContainer)) StackLayout* Container;
32 | };
33 | }
--------------------------------------------------------------------------------
/apps/Demo.UI/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "Ghurund.h"
2 |
3 | #include "DemoApplication.h"
4 |
5 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int nCmdShow) {
6 | Ghurund::Settings settings;
7 | settings.parse(GetCommandLine());
8 | Ghurund::main(settings);
9 | return 0;
10 | }
--------------------------------------------------------------------------------
/apps/Editor/.gitignore:
--------------------------------------------------------------------------------
1 | generated
--------------------------------------------------------------------------------
/apps/Editor/cpp.hint:
--------------------------------------------------------------------------------
1 | // Hint files help the Visual Studio IDE interpret Visual C++ identifiers
2 | // such as names of functions and macros.
3 | // For more information see https://go.microsoft.com/fwlink/?linkid=865984
4 | #define ghnew new(_NORMAL_BLOCK, __FILE__, __LINE__)
5 |
--------------------------------------------------------------------------------
/apps/Editor/res/EditorWindow.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apps/Editor/res/LayoutEditor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apps/Editor/res/LogPanel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/apps/Editor/res/LogRow.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
10 |
11 |
--------------------------------------------------------------------------------
/apps/Editor/res/PropertyPanel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/apps/Editor/res/SearchField.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
9 |
10 |
11 |
13 |
15 |
16 |
22 |
23 |
--------------------------------------------------------------------------------
/apps/Editor/res/TitleBar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
11 |
12 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/apps/Editor/res/ToolWindow.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/apps/Editor/src/EditorApplication.h:
--------------------------------------------------------------------------------
1 | #include "EditorWindow.h"
2 | #include "ui/UIFeature.h"
3 |
4 | namespace Ghurund::Editor {
5 | class EditorApplication:public Ghurund::Application {
6 | public:
7 | EditorApplication() {
8 | Features.add(ghnew UIFeature(*this));
9 | }
10 |
11 | virtual Status onInit() override {
12 | auto window = ghnew EditorWindow(*this);
13 | window->Size = Settings.windowSize;
14 | Windows.add(window);
15 | window->Visible = true;
16 | window->bringToFront();
17 | return Status::OK;
18 | }
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/apps/Editor/src/MainMenu.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ui/widget/MenuBar.h"
4 |
5 | class MainMenu:public Ghurund::UI::MenuBar {
6 | public:
7 | MainMenu():MenuBar(makeTheme()){}
8 |
9 | Theme makeTheme()
10 | };
--------------------------------------------------------------------------------
/apps/Editor/src/control/FpsText.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "core/collection/AverageValue.h"
4 | #include "ui/text/TextBlock.h"
5 |
6 | namespace Ghurund::Editor {
7 | using namespace Ghurund::UI;
8 |
9 | class FpsText:public TextBlock {
10 | private:
11 | AverageValue avgValue = AverageValue(30, 20);
12 | const Timer& timer;
13 |
14 | public:
15 | FpsText(Ghurund::UI::TextFormat* textFormat, uint32_t color, const Timer& timer):TextBlock(L"", color, textFormat), timer(timer) {}
16 |
17 | virtual void onUpdate(const uint64_t time) override {
18 | avgValue.set(1.0f / timer.FrameTime);
19 | Text = fmt::format(L"fps: {:.2f}", avgValue.get()).c_str();
20 | invalidate();
21 | }
22 | };
23 | }
--------------------------------------------------------------------------------
/apps/Editor/src/control/SearchFieldLayout.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "SearchFieldBinding.h"
4 |
5 | #include "ui/widget/button/Button.h"
6 | #include "ui/widget/text/TextField.h"
7 |
8 | namespace Ghurund::Editor {
9 | using namespace Ghurund::UI;
10 |
11 | class SearchFieldLayout:public SearchFieldBinding {
12 | private:
13 | EventHandler stateHandler = [this](Control& control) {
14 | Hint->Visible = QueryField->Focused;
15 | return true;
16 | };
17 |
18 | public:
19 | SearchFieldLayout(Control* layout):SearchFieldBinding(layout) {
20 | QueryField->StateChanged.add(stateHandler);
21 | }
22 |
23 | ~SearchFieldLayout() {
24 | QueryField->StateChanged.remove(stateHandler);
25 | }
26 | };
27 | }
--------------------------------------------------------------------------------
/apps/Editor/src/control/TitleBar.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "TitleBarBinding.h"
4 | #include "ui/text/TextBlock.h"
5 |
6 | namespace Ghurund::Editor {
7 | using namespace Ghurund::UI;
8 |
9 | class TitleBar:public Widget {
10 | public:
11 | inline const WString& getText() {
12 | return Layout->Title->Text;
13 | }
14 |
15 | inline void setText(const WString& text) {
16 | Layout->Title->Text = text;
17 | }
18 |
19 | __declspec(property(get = getText, put = setText)) const WString& Text;
20 | };
21 | }
--------------------------------------------------------------------------------
/apps/Editor/src/control/ToolWindow.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "TitleBar.h"
4 | #include "ToolWindowBinding.h"
5 |
6 | #include "ui/layout/StackLayout.h"
7 | #include "ui/widget/ContainerWidget.h"
8 |
9 | namespace Ghurund::Editor {
10 | using namespace Ghurund::UI;
11 |
12 | class ToolWindow:public ContainerWidget {
13 | public:
14 | inline const WString& getTitle() {
15 | return Layout->TitleBar->Text;
16 | }
17 |
18 | inline void setTitle(const WString& text) {
19 | Layout->TitleBar->Text = text;
20 | }
21 |
22 | __declspec(property(get = getTitle, put = setTitle)) const WString& Title;
23 | };
24 | }
--------------------------------------------------------------------------------
/apps/Editor/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "Ghurund.h"
2 |
3 | #include "EditorApplication.h"
4 |
5 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int nCmdShow) {
6 | Ghurund::Settings settings;
7 | settings.parse(GetCommandLine());
8 | Ghurund::main(_T("Ghurund::Editor"), settings);
9 | return 0;
10 | }
--------------------------------------------------------------------------------
/apps/Messenger/src/TextMessage.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "net/ClientMessage.h"
4 |
5 | namespace Messenger {
6 | struct TextMessage:public Ghurund::Net::ClientMessage {
7 | TextMessage() {
8 | type = Ghurund::Net::MessageType::RELIABLE.Value;
9 | messageType = (uint8_t)Ghurund::Net::ClientMessageType::USER;
10 | }
11 | };
12 | }
--------------------------------------------------------------------------------
/apps/Messenger/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "Ghurund.h"
2 |
3 | #include "MessengerApplication.h"
4 |
5 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int nCmdShow) {
6 | Ghurund::Settings settings;
7 | settings.windowSize = { 200,300 };
8 | settings.parse(GetCommandLine());
9 | std::unique_ptr logOutput = std::make_unique(_T("logs"));
10 | Ghurund::main(settings, std::move(logOutput));
11 | return 0;
12 | }
--------------------------------------------------------------------------------
/apps/Preview/.gitignore:
--------------------------------------------------------------------------------
1 | generated
--------------------------------------------------------------------------------
/apps/Preview/res/layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/apps/Preview/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "Ghurund.Engine.h"
2 |
3 | #include "PreviewApplication.h"
4 |
5 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int nCmdShow) {
6 | Ghurund::Settings settings;
7 | settings.parse(GetCommandLine());
8 | Ghurund::main(&settings);
9 | return 0;
10 | }
--------------------------------------------------------------------------------
/apps/engine.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | $(SolutionDir)engine\Engine\generated\reflection;$(SolutionDir)engine\Engine\src;$(SolutionDir)engine\Engine.UI\generated\reflection;$(SolutionDir)engine\Engine.UI\generated\bindings;$(SolutionDir)engine\Engine.UI\src;$(SolutionDir)engine\Engine.Core\src;$(IncludePath)
7 | $(SolutionDir)Debug;$(LibraryPath)
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/apps/premake5.lua:
--------------------------------------------------------------------------------
1 | group "apps"
2 |
3 | include "Demo.UI"
4 | include "Editor"
5 | include "Messenger"
6 | include "Preview"
7 |
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/premake5.lua:
--------------------------------------------------------------------------------
1 | project "Engine.Core.DirectX"
2 | kind "StaticLib"
3 | pchheader "ghcdxpch.h"
4 | pchsource "src/ghcdxpch.cpp"
5 | staticruntime "on"
6 |
7 | dependson {
8 | "Engine.Core"
9 | }
10 |
11 | files {
12 | "src/**.h",
13 | "src/**.cpp",
14 | }
15 |
16 | defines { "_CRT_SECURE_NO_WARNINGS" }
17 |
18 | includedirs {
19 | "src",
20 | includeDir["Engine.Core"],
21 | includeDir["DirectX"]
22 | }
23 |
24 | links {
25 | "Engine.Core"
26 | }
27 |
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/Ghurund.Core.DirectX.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Ghurund.Core.h"
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/DirectXTypes.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "core/reflection/Type.h"
4 | #include "core/directx/buffer/DescriptorHeap.h"
5 | #include "core/directx/memory/GPUResourceFactory.h"
6 |
7 | #include
8 | #include
9 |
10 | namespace Ghurund::Core {
11 | template<>
12 | const Type& getType();
13 |
14 | template<>
15 | const Type& getType();
16 |
17 | template<>
18 | const Type& getType();
19 |
20 | template<>
21 | const Type& getType();
22 |
23 | template<>
24 | const Type& getType();
25 | }
26 |
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/Exceptions.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace Ghurund {
6 | class DirectX12NotSupportedException:public std::exception {};
7 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/MathTypes.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "MathTypes.h"
3 |
4 | namespace Ghurund::Core {
5 | template<>
6 | const Type& getType<::DirectX::XMFLOAT2>() {
7 | static Type TYPE = Type("DirectX", "XMFLOAT2", sizeof(::DirectX::XMFLOAT2));
8 | return TYPE;
9 | }
10 |
11 | template<>
12 | const Type& getType<::DirectX::XMFLOAT3>() {
13 | static Type TYPE = Type("DirectX", "XMFLOAT3", sizeof(::DirectX::XMFLOAT3));
14 | return TYPE;
15 | }
16 |
17 | template<>
18 | const Type& getType<::DirectX::XMFLOAT4>() {
19 | static Type TYPE = Type("DirectX", "XMFLOAT4", sizeof(::DirectX::XMFLOAT4));
20 | return TYPE;
21 | }
22 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/MathTypes.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "core/reflection/Type.h"
4 |
5 | #include
6 |
7 | namespace Ghurund::Core {
8 | template<>
9 | const Type& getType<::DirectX::XMFLOAT2>();
10 |
11 | template<>
12 | const Type& getType<::DirectX::XMFLOAT3>();
13 |
14 | template<>
15 | const Type& getType<::DirectX::XMFLOAT4>();
16 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/adapter/AdapterOutput.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "AdapterOutput.h"
3 |
4 | #include "core/reflection/TypeBuilder.h"
5 |
6 | namespace Ghurund::Core::DirectX {
7 | const Ghurund::Core::Type& AdapterOutput::GET_TYPE() {
8 | static const Ghurund::Core::Type TYPE = TypeBuilder(Ghurund::Core::DirectX::NAMESPACE_NAME, GH_STRINGIFY(AdapterOutput))
9 | .withSupertype(Object::TYPE);
10 |
11 | return TYPE;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/adapter/DisplayMode.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "DisplayMode.h"
3 |
4 | #include "core/reflection/TypeBuilder.h"
5 |
6 | namespace Ghurund::Core::DirectX {
7 | const Ghurund::Core::Type& DisplayMode::GET_TYPE() {
8 | static const Ghurund::Core::Type TYPE = TypeBuilder(Ghurund::Core::DirectX::NAMESPACE_NAME, GH_STRINGIFY(DisplayMode))
9 | .withSupertype(__super::GET_TYPE());
10 |
11 | return TYPE;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/adapter/GraphicsAdapter.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "GraphicsAdapter.h"
3 |
4 | #include "core/reflection/TypeBuilder.h"
5 |
6 | namespace Ghurund::Core::DirectX {
7 | const Ghurund::Core::Type& GraphicsAdapter::GET_TYPE() {
8 | static const Ghurund::Core::Type TYPE = TypeBuilder(Ghurund::Core::DirectX::NAMESPACE_NAME, GH_STRINGIFY(GraphicsAdapter))
9 | .withSupertype(__super::GET_TYPE());
10 |
11 | return TYPE;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/buffer/DepthBuffer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "core/directx/CommandList.h"
4 |
5 | #include
6 | #include
7 | #include
8 |
9 | namespace Ghurund::Core::DirectX {
10 | class DepthBuffer {
11 | private:
12 | ComPtr dsvHeap;
13 | ComPtr depthStencil;
14 | D3D12_CPU_DESCRIPTOR_HANDLE handle;
15 |
16 | public:
17 | Status init(Graphics& graphics, unsigned int width, unsigned int height);
18 |
19 | void clear(CommandList &commandList) {
20 | commandList.get()->ClearDepthStencilView(handle, D3D12_CLEAR_FLAG_DEPTH, 1.0f, 0, 0, nullptr);
21 | }
22 |
23 | inline D3D12_CPU_DESCRIPTOR_HANDLE &getHandle() {
24 | return handle;
25 | }
26 |
27 | __declspec(property(get = getHandle)) D3D12_CPU_DESCRIPTOR_HANDLE& Handle;
28 | };
29 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/memory/GPUResourcePointer.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "GPUResourcePointer.h"
3 |
4 | #include "core/reflection/TypeBuilder.h"
5 |
6 | namespace Ghurund::Core::DirectX {
7 | const Ghurund::Core::Type& GPUResourcePointer::GET_TYPE() {
8 | static const Ghurund::Core::Type TYPE = TypeBuilder(Ghurund::Core::DirectX::NAMESPACE_NAME, GH_STRINGIFY(GPUResourcePointer))
9 | .withSupertype(__super::GET_TYPE());
10 |
11 | return TYPE;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/memory/HeapAllocator.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "HeapAllocator.h"
3 |
4 | #include "core/directx/Graphics.h"
5 | #include "core/allocation/CircularBufferStrategy.h"
6 | #include "core/math/MathUtils.h"
7 |
8 | namespace Ghurund::Core::DirectX {
9 | HeapAllocator::HeapAllocator(Graphics& graphics, uint64_t size, AllocationStrategy* strategy, D3D12_HEAP_TYPE type, D3D12_HEAP_FLAGS flags) {
10 | this->strategy = strategy == nullptr ? ghnew CircularBufferStrategy() : strategy;
11 | this->strategy->init(size, 64_KB, 64_KB);
12 | CD3DX12_HEAP_DESC desc(this->strategy->Size, type, 0, flags);
13 | if (FAILED(graphics.Device->CreateHeap(&desc, IID_PPV_ARGS(&heap))))
14 | Logger::log(LogType::ERR0R, _T("failed to create heap\n"));
15 | }
16 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/shader/CompilationTarget.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "CompilationTarget.h"
3 |
4 | namespace Ghurund::Core::DirectX {
5 | const CompilationTarget &CompilationTarget::SHADER_5_0 = CompilationTarget(0, "5_0");
6 | const CompilationTarget &CompilationTarget::SHADER_4_1 = CompilationTarget(1, "4_1");
7 | const CompilationTarget &CompilationTarget::SHADER_4_0 = CompilationTarget(2, "4_0");
8 | const CompilationTarget &CompilationTarget::SHADER_4_0_LEVEL_9_3 = CompilationTarget(3, "4_0_level_9_3");
9 | const CompilationTarget &CompilationTarget::SHADER_4_0_LEVEL_9_1 = CompilationTarget(4, "4_0_level_9_1");
10 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/shader/ConstantBufferField.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "core/string/String.h"
4 |
5 | namespace Ghurund::Core::DirectX {
6 | struct ConstantBufferField {
7 | AString name;
8 | size_t size, offset;
9 |
10 | ConstantBufferField(const AString& name, size_t size, size_t offset) {
11 | this->name = name;
12 | this->size = size;
13 | this->offset = offset;
14 | }
15 | };
16 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/shader/ShaderType.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
2 | #include "ShaderType.h"
3 |
4 | namespace Ghurund::Core::DirectX {
5 | const ShaderType &ShaderType::VS = ShaderType(1, "vs", "vertexMain", D3D12_SHADER_VISIBILITY_VERTEX);
6 | const ShaderType &ShaderType::PS = ShaderType(2, "ps", "pixelMain", D3D12_SHADER_VISIBILITY_PIXEL);
7 | const ShaderType &ShaderType::GS = ShaderType(4, "gs", "geometryMain", D3D12_SHADER_VISIBILITY_GEOMETRY);
8 | const ShaderType &ShaderType::HS = ShaderType(8, "hs", "hullMain", D3D12_SHADER_VISIBILITY_HULL);
9 | const ShaderType &ShaderType::DS = ShaderType(16, "ds", "domainMain", D3D12_SHADER_VISIBILITY_DOMAIN);
10 | const ShaderType &ShaderType::CS = ShaderType(32, "cs", "computeMain", D3D12_SHADER_VISIBILITY_ALL);
11 |
12 | const ShaderType ShaderType::values[] = {ShaderType::VS, ShaderType::PS, ShaderType::GS, ShaderType::HS, ShaderType::DS, ShaderType::CS};
13 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/shader/TextureBufferConstant.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ShaderConstant.h"
4 |
5 | namespace Ghurund::Core::DirectX {
6 | class TextureBufferConstant:public ShaderConstant {
7 | public:
8 | TextureBufferConstant(ID3D12ShaderReflectionConstantBuffer *constantBuffer, D3D12_SHADER_BUFFER_DESC &bufferDesc, unsigned int bindPoint, D3D12_SHADER_VISIBILITY visibility)
9 | :ShaderConstant(bufferDesc.Name, bindPoint, visibility) {}
10 | };
11 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/core/directx/shader/TextureConstant.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ShaderConstant.h"
4 |
5 | namespace Ghurund::Core::DirectX {
6 | class TextureConstant:public ShaderConstant {
7 | public:
8 | TextureConstant(const char *name, unsigned int bindPoint, D3D12_SHADER_VISIBILITY visibility):ShaderConstant(name, bindPoint, visibility) {}
9 | };
10 | }
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/ghcdxpch.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcdxpch.h"
--------------------------------------------------------------------------------
/engine/Engine.Core.DirectX/src/ghcdxpch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #include
6 |
7 | namespace Ghurund::Core::DirectX {
8 | inline static const char* NAMESPACE_NAME = GH_STRINGIFY(Ghurund::Core::DirectX);
9 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/engine/Engine.Core/premake5.lua:
--------------------------------------------------------------------------------
1 | project "Engine.Core"
2 | kind "StaticLib"
3 | pchheader "ghcpch.h"
4 | pchsource "src/ghcpch.cpp"
5 | staticruntime "on"
6 |
7 | files {
8 | "src/**.h",
9 | "src/**.cpp",
10 | }
11 |
12 | defines { "_CRT_SECURE_NO_WARNINGS" }
13 |
14 | includedirs {
15 | "src",
16 | includeDir["tinyxml2"]
17 | }
18 |
19 | filter "configurations:Debug"
20 | links {
21 | library["tinyxml2_Debug"]
22 | }
23 |
24 | filter "configurations:Release"
25 | links {
26 | library["tinyxml2_Release"]
27 | }
28 |
--------------------------------------------------------------------------------
/engine/Engine.Core/src/Status.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace Ghurund::Core {
4 | enum class Status {
5 | OK, INV_PARAM, INV_STATE, INV_DATA, CALL_FAIL, IO, NOT_IMPLEMENTED, ALREADY_LOADED, UNKNOWN,
6 |
7 | UNKNOWN_TYPE, MISSING_ALLOCATOR, MISSING_CONSTRUCTOR,
8 |
9 | WRONG_RESOURCE_VERSION,
10 | WRONG_RESOURCE_TYPE,
11 | LOADER_MISSING,
12 | FILE_DOESNT_EXIST,
13 | FILE_EXISTS,
14 | UNKNOWN_FORMAT,
15 | INV_FORMAT,
16 | UNEXPECTED_EOF,
17 | NOT_SUPPORTED,
18 |
19 | ENTRY_POINT_NOT_FOUND,
20 | COMPILATION_ERROR,
21 | SCRIPT_EXCEPTION,
22 |
23 | DIRECTX12_NOT_SUPPORTED,
24 | DEVICE_LOST,
25 |
26 | SOCKET,
27 | INV_PACKET,
28 | CONNECTION_REJECTED,
29 | DISCONNECTED
30 | };
31 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/Concepts.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | namespace Ghurund::Core {
7 | template
8 | concept Derived = std::is_base_of::value;
9 |
10 | template
11 | concept Qualified = std::is_const_v || std::is_pointer_v || std::is_reference_v || std::is_volatile_v;
12 |
13 | template
14 | concept Iterable = requires(CollectionType collection) {
15 | { collection.begin() } -> std::forward_iterator;
16 | { collection.end() } -> std::forward_iterator;
17 | };
18 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/DataParsing.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "core/string/String.h"
4 |
5 | namespace Ghurund::Core {
6 | template
7 | inline Result parse(const AString& text) {
8 | return Result::parse(text);
9 | }
10 |
11 | template<>
12 | inline uint32_t parse(const AString& text) {
13 | return atoi(text.Data);
14 | }
15 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/Exceptions.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace Ghurund::Core {
6 | class CallFailedException:public std::exception {
7 | public:
8 | CallFailedException(const char* message = nullptr):std::exception(message) {}
9 | };
10 |
11 | class NotImplementedException:public std::exception {};
12 |
13 | class InvalidDataException:public std::exception {
14 | public:
15 | InvalidDataException(const char* message = nullptr):std::exception(message) {}
16 | };
17 |
18 | class InvalidStateException:public std::exception {
19 | public:
20 | InvalidStateException(const char* message = nullptr):std::exception(message) {}
21 | };
22 |
23 | class InvalidParamException:public std::exception {
24 | public:
25 | InvalidParamException(const char* message = nullptr):std::exception(message) {}
26 | };
27 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/Hashing.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace Ghurund::Core {
6 |
7 | inline uint32_t hashCode(const void* data, size_t size) {
8 | uint32_t h = 0xAAAAAAAA;
9 | const uint8_t* str = (const uint8_t*)data;
10 | for (size_t i = 0; i < size; i++) {
11 | h ^= ((i & 1) == 0) ? ((h << 7) ^ str[i] * (h >> 3)) :
12 | (~((h << 11) + str[i] ^ (h >> 5)));
13 | }
14 | return h;
15 | }
16 |
17 | template
18 | inline uint32_t hashCode(const Type& data) {
19 | size_t size = sizeof(Type);
20 | return hashCode(&data, size);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/Id.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | namespace Ghurund::Core {
6 | typedef uint32_t id_t;
7 |
8 | template class IdObject {
9 | private:
10 | inline static std::atomic CURRENT_ID = 0;
11 |
12 | id_t id = CURRENT_ID++;
13 |
14 | public:
15 | virtual ~IdObject() = default;
16 |
17 | id_t getId() const {
18 | return id;
19 | }
20 |
21 | __declspec(property(get = getId)) id_t Id;
22 | };
23 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/NamedObject.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "core/string/String.h"
4 |
5 | namespace Ghurund::Core {
6 | template
7 | class NamedObject {
8 | private:
9 | GenericString name;
10 |
11 | public:
12 | NamedObject() {}
13 |
14 | NamedObject(const GenericString& name):name(name) {}
15 |
16 | virtual ~NamedObject() = 0 {};
17 |
18 | virtual void setName(const GenericString& name) {
19 | this->name = name;
20 | }
21 |
22 | virtual const GenericString& getName() const {
23 | return name;
24 | }
25 |
26 | __declspec(property(get = getName, put = setName)) const GenericString& Name;
27 |
28 | bool operator==(const NamedObject& other) const {
29 | return Name == other.Name;
30 | }
31 | };
32 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/Noncopyable.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace Ghurund::Core {
4 | class Noncopyable {
5 | public:
6 | Noncopyable() = default;
7 | Noncopyable(const Noncopyable&) = delete;
8 |
9 | virtual ~Noncopyable() = default;
10 |
11 | Noncopyable& operator=(const Noncopyable&) = delete;
12 | };
13 | }
--------------------------------------------------------------------------------
/engine/Engine.Core/src/core/Object.cpp:
--------------------------------------------------------------------------------
1 | #include "ghcpch.h"
2 | #include "Object.h"
3 |
4 | #include "core/logging/Formatter.h"
5 | #include "core/reflection/TypeBuilder.h"
6 |
7 | #include
8 |
9 | namespace Ghurund::Core {
10 | const Ghurund::Core::Type& Object::GET_TYPE() {
11 | static const Ghurund::Core::Type TYPE = TypeBuilder