From 89de4258e1bec719c04c43626de9459bf6715a43 Mon Sep 17 00:00:00 2001 From: Michel Fedde Date: Fri, 14 May 2021 21:38:50 +0200 Subject: [PATCH] 1.0.14 NUGET-Changes: + Materials now have a method to draw. That should allow more freedom on how materials can have a effect on the resulting shader. ~ PostProcessEffect.Draw now needs a source ColorAttachment. ~ Added some missing summaries GIT-/SOLUTION-Changes: Remade the folder structure, to something more senseable. --- SMCode/SM3D/SM3D.csproj | 41 ------ SMRendererV3.sln | 41 +++--- SM_WPF_TEST/App.config | 6 - SM_WPF_TEST/App.xaml | 9 -- SM_WPF_TEST/App.xaml.cs | 11 -- SM_WPF_TEST/MainWindow.xaml | 16 --- SM_WPF_TEST/MainWindow.xaml.cs | 32 ----- SM_WPF_TEST/Properties/AssemblyInfo.cs | 53 -------- SM_WPF_TEST/Properties/Resources.Designer.cs | 70 ----------- SM_WPF_TEST/Properties/Resources.resx | 117 ------------------ SM_WPF_TEST/Properties/Settings.Designer.cs | 29 ----- SM_WPF_TEST/Properties/Settings.settings | 7 -- SM_WPF_TEST/SM_WPF_TEST.csproj | 102 --------------- SM_WPF_TEST/Window1.xaml | 12 -- SM_WPF_TEST/Window1.xaml.cs | 30 ----- .../SM.Intergrations}/OpenTK.dll.config | 0 .../Properties/AssemblyInfo.cs | 19 ++- .../SM.Intergrations/SM.Intergrations.csproj | 53 ++++---- .../SM.Intergrations/ShaderTool/STMaterial.cs | 50 ++++++++ .../ShaderTool/STMaterialShader.cs | 70 +++++++++++ .../ShaderTool/STPostProcessEffect.cs | 51 ++++++++ .../ShaderTool/STPostProcessShader.cs | 74 +++++++++++ .../SM.Intergrations/packages.config | 5 + .../SM.Utils}/Controls/GameController.cs | 2 +- .../SM.Utils}/Controls/GameControllerState.cs | 2 +- .../Controls/GameControllerStateButtons.cs | 2 +- .../Controls/GameControllerStateDPad.cs | 2 +- .../Controls/GameControllerStateThumbs.cs | 2 +- .../Controls/GameControllerStateTriggers.cs | 2 +- .../SM.Utils}/Controls/GameKeybind.cs | 4 +- .../SM.Utils}/Controls/GameKeybindActor.cs | 2 +- .../SM.Utils}/Controls/GameKeybindContext.cs | 2 +- .../SM.Utils}/Controls/GameKeybindHost.cs | 2 +- .../SM.Utils}/Controls/GameKeybindList.cs | 2 +- .../optionals/SM.Utils}/OpenTK.dll.config | 0 .../SM.Utils}/Properties/AssemblyInfo.cs | 0 .../optionals/SM.Utils/SM.Utils.csproj | 10 +- .../optionals/SM.Utils}/packages.config | 0 .../SM.Base/Animation/AnimationCurves.cs | 0 .../SM.Base/Animation/InterpolationProcess.cs | 0 .../renderer}/SM.Base/Controls/Keyboard.cs | 0 .../renderer}/SM.Base/Controls/Mouse.cs | 0 .../renderer}/SM.Base/Drawing/DrawingBasis.cs | 0 .../SM.Base/Drawing/GenericTransformation.cs | 0 .../renderer}/SM.Base/Drawing/Instance.cs | 0 .../renderer}/SM.Base/Drawing/Material.cs | 14 ++- .../Drawing/Particles/ParticleDrawingBasis.cs | 19 ++- .../Drawing/Particles/ParticleInstance.cs | 12 +- .../Drawing/Particles/ParticleMovement.cs | 0 .../SM.Base/Drawing/ShaderArguments.cs | 0 .../SM.Base/Drawing/Text/CharParameter.cs | 0 .../renderer}/SM.Base/Drawing/Text/Font.cs | 0 .../SM.Base/Drawing/Text/FontCharStorage.cs | 0 .../SM.Base/Drawing/Text/TextDrawingBasis.cs | 0 .../SM.Base/Drawing/TextureTransformation.cs | 0 .../renderer}/SM.Base/Legacy/Font.cs | 0 {SMCode => src/renderer}/SM.Base/Log.cs | 0 .../SM.Base/Objects/InstancedMesh.cs | 0 .../renderer}/SM.Base/Objects/Mesh.cs | 0 .../SM.Base/Objects/Static/AxisHelper.cs | 0 .../renderer}/SM.Base/Objects/Static/Plate.cs | 0 .../renderer/SM.Base}/OpenTK.dll.config | 0 .../SM.Base/PostEffects/BloomEffect.cs | 7 +- .../SM.Base/PostEffects/PostProcessUtility.cs | 0 .../PostEffects/Shaders/bloom_blur.glsl | 0 .../PostEffects/Shaders/bloom_merge.glsl | 0 .../PostEffects/Shaders/bloom_merge_vert.glsl | 0 .../PostEffects/Shaders/finalize_gamma.glsl | 0 .../PostEffects/Shaders/finalize_hdr.glsl | 0 .../PostProcess/DefaultFiles/extensions.frag | 0 .../PostProcess/DefaultFiles/vertexFile.vert | 0 .../DefaultFiles/vertexWithExt.vert | 0 .../SM.Base/PostProcess/PostProcessEffect.cs | 3 +- .../SM.Base/PostProcess/PostProcessShader.cs | 0 .../SM.Base/Properties/AssemblyInfo.cs | 0 .../renderer}/SM.Base/SM.Base.csproj | 61 +++++---- .../SM.Base/SM.Base.csproj.DotSettings | 0 .../renderer}/SM.Base/SMRenderer.cs | 0 .../renderer}/SM.Base/Scene/GenericCamera.cs | 0 .../SM.Base/Scene/GenericItemCollection.cs | 0 .../renderer}/SM.Base/Scene/GenericScene.cs | 0 .../SM.Base/Scene/IBackgroundItem.cs | 0 .../SM.Base/Scene/ICollectionItem.cs | 0 .../SM.Base/Scene/IFixedScriptable.cs | 0 .../renderer}/SM.Base/Scene/IScriptable.cs | 0 .../SM.Base/Scene/IShowCollection.cs | 0 .../renderer}/SM.Base/Scene/IShowItem.cs | 0 .../Shaders/Extensions/ExtensionManager.cs | 0 .../Shaders/Extensions/fragment/noise.glsl | 0 .../Extensions/fragment/textureGamma.glsl | 0 .../Shaders/Extensions/vertex/basic.vert | 0 .../SM.Base/Shaders/MaterialShader.cs | 4 +- .../renderer}/SM.Base/Shaders/SimpleShader.cs | 0 .../SimpleShaderPresets/basic_vertex.glsl | 0 .../SimpleShaderPresets/instanced_vertex.glsl | 0 .../renderer}/SM.Base/Textures/Texture.cs | 0 .../renderer}/SM.Base/Time/Interval.cs | 0 .../renderer}/SM.Base/Time/Stopwatch.cs | 0 .../renderer}/SM.Base/Time/Timer.cs | 0 .../renderer}/SM.Base/Types/CVector1.cs | 0 .../renderer}/SM.Base/Types/CVector2.cs | 0 .../renderer}/SM.Base/Types/CVector3.cs | 0 .../renderer}/SM.Base/Types/CVector4.cs | 1 - .../renderer}/SM.Base/Types/CVectorBase.cs | 0 .../renderer}/SM.Base/Utility/Assembly.cs | 0 .../renderer}/SM.Base/Utility/Deltatime.cs | 0 .../SM.Base/Utility/IInitializable.cs | 0 .../renderer}/SM.Base/Utility/Randomize.cs | 0 .../renderer}/SM.Base/Utility/Ray.cs | 0 .../SM.Base/Utility/RotationUtility.cs | 0 .../renderer}/SM.Base/Utility/Util.cs | 0 .../SM.Base/Window/Contexts/DrawContext.cs | 0 .../Window/Contexts/FixedUpdateContext.cs | 0 .../SM.Base/Window/Contexts/UpdateContext.cs | 0 .../renderer}/SM.Base/Window/GLWindow.cs | 0 .../SM.Base/Window/IGenericWindow.cs | 0 .../renderer}/SM.Base/Window/ISetup.cs | 0 .../SM.Base/Window/RenderPipeline.cs | 0 .../renderer}/SM.Base/Window/WindowCode.cs | 0 .../renderer}/SM.Base/Window/WindowFlags.cs | 0 .../renderer}/SM.Base/Window/winIcon.ico | Bin .../renderer}/SM.Base/packages.config | 0 .../SM.OGL/Framebuffer/ColorAttachment.cs | 0 .../SM.OGL/Framebuffer/Framebuffer.cs | 0 .../SM.OGL/Framebuffer/IFramebufferWindow.cs | 0 .../Framebuffer/RenderbufferAttachment.cs | 0 .../renderer}/SM.OGL/GLCustomActions.cs | 0 .../renderer}/SM.OGL/GLDebugging.cs | 0 {SMCode => src/renderer}/SM.OGL/GLObject.cs | 0 {SMCode => src/renderer}/SM.OGL/GLSettings.cs | 0 {SMCode => src/renderer}/SM.OGL/GLSystem.cs | 0 .../renderer}/SM.OGL/Mesh/BoundingBox.cs | 0 .../renderer}/SM.OGL/Mesh/GenericMesh.cs | 0 .../renderer}/SM.OGL/Mesh/ILineMesh.cs | 0 .../renderer}/SM.OGL/Mesh/MeshAttribute.cs | 0 .../SM.OGL/Mesh/MeshAttributeList.cs | 0 {SMCode => src/renderer}/SM.OGL/Mesh/VBO.cs | 0 .../renderer/SM.OGL}/OpenTK.dll.config | 0 .../SM.OGL/Properties/AssemblyInfo.cs | 0 {SMCode => src/renderer}/SM.OGL/SM.OGL.csproj | 8 +- .../renderer}/SM.OGL/Shaders/GenericShader.cs | 0 .../renderer}/SM.OGL/Shaders/IUniform.cs | 0 .../SM.OGL/Shaders/ShaderExtensions.cs | 0 .../renderer}/SM.OGL/Shaders/ShaderFile.cs | 0 .../SM.OGL/Shaders/ShaderFileCollection.cs | 0 .../SM.OGL/Shaders/ShaderPreProcess.cs | 0 .../renderer}/SM.OGL/Shaders/Uniform.cs | 0 .../renderer}/SM.OGL/Shaders/UniformArray.cs | 0 .../SM.OGL/Shaders/UniformCollection.cs | 0 .../SM.OGL/Texture/PixelInformation.cs | 0 .../renderer}/SM.OGL/Texture/TextureBase.cs | 0 {SMCode => src/renderer}/SM.OGL/Version.cs | 0 .../renderer}/SM.OGL/packages.config | 0 .../renderer}/SM2D/Controls/Mouse2D.cs | 0 .../renderer}/SM2D/Drawing/DrawBackground.cs | 2 +- .../renderer}/SM2D/Drawing/DrawObject2D.cs | 3 +- .../renderer}/SM2D/Drawing/DrawParticles.cs | 3 +- .../renderer}/SM2D/Drawing/DrawText.cs | 2 +- .../renderer}/SM2D/Object/PolyLine.cs | 0 .../renderer}/SM2D/Object/Polygon.cs | 0 .../renderer}/SM2D/Object/PolygonVertex.cs | 0 .../renderer/SM2D}/OpenTK.dll.config | 0 .../SM2D/Pipelines/Basic2DPipeline.cs | 0 .../renderer}/SM2D/Properties/AssemblyInfo.cs | 0 {SMCode => src/renderer}/SM2D/SM2D.csproj | 12 +- .../renderer}/SM2D/SM2D.csproj.DotSettings | 0 {SMCode => src/renderer}/SM2D/Scene/Camera.cs | 0 .../renderer}/SM2D/Scene/ItemCollection.cs | 0 {SMCode => src/renderer}/SM2D/Scene/Scene.cs | 0 .../renderer}/SM2D/Shader/ShaderCollection.cs | 0 .../SM2D/Shader/ShaderFiles/basic.glsl | 0 .../renderer}/SM2D/Types/Transformation.cs | 0 .../renderer}/SM2D/Window/Window2DSetup.cs | 0 .../renderer/SM2D}/packages.config | 0 {SM_TEST => tests/SM_TEST}/App.config | 0 tests/SM_TEST/OpenTK.dll.config | 25 ++++ {SM_TEST => tests/SM_TEST}/Program.cs | 39 +++--- .../SM_TEST}/Properties/AssemblyInfo.cs | 0 tests/SM_TEST/SM_TEST.csproj | 101 +++++++++++++++ .../SM_TEST}/TestRenderPipeline.cs | 31 +++-- {SM_TEST => tests/SM_TEST}/packages.config | 3 + 181 files changed, 584 insertions(+), 698 deletions(-) delete mode 100644 SMCode/SM3D/SM3D.csproj delete mode 100644 SM_WPF_TEST/App.config delete mode 100644 SM_WPF_TEST/App.xaml delete mode 100644 SM_WPF_TEST/App.xaml.cs delete mode 100644 SM_WPF_TEST/MainWindow.xaml delete mode 100644 SM_WPF_TEST/MainWindow.xaml.cs delete mode 100644 SM_WPF_TEST/Properties/AssemblyInfo.cs delete mode 100644 SM_WPF_TEST/Properties/Resources.Designer.cs delete mode 100644 SM_WPF_TEST/Properties/Resources.resx delete mode 100644 SM_WPF_TEST/Properties/Settings.Designer.cs delete mode 100644 SM_WPF_TEST/Properties/Settings.settings delete mode 100644 SM_WPF_TEST/SM_WPF_TEST.csproj delete mode 100644 SM_WPF_TEST/Window1.xaml delete mode 100644 SM_WPF_TEST/Window1.xaml.cs rename {SMCode/SM.Base => src/optionals/SM.Intergrations}/OpenTK.dll.config (100%) rename {SMCode/SM3D => src/optionals/SM.Intergrations}/Properties/AssemblyInfo.cs (75%) rename SM_TEST/SM_TEST.csproj => src/optionals/SM.Intergrations/SM.Intergrations.csproj (63%) create mode 100644 src/optionals/SM.Intergrations/ShaderTool/STMaterial.cs create mode 100644 src/optionals/SM.Intergrations/ShaderTool/STMaterialShader.cs create mode 100644 src/optionals/SM.Intergrations/ShaderTool/STPostProcessEffect.cs create mode 100644 src/optionals/SM.Intergrations/ShaderTool/STPostProcessShader.cs create mode 100644 src/optionals/SM.Intergrations/packages.config rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameController.cs (96%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameControllerState.cs (98%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameControllerStateButtons.cs (97%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameControllerStateDPad.cs (96%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameControllerStateThumbs.cs (94%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameControllerStateTriggers.cs (90%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameKeybind.cs (90%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameKeybindActor.cs (98%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameKeybindContext.cs (92%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameKeybindHost.cs (97%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Controls/GameKeybindList.cs (95%) rename {SMCode/SM.OGL => src/optionals/SM.Utils}/OpenTK.dll.config (100%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/Properties/AssemblyInfo.cs (100%) rename SMOptionals/SM.Game/SM.Game.csproj => src/optionals/SM.Utils/SM.Utils.csproj (89%) rename {SMOptionals/SM.Game => src/optionals/SM.Utils}/packages.config (100%) rename {SMCode => src/renderer}/SM.Base/Animation/AnimationCurves.cs (100%) rename {SMCode => src/renderer}/SM.Base/Animation/InterpolationProcess.cs (100%) rename {SMCode => src/renderer}/SM.Base/Controls/Keyboard.cs (100%) rename {SMCode => src/renderer}/SM.Base/Controls/Mouse.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/DrawingBasis.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/GenericTransformation.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/Instance.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/Material.cs (68%) rename {SMCode => src/renderer}/SM.Base/Drawing/Particles/ParticleDrawingBasis.cs (91%) rename {SMCode => src/renderer}/SM.Base/Drawing/Particles/ParticleInstance.cs (83%) rename {SMCode => src/renderer}/SM.Base/Drawing/Particles/ParticleMovement.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/ShaderArguments.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/Text/CharParameter.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/Text/Font.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/Text/FontCharStorage.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/Text/TextDrawingBasis.cs (100%) rename {SMCode => src/renderer}/SM.Base/Drawing/TextureTransformation.cs (100%) rename {SMCode => src/renderer}/SM.Base/Legacy/Font.cs (100%) rename {SMCode => src/renderer}/SM.Base/Log.cs (100%) rename {SMCode => src/renderer}/SM.Base/Objects/InstancedMesh.cs (100%) rename {SMCode => src/renderer}/SM.Base/Objects/Mesh.cs (100%) rename {SMCode => src/renderer}/SM.Base/Objects/Static/AxisHelper.cs (100%) rename {SMCode => src/renderer}/SM.Base/Objects/Static/Plate.cs (100%) rename {SMOptionals/SM.Game => src/renderer/SM.Base}/OpenTK.dll.config (100%) rename {SMCode => src/renderer}/SM.Base/PostEffects/BloomEffect.cs (97%) rename {SMCode => src/renderer}/SM.Base/PostEffects/PostProcessUtility.cs (100%) rename {SMCode => src/renderer}/SM.Base/PostEffects/Shaders/bloom_blur.glsl (100%) rename {SMCode => src/renderer}/SM.Base/PostEffects/Shaders/bloom_merge.glsl (100%) rename {SMCode => src/renderer}/SM.Base/PostEffects/Shaders/bloom_merge_vert.glsl (100%) rename {SMCode => src/renderer}/SM.Base/PostEffects/Shaders/finalize_gamma.glsl (100%) rename {SMCode => src/renderer}/SM.Base/PostEffects/Shaders/finalize_hdr.glsl (100%) rename {SMCode => src/renderer}/SM.Base/PostProcess/DefaultFiles/extensions.frag (100%) rename {SMCode => src/renderer}/SM.Base/PostProcess/DefaultFiles/vertexFile.vert (100%) rename {SMCode => src/renderer}/SM.Base/PostProcess/DefaultFiles/vertexWithExt.vert (100%) rename {SMCode => src/renderer}/SM.Base/PostProcess/PostProcessEffect.cs (92%) rename {SMCode => src/renderer}/SM.Base/PostProcess/PostProcessShader.cs (100%) rename {SMCode => src/renderer}/SM.Base/Properties/AssemblyInfo.cs (100%) rename {SMCode => src/renderer}/SM.Base/SM.Base.csproj (89%) rename {SMCode => src/renderer}/SM.Base/SM.Base.csproj.DotSettings (100%) rename {SMCode => src/renderer}/SM.Base/SMRenderer.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/GenericCamera.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/GenericItemCollection.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/GenericScene.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/IBackgroundItem.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/ICollectionItem.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/IFixedScriptable.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/IScriptable.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/IShowCollection.cs (100%) rename {SMCode => src/renderer}/SM.Base/Scene/IShowItem.cs (100%) rename {SMCode => src/renderer}/SM.Base/Shaders/Extensions/ExtensionManager.cs (100%) rename {SMCode => src/renderer}/SM.Base/Shaders/Extensions/fragment/noise.glsl (100%) rename {SMCode => src/renderer}/SM.Base/Shaders/Extensions/fragment/textureGamma.glsl (100%) rename {SMCode => src/renderer}/SM.Base/Shaders/Extensions/vertex/basic.vert (100%) rename {SMCode => src/renderer}/SM.Base/Shaders/MaterialShader.cs (88%) rename {SMCode => src/renderer}/SM.Base/Shaders/SimpleShader.cs (100%) rename {SMCode => src/renderer}/SM.Base/Shaders/SimpleShaderPresets/basic_vertex.glsl (100%) rename {SMCode => src/renderer}/SM.Base/Shaders/SimpleShaderPresets/instanced_vertex.glsl (100%) rename {SMCode => src/renderer}/SM.Base/Textures/Texture.cs (100%) rename {SMCode => src/renderer}/SM.Base/Time/Interval.cs (100%) rename {SMCode => src/renderer}/SM.Base/Time/Stopwatch.cs (100%) rename {SMCode => src/renderer}/SM.Base/Time/Timer.cs (100%) rename {SMCode => src/renderer}/SM.Base/Types/CVector1.cs (100%) rename {SMCode => src/renderer}/SM.Base/Types/CVector2.cs (100%) rename {SMCode => src/renderer}/SM.Base/Types/CVector3.cs (100%) rename {SMCode => src/renderer}/SM.Base/Types/CVector4.cs (99%) rename {SMCode => src/renderer}/SM.Base/Types/CVectorBase.cs (100%) rename {SMCode => src/renderer}/SM.Base/Utility/Assembly.cs (100%) rename {SMCode => src/renderer}/SM.Base/Utility/Deltatime.cs (100%) rename {SMCode => src/renderer}/SM.Base/Utility/IInitializable.cs (100%) rename {SMCode => src/renderer}/SM.Base/Utility/Randomize.cs (100%) rename {SMCode => src/renderer}/SM.Base/Utility/Ray.cs (100%) rename {SMCode => src/renderer}/SM.Base/Utility/RotationUtility.cs (100%) rename {SMCode => src/renderer}/SM.Base/Utility/Util.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/Contexts/DrawContext.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/Contexts/FixedUpdateContext.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/Contexts/UpdateContext.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/GLWindow.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/IGenericWindow.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/ISetup.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/RenderPipeline.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/WindowCode.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/WindowFlags.cs (100%) rename {SMCode => src/renderer}/SM.Base/Window/winIcon.ico (100%) rename {SMCode => src/renderer}/SM.Base/packages.config (100%) rename {SMCode => src/renderer}/SM.OGL/Framebuffer/ColorAttachment.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Framebuffer/Framebuffer.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Framebuffer/IFramebufferWindow.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Framebuffer/RenderbufferAttachment.cs (100%) rename {SMCode => src/renderer}/SM.OGL/GLCustomActions.cs (100%) rename {SMCode => src/renderer}/SM.OGL/GLDebugging.cs (100%) rename {SMCode => src/renderer}/SM.OGL/GLObject.cs (100%) rename {SMCode => src/renderer}/SM.OGL/GLSettings.cs (100%) rename {SMCode => src/renderer}/SM.OGL/GLSystem.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Mesh/BoundingBox.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Mesh/GenericMesh.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Mesh/ILineMesh.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Mesh/MeshAttribute.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Mesh/MeshAttributeList.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Mesh/VBO.cs (100%) rename {SM_TEST => src/renderer/SM.OGL}/OpenTK.dll.config (100%) rename {SMCode => src/renderer}/SM.OGL/Properties/AssemblyInfo.cs (100%) rename {SMCode => src/renderer}/SM.OGL/SM.OGL.csproj (97%) rename {SMCode => src/renderer}/SM.OGL/Shaders/GenericShader.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/IUniform.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/ShaderExtensions.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/ShaderFile.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/ShaderFileCollection.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/ShaderPreProcess.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/Uniform.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/UniformArray.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Shaders/UniformCollection.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Texture/PixelInformation.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Texture/TextureBase.cs (100%) rename {SMCode => src/renderer}/SM.OGL/Version.cs (100%) rename {SMCode => src/renderer}/SM.OGL/packages.config (100%) rename {SMCode => src/renderer}/SM2D/Controls/Mouse2D.cs (100%) rename {SMCode => src/renderer}/SM2D/Drawing/DrawBackground.cs (98%) rename {SMCode => src/renderer}/SM2D/Drawing/DrawObject2D.cs (97%) rename {SMCode => src/renderer}/SM2D/Drawing/DrawParticles.cs (93%) rename {SMCode => src/renderer}/SM2D/Drawing/DrawText.cs (96%) rename {SMCode => src/renderer}/SM2D/Object/PolyLine.cs (100%) rename {SMCode => src/renderer}/SM2D/Object/Polygon.cs (100%) rename {SMCode => src/renderer}/SM2D/Object/PolygonVertex.cs (100%) rename {SM_WPF_TEST => src/renderer/SM2D}/OpenTK.dll.config (100%) rename {SMCode => src/renderer}/SM2D/Pipelines/Basic2DPipeline.cs (100%) rename {SMCode => src/renderer}/SM2D/Properties/AssemblyInfo.cs (100%) rename {SMCode => src/renderer}/SM2D/SM2D.csproj (90%) rename {SMCode => src/renderer}/SM2D/SM2D.csproj.DotSettings (100%) rename {SMCode => src/renderer}/SM2D/Scene/Camera.cs (100%) rename {SMCode => src/renderer}/SM2D/Scene/ItemCollection.cs (100%) rename {SMCode => src/renderer}/SM2D/Scene/Scene.cs (100%) rename {SMCode => src/renderer}/SM2D/Shader/ShaderCollection.cs (100%) rename {SMCode => src/renderer}/SM2D/Shader/ShaderFiles/basic.glsl (100%) rename {SMCode => src/renderer}/SM2D/Types/Transformation.cs (100%) rename {SMCode => src/renderer}/SM2D/Window/Window2DSetup.cs (100%) rename {SM_WPF_TEST => src/renderer/SM2D}/packages.config (100%) rename {SM_TEST => tests/SM_TEST}/App.config (100%) create mode 100644 tests/SM_TEST/OpenTK.dll.config rename {SM_TEST => tests/SM_TEST}/Program.cs (68%) rename {SM_TEST => tests/SM_TEST}/Properties/AssemblyInfo.cs (100%) create mode 100644 tests/SM_TEST/SM_TEST.csproj rename {SM_TEST => tests/SM_TEST}/TestRenderPipeline.cs (59%) rename {SM_TEST => tests/SM_TEST}/packages.config (54%) diff --git a/SMCode/SM3D/SM3D.csproj b/SMCode/SM3D/SM3D.csproj deleted file mode 100644 index 447701a..0000000 --- a/SMCode/SM3D/SM3D.csproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Debug - AnyCPU - {9BECA849-E6E9-4E15-83A6-ADD8C18065CB} - Library - Properties - SM3D - SM3D - v4.5.2 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - \ No newline at end of file diff --git a/SMRendererV3.sln b/SMRendererV3.sln index 93ce3e3..753bfc7 100644 --- a/SMRendererV3.sln +++ b/SMRendererV3.sln @@ -3,23 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30413.136 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SMRenderer", "SMRenderer", "{47EA2879-1D40-4683-BA6C-AB51F286EBDE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM.OGL", "src\renderer\SM.OGL\SM.OGL.csproj", "{F604D684-BC1D-4819-88B5-8B5D03A17BE0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM.OGL", "SMCode\SM.OGL\SM.OGL.csproj", "{F604D684-BC1D-4819-88B5-8B5D03A17BE0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM.Base", "src\renderer\SM.Base\SM.Base.csproj", "{8E733844-4204-43E7-B3DC-3913CDDABB0D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM.Base", "SMCode\SM.Base\SM.Base.csproj", "{8E733844-4204-43E7-B3DC-3913CDDABB0D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM2D", "src\renderer\SM2D\SM2D.csproj", "{A4565538-625A-42C6-A330-DD4F1ABB3986}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM3D", "SMCode\SM3D\SM3D.csproj", "{9BECA849-E6E9-4E15-83A6-ADD8C18065CB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM_TEST", "tests\SM_TEST\SM_TEST.csproj", "{6D4FB8E6-4D0B-4928-8F9E-EF5C2FBF44E8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM2D", "SMCode\SM2D\SM2D.csproj", "{A4565538-625A-42C6-A330-DD4F1ABB3986}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM.Utils", "src\optionals\SM.Utils\SM.Utils.csproj", "{079BAB31-3DC4-40DA-90C7-EFAA8517C647}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM_TEST", "SM_TEST\SM_TEST.csproj", "{6D4FB8E6-4D0B-4928-8F9E-EF5C2FBF44E8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM.Intergrations", "src\optionals\SM.Intergrations\SM.Intergrations.csproj", "{4CB351F4-B3F2-4F77-ACC2-02F21DBF5EC2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Optionals", "Optionals", "{AE5B181B-BD8F-4F36-A64E-32C4FF7B6FD6}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Renderer", "Renderer", "{62ED6240-4DEC-4535-95EB-AE3D90A3FDF5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM.Game", "SMOptionals\SM.Game\SM.Game.csproj", "{079BAB31-3DC4-40DA-90C7-EFAA8517C647}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Optionals", "Optionals", "{CC0E5493-29E8-4ACB-8462-5724A6F636DE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SM_WPF_TEST", "SM_WPF_TEST\SM_WPF_TEST.csproj", "{6F5367D3-B7E9-40CE-A692-29F9892B6F2A}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{2D2EDE5F-6610-4DF9-AAFD-664F4023A99D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -35,10 +35,6 @@ Global {8E733844-4204-43E7-B3DC-3913CDDABB0D}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E733844-4204-43E7-B3DC-3913CDDABB0D}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E733844-4204-43E7-B3DC-3913CDDABB0D}.Release|Any CPU.Build.0 = Release|Any CPU - {9BECA849-E6E9-4E15-83A6-ADD8C18065CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9BECA849-E6E9-4E15-83A6-ADD8C18065CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9BECA849-E6E9-4E15-83A6-ADD8C18065CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9BECA849-E6E9-4E15-83A6-ADD8C18065CB}.Release|Any CPU.Build.0 = Release|Any CPU {A4565538-625A-42C6-A330-DD4F1ABB3986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A4565538-625A-42C6-A330-DD4F1ABB3986}.Debug|Any CPU.Build.0 = Debug|Any CPU {A4565538-625A-42C6-A330-DD4F1ABB3986}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -51,20 +47,21 @@ Global {079BAB31-3DC4-40DA-90C7-EFAA8517C647}.Debug|Any CPU.Build.0 = Debug|Any CPU {079BAB31-3DC4-40DA-90C7-EFAA8517C647}.Release|Any CPU.ActiveCfg = Release|Any CPU {079BAB31-3DC4-40DA-90C7-EFAA8517C647}.Release|Any CPU.Build.0 = Release|Any CPU - {6F5367D3-B7E9-40CE-A692-29F9892B6F2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F5367D3-B7E9-40CE-A692-29F9892B6F2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F5367D3-B7E9-40CE-A692-29F9892B6F2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F5367D3-B7E9-40CE-A692-29F9892B6F2A}.Release|Any CPU.Build.0 = Release|Any CPU + {4CB351F4-B3F2-4F77-ACC2-02F21DBF5EC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CB351F4-B3F2-4F77-ACC2-02F21DBF5EC2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CB351F4-B3F2-4F77-ACC2-02F21DBF5EC2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CB351F4-B3F2-4F77-ACC2-02F21DBF5EC2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {F604D684-BC1D-4819-88B5-8B5D03A17BE0} = {47EA2879-1D40-4683-BA6C-AB51F286EBDE} - {8E733844-4204-43E7-B3DC-3913CDDABB0D} = {47EA2879-1D40-4683-BA6C-AB51F286EBDE} - {9BECA849-E6E9-4E15-83A6-ADD8C18065CB} = {47EA2879-1D40-4683-BA6C-AB51F286EBDE} - {A4565538-625A-42C6-A330-DD4F1ABB3986} = {47EA2879-1D40-4683-BA6C-AB51F286EBDE} - {079BAB31-3DC4-40DA-90C7-EFAA8517C647} = {AE5B181B-BD8F-4F36-A64E-32C4FF7B6FD6} + {F604D684-BC1D-4819-88B5-8B5D03A17BE0} = {62ED6240-4DEC-4535-95EB-AE3D90A3FDF5} + {8E733844-4204-43E7-B3DC-3913CDDABB0D} = {62ED6240-4DEC-4535-95EB-AE3D90A3FDF5} + {A4565538-625A-42C6-A330-DD4F1ABB3986} = {62ED6240-4DEC-4535-95EB-AE3D90A3FDF5} + {6D4FB8E6-4D0B-4928-8F9E-EF5C2FBF44E8} = {2D2EDE5F-6610-4DF9-AAFD-664F4023A99D} + {079BAB31-3DC4-40DA-90C7-EFAA8517C647} = {CC0E5493-29E8-4ACB-8462-5724A6F636DE} + {4CB351F4-B3F2-4F77-ACC2-02F21DBF5EC2} = {CC0E5493-29E8-4ACB-8462-5724A6F636DE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {51C827AB-3306-4EE6-9E60-B7BF84854469} diff --git a/SM_WPF_TEST/App.config b/SM_WPF_TEST/App.config deleted file mode 100644 index 88fa402..0000000 --- a/SM_WPF_TEST/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/SM_WPF_TEST/App.xaml b/SM_WPF_TEST/App.xaml deleted file mode 100644 index c032034..0000000 --- a/SM_WPF_TEST/App.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/SM_WPF_TEST/App.xaml.cs b/SM_WPF_TEST/App.xaml.cs deleted file mode 100644 index e481a44..0000000 --- a/SM_WPF_TEST/App.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Windows; - -namespace SM_WPF_TEST -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/SM_WPF_TEST/MainWindow.xaml b/SM_WPF_TEST/MainWindow.xaml deleted file mode 100644 index be260a8..0000000 --- a/SM_WPF_TEST/MainWindow.xaml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/SM_WPF_TEST/MainWindow.xaml.cs b/SM_WPF_TEST/MainWindow.xaml.cs deleted file mode 100644 index 5ee0f90..0000000 --- a/SM_WPF_TEST/MainWindow.xaml.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Windows; - -namespace SM_WPF_TEST -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - /* - GLWPFWindow2D gl; - Scene scene; - gl = new GLWPFWindow2D(); - Grid.SetColumn(gl, 1); - grid.Children.Add(gl); - - gl.Start(); - - gl.SetScene(scene = new Scene()); - gl.SetRenderPipeline(Default2DPipeline.Pipeline); - - DrawObject2D cube = new DrawObject2D(); - cube.Color = Color4.Blue; - scene.Objects.Add(cube); - - new Window1().Show();*/ - } - } -} diff --git a/SM_WPF_TEST/Properties/AssemblyInfo.cs b/SM_WPF_TEST/Properties/AssemblyInfo.cs deleted file mode 100644 index 499ad94..0000000 --- a/SM_WPF_TEST/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SM_WPF_TEST")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SM_WPF_TEST")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SM_WPF_TEST/Properties/Resources.Designer.cs b/SM_WPF_TEST/Properties/Resources.Designer.cs deleted file mode 100644 index 9cf796e..0000000 --- a/SM_WPF_TEST/Properties/Resources.Designer.cs +++ /dev/null @@ -1,70 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - - -namespace SM_WPF_TEST.Properties -{ - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SM_WPF_TEST.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/SM_WPF_TEST/Properties/Resources.resx b/SM_WPF_TEST/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/SM_WPF_TEST/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/SM_WPF_TEST/Properties/Settings.Designer.cs b/SM_WPF_TEST/Properties/Settings.Designer.cs deleted file mode 100644 index a1c90c7..0000000 --- a/SM_WPF_TEST/Properties/Settings.Designer.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - - -namespace SM_WPF_TEST.Properties -{ - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/SM_WPF_TEST/Properties/Settings.settings b/SM_WPF_TEST/Properties/Settings.settings deleted file mode 100644 index 033d7a5..0000000 --- a/SM_WPF_TEST/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/SM_WPF_TEST/SM_WPF_TEST.csproj b/SM_WPF_TEST/SM_WPF_TEST.csproj deleted file mode 100644 index 3d7484c..0000000 --- a/SM_WPF_TEST/SM_WPF_TEST.csproj +++ /dev/null @@ -1,102 +0,0 @@ - - - - - Debug - AnyCPU - {6F5367D3-B7E9-40CE-A692-29F9892B6F2A} - WinExe - SM_WPF_TEST - SM_WPF_TEST - v4.5.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - 4.0 - - - - - - - - MSBuild:Compile - Designer - - - Window1.xaml - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - Designer - MSBuild:Compile - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - \ No newline at end of file diff --git a/SM_WPF_TEST/Window1.xaml b/SM_WPF_TEST/Window1.xaml deleted file mode 100644 index 70408e6..0000000 --- a/SM_WPF_TEST/Window1.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/SM_WPF_TEST/Window1.xaml.cs b/SM_WPF_TEST/Window1.xaml.cs deleted file mode 100644 index d5d3271..0000000 --- a/SM_WPF_TEST/Window1.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Windows; - -namespace SM_WPF_TEST -{ - /// - /// Interaction logic for Window1.xaml - /// - public partial class Window1 : Window - { - public Window1() - { - InitializeComponent(); - - /*GLWPFWindow2D gl; - Scene scene; - Content = gl = new GLWPFWindow2D(); - gl.Start(); - - gl.SetScene(scene = new Scene()); - gl.SetRenderPipeline(Basic2DPipeline.Pipeline); - - DrawObject2D obj = new DrawObject2D() - { - Color = Color4.Red - }; - obj.ApplyCircle(); - scene.Objects.Add(obj);*/ - } - } -} diff --git a/SMCode/SM.Base/OpenTK.dll.config b/src/optionals/SM.Intergrations/OpenTK.dll.config similarity index 100% rename from SMCode/SM.Base/OpenTK.dll.config rename to src/optionals/SM.Intergrations/OpenTK.dll.config diff --git a/SMCode/SM3D/Properties/AssemblyInfo.cs b/src/optionals/SM.Intergrations/Properties/AssemblyInfo.cs similarity index 75% rename from SMCode/SM3D/Properties/AssemblyInfo.cs rename to src/optionals/SM.Intergrations/Properties/AssemblyInfo.cs index f2e6bad..eeec0f3 100644 --- a/SMCode/SM3D/Properties/AssemblyInfo.cs +++ b/src/optionals/SM.Intergrations/Properties/AssemblyInfo.cs @@ -1,19 +1,16 @@ -#region usings - -using System.Reflection; +using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -#endregion - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("SM3D")] +[assembly: AssemblyTitle("SM.Intergrations")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("SM3D")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2020")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SM.Intergrations")] +[assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -23,7 +20,7 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9beca849-e6e9-4e15-83a6-add8c18065cb")] +[assembly: Guid("4cb351f4-b3f2-4f77-acc2-02f21dbf5ec2")] // Version information for an assembly consists of the following four values: // @@ -36,4 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SM_TEST/SM_TEST.csproj b/src/optionals/SM.Intergrations/SM.Intergrations.csproj similarity index 63% rename from SM_TEST/SM_TEST.csproj rename to src/optionals/SM.Intergrations/SM.Intergrations.csproj index 5cd19ac..aeea189 100644 --- a/SM_TEST/SM_TEST.csproj +++ b/src/optionals/SM.Intergrations/SM.Intergrations.csproj @@ -4,17 +4,17 @@ Debug AnyCPU - {6D4FB8E6-4D0B-4928-8F9E-EF5C2FBF44E8} - WinExe - SM_TEST - SM_TEST + {4CB351F4-B3F2-4F77-ACC2-02F21DBF5EC2} + Library + Properties + SM.Intergrations + SM.Intergrations v4.5.2 512 - true true + - AnyCPU true full false @@ -24,7 +24,6 @@ 4 - AnyCPU pdbonly true bin\Release\ @@ -32,43 +31,43 @@ prompt 4 - - - - ..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll + ..\..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll + + + ..\..\..\packages\ShaderToolParser.1.0.0-pre3\lib\net450\ShaderToolParser.dll + + + + + + - - + + + + - - - - - - - - - + {8e733844-4204-43e7-b3dc-3913cddabb0d} SM.Base - + {f604d684-bc1d-4819-88b5-8b5d03a17be0} SM.OGL - - {a4565538-625a-42c6-a330-dd4f1abb3986} - SM2D - + + + + \ No newline at end of file diff --git a/src/optionals/SM.Intergrations/ShaderTool/STMaterial.cs b/src/optionals/SM.Intergrations/ShaderTool/STMaterial.cs new file mode 100644 index 0000000..5f52732 --- /dev/null +++ b/src/optionals/SM.Intergrations/ShaderTool/STMaterial.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.IO.Pipes; +using OpenTK; +using OpenTK.Graphics; +using ShaderToolParser.Nodes; +using ShaderToolParser.Nodes.Textures; +using ShaderToolParser.Variables; +using SM.Base.Drawing; +using SM.Base.Textures; +using SM.Base.Window; + +namespace SM.Intergrations.ShaderTool +{ + public class STMaterial : Material + { + private Vector4 _tintVector = Vector4.One; + + public override Color4 Tint + { + get => Color4.FromXyz(_tintVector); + set => _tintVector = Color4.ToXyz(value); + } + + public STMaterial(STPDrawNode node) + { + if (node.OGLEffect == null) + throw new Exception("[ERROR AT IMPORTING MATERIAL] DrawNode didn't contain a OpenGL-shader."); + + CustomShader = new STMaterialShader(node); + + foreach (KeyValuePair pair in node.Variables) + { + if (pair.Value.Type == STPBasisType.Texture) + ShaderArguments[pair.Key] = new Texture(((STPTextureNode) pair.Value.Texture).Bitmap); + } + } + + public override void Draw(DrawContext context) + { + ShaderArguments["MVP"] = context.Instances[0].ModelMatrix * context.ModelMatrix * context.View * context.World; + ShaderArguments["MasterTextureMatrix"] = context.Instances[0].TextureMatrix * context.TextureMatrix; + ShaderArguments["HasVColor"] = context.Mesh.Attributes.Has("color"); + + ShaderArguments["_MATColor"] = _tintVector; + + base.Draw(context); + } + } +} \ No newline at end of file diff --git a/src/optionals/SM.Intergrations/ShaderTool/STMaterialShader.cs b/src/optionals/SM.Intergrations/ShaderTool/STMaterialShader.cs new file mode 100644 index 0000000..84022fc --- /dev/null +++ b/src/optionals/SM.Intergrations/ShaderTool/STMaterialShader.cs @@ -0,0 +1,70 @@ + +using System; +using System.Collections.Generic; +using OpenTK; +using ShaderToolParser.Nodes; +using ShaderToolParser.Variables; +using SM.Base.Shaders; +using SM.Base.Textures; +using SM.Base.Window; +using SM.OGL.Shaders; +using SM.OGL.Texture; + +namespace SM.Intergrations.ShaderTool +{ + public class STMaterialShader : MaterialShader + { + private event Action _uniforms; + + public STMaterialShader(STPDrawNode drawNode) : base(new ShaderFileCollection()) + { + if (drawNode.OGLEffect == null) + throw new Exception("[ERROR AT IMPORTING SHADER] DrawNode didn't contain a OpenGL-shader."); + + STPCompositeNode composeNode = drawNode.OGLEffect; + + ShaderFileFiles.Vertex = new[] { new ShaderFile(composeNode.Vertex.ShaderCode) }; + ShaderFileFiles.Fragment = new [] {new ShaderFile(composeNode.Fragment.ShaderCode)}; + if (composeNode.Geometry != null) + ShaderFileFiles.Geometry = new[] {new ShaderFile(composeNode.Geometry.ShaderCode)}; + + foreach (KeyValuePair pair in drawNode.Variables) + { + switch (pair.Value.Type) + { + case STPBasisType.Bool: + _uniforms += context => Uniforms[pair.Key].SetUniform1(context.Material.ShaderArguments.Get(pair.Key, false)); + break; + case STPBasisType.Float: + _uniforms += context => Uniforms[pair.Key].SetUniform1(context.Material.ShaderArguments.Get(pair.Key, 0.0f)); + break; + case STPBasisType.Vector2: + _uniforms += context => Uniforms[pair.Key].SetUniform2(context.Material.ShaderArguments.Get(pair.Key, Vector2.Zero)); + break; + case STPBasisType.Vector3: + _uniforms += context => Uniforms[pair.Key].SetUniform3(context.Material.ShaderArguments.Get(pair.Key, Vector3.Zero)); + break; + case STPBasisType.Vector4: + _uniforms += context => + Uniforms[pair.Key].SetUniform4(context.Material.ShaderArguments.Get(pair.Key, Vector4.Zero)); + break; + case STPBasisType.Matrix: + _uniforms += context => Uniforms[pair.Key].SetMatrix4(context.Material.ShaderArguments.Get(pair.Key, Matrix4.Identity)); + break; + case STPBasisType.Texture: + _uniforms += context => Uniforms[pair.Key].SetTexture(context.Material.ShaderArguments.Get(pair.Key, null)); + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + } + + protected override void DrawProcess(DrawContext context) + { + _uniforms.Invoke(context); + + DrawObject(context.ForcedType.GetValueOrDefault(context.Mesh.PrimitiveType), context.Mesh); + } + } +} \ No newline at end of file diff --git a/src/optionals/SM.Intergrations/ShaderTool/STPostProcessEffect.cs b/src/optionals/SM.Intergrations/ShaderTool/STPostProcessEffect.cs new file mode 100644 index 0000000..f62445c --- /dev/null +++ b/src/optionals/SM.Intergrations/ShaderTool/STPostProcessEffect.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using OpenTK.Graphics.OpenGL4; +using ShaderToolParser.Nodes; +using ShaderToolParser.Nodes.Textures; +using ShaderToolParser.Variables; +using SM.Base.Drawing; +using SM.Base.PostProcess; +using SM.Base.Textures; +using SM.Base.Window; +using SM.OGL.Framebuffer; +using SM.OGL.Texture; + +namespace SM.Intergrations.ShaderTool +{ + public class STPostProcessEffect : PostProcessEffect + { + private STPostProcessShader _shader; + + public ShaderArguments Arguments; + + public STPostProcessEffect(STPDrawNode postEffectNode) + { + Arguments = Arguments ?? new ShaderArguments(); + + if (postEffectNode.OGLEffect == null) + throw new Exception("[ERROR AT IMPORTING EFFECT] DrawNode didn't contain a OpenGL-shader."); + + _shader = new STPostProcessShader(postEffectNode); + + foreach (KeyValuePair pair in postEffectNode.Variables) + { + + if (pair.Value.Type == STPBasisType.Texture) + { + if (pair.Value.Texture == null) continue; + Arguments[pair.Key] = new Texture(((STPTextureNode)pair.Value.Texture).Bitmap); + } + } + } + + public override void Draw(ColorAttachment source, DrawContext context) + { + Arguments["_Scene"] = (TextureBase)source; + Arguments["_MVP"] = Mvp; + Arguments["_ViewportSize"] = context.Window.WindowSize; + + _shader.Draw(Arguments); + } + } +} \ No newline at end of file diff --git a/src/optionals/SM.Intergrations/ShaderTool/STPostProcessShader.cs b/src/optionals/SM.Intergrations/ShaderTool/STPostProcessShader.cs new file mode 100644 index 0000000..35a1b4c --- /dev/null +++ b/src/optionals/SM.Intergrations/ShaderTool/STPostProcessShader.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using OpenTK; +using OpenTK.Graphics.OpenGL4; +using ShaderToolParser.Nodes; +using ShaderToolParser.Variables; +using SM.Base.Drawing; +using SM.Base.Objects.Static; +using SM.Base.Textures; +using SM.OGL.Shaders; +using SM.OGL.Texture; + +namespace SM.Intergrations.ShaderTool +{ + public class STPostProcessShader : GenericShader + { + private event Action _uniforms; + + public STPostProcessShader(STPDrawNode postProcessNode) : base(new ShaderFileCollection()) + { + if (postProcessNode.OGLEffect == null) + throw new Exception("[ERROR AT IMPORTING SHADER] DrawNode didn't contain a OpenGL-shader."); + + STPCompositeNode composeNode = postProcessNode.OGLEffect; + + ShaderFileFiles.Vertex = new[] { new ShaderFile(composeNode.Vertex.ShaderCode) }; + ShaderFileFiles.Fragment = new[] { new ShaderFile(composeNode.Fragment.ShaderCode) }; + if (composeNode.Geometry != null) + ShaderFileFiles.Geometry = new[] { new ShaderFile(composeNode.Geometry.ShaderCode) }; + + foreach (KeyValuePair pair in postProcessNode.Variables) + { + switch (pair.Value.Type) + { + case STPBasisType.Bool: + _uniforms += context => Uniforms[pair.Key].SetUniform1(context.Get(pair.Key, false)); + break; + case STPBasisType.Float: + _uniforms += context => Uniforms[pair.Key].SetUniform1(context.Get(pair.Key, 0.0f)); + break; + case STPBasisType.Vector2: + _uniforms += context => Uniforms[pair.Key].SetUniform2(context.Get(pair.Key, Vector2.Zero)); + break; + case STPBasisType.Vector3: + _uniforms += context => Uniforms[pair.Key].SetUniform3(context.Get(pair.Key, Vector3.Zero)); + break; + case STPBasisType.Vector4: + _uniforms += context => + Uniforms[pair.Key].SetUniform4(context.Get(pair.Key, Vector4.Zero)); + break; + case STPBasisType.Matrix: + _uniforms += context => Uniforms[pair.Key].SetMatrix4(context.Get(pair.Key, Matrix4.Identity)); + break; + case STPBasisType.Texture: + _uniforms += context => Uniforms[pair.Key].SetTexture(context.Get(pair.Key, null)); + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + } + + public void Draw(ShaderArguments arguments) + { + Activate(); + Plate.Object.Activate(); + + _uniforms.Invoke(arguments); + + GL.DrawArrays(PrimitiveType.Quads, 0, 4); + CleanUp(); + } + } +} \ No newline at end of file diff --git a/src/optionals/SM.Intergrations/packages.config b/src/optionals/SM.Intergrations/packages.config new file mode 100644 index 0000000..12fbc5b --- /dev/null +++ b/src/optionals/SM.Intergrations/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SMOptionals/SM.Game/Controls/GameController.cs b/src/optionals/SM.Utils/Controls/GameController.cs similarity index 96% rename from SMOptionals/SM.Game/Controls/GameController.cs rename to src/optionals/SM.Utils/Controls/GameController.cs index 65f41dd..af6d989 100644 --- a/SMOptionals/SM.Game/Controls/GameController.cs +++ b/src/optionals/SM.Utils/Controls/GameController.cs @@ -1,6 +1,6 @@ using SharpDX.XInput; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public struct GameController { diff --git a/SMOptionals/SM.Game/Controls/GameControllerState.cs b/src/optionals/SM.Utils/Controls/GameControllerState.cs similarity index 98% rename from SMOptionals/SM.Game/Controls/GameControllerState.cs rename to src/optionals/SM.Utils/Controls/GameControllerState.cs index 414a2ae..4b661a2 100644 --- a/SMOptionals/SM.Game/Controls/GameControllerState.cs +++ b/src/optionals/SM.Utils/Controls/GameControllerState.cs @@ -2,7 +2,7 @@ using OpenTK; using SharpDX.XInput; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public struct GameControllerState { diff --git a/SMOptionals/SM.Game/Controls/GameControllerStateButtons.cs b/src/optionals/SM.Utils/Controls/GameControllerStateButtons.cs similarity index 97% rename from SMOptionals/SM.Game/Controls/GameControllerStateButtons.cs rename to src/optionals/SM.Utils/Controls/GameControllerStateButtons.cs index 57aca8c..7ee7763 100644 --- a/SMOptionals/SM.Game/Controls/GameControllerStateButtons.cs +++ b/src/optionals/SM.Utils/Controls/GameControllerStateButtons.cs @@ -1,6 +1,6 @@ using SharpDX.XInput; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public struct GameControllerStateButtons { diff --git a/SMOptionals/SM.Game/Controls/GameControllerStateDPad.cs b/src/optionals/SM.Utils/Controls/GameControllerStateDPad.cs similarity index 96% rename from SMOptionals/SM.Game/Controls/GameControllerStateDPad.cs rename to src/optionals/SM.Utils/Controls/GameControllerStateDPad.cs index 5385e60..e5308a6 100644 --- a/SMOptionals/SM.Game/Controls/GameControllerStateDPad.cs +++ b/src/optionals/SM.Utils/Controls/GameControllerStateDPad.cs @@ -1,6 +1,6 @@ using SharpDX.XInput; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public struct GameControllerStateDPad { diff --git a/SMOptionals/SM.Game/Controls/GameControllerStateThumbs.cs b/src/optionals/SM.Utils/Controls/GameControllerStateThumbs.cs similarity index 94% rename from SMOptionals/SM.Game/Controls/GameControllerStateThumbs.cs rename to src/optionals/SM.Utils/Controls/GameControllerStateThumbs.cs index 1d4eefd..eba90e6 100644 --- a/SMOptionals/SM.Game/Controls/GameControllerStateThumbs.cs +++ b/src/optionals/SM.Utils/Controls/GameControllerStateThumbs.cs @@ -1,6 +1,6 @@ using OpenTK; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public struct GameControllerStateThumbs { diff --git a/SMOptionals/SM.Game/Controls/GameControllerStateTriggers.cs b/src/optionals/SM.Utils/Controls/GameControllerStateTriggers.cs similarity index 90% rename from SMOptionals/SM.Game/Controls/GameControllerStateTriggers.cs rename to src/optionals/SM.Utils/Controls/GameControllerStateTriggers.cs index 3c99852..13ee4cb 100644 --- a/SMOptionals/SM.Game/Controls/GameControllerStateTriggers.cs +++ b/src/optionals/SM.Utils/Controls/GameControllerStateTriggers.cs @@ -1,4 +1,4 @@ -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public struct GameControllerStateTriggers { diff --git a/SMOptionals/SM.Game/Controls/GameKeybind.cs b/src/optionals/SM.Utils/Controls/GameKeybind.cs similarity index 90% rename from SMOptionals/SM.Game/Controls/GameKeybind.cs rename to src/optionals/SM.Utils/Controls/GameKeybind.cs index eb306c8..1f1e823 100644 --- a/SMOptionals/SM.Game/Controls/GameKeybind.cs +++ b/src/optionals/SM.Utils/Controls/GameKeybind.cs @@ -1,6 +1,6 @@ using System; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public class GameKeybind { @@ -18,10 +18,8 @@ namespace SM.Game.Controls return AI; case GameKeybindActorType.Keyboard: return Keyboard; - break; case GameKeybindActorType.Controller: return Controller; - break; default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } diff --git a/SMOptionals/SM.Game/Controls/GameKeybindActor.cs b/src/optionals/SM.Utils/Controls/GameKeybindActor.cs similarity index 98% rename from SMOptionals/SM.Game/Controls/GameKeybindActor.cs rename to src/optionals/SM.Utils/Controls/GameKeybindActor.cs index c0527c3..66a583f 100644 --- a/SMOptionals/SM.Game/Controls/GameKeybindActor.cs +++ b/src/optionals/SM.Utils/Controls/GameKeybindActor.cs @@ -1,6 +1,6 @@ using OpenTK.Input; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public enum GameKeybindActorType { diff --git a/SMOptionals/SM.Game/Controls/GameKeybindContext.cs b/src/optionals/SM.Utils/Controls/GameKeybindContext.cs similarity index 92% rename from SMOptionals/SM.Game/Controls/GameKeybindContext.cs rename to src/optionals/SM.Utils/Controls/GameKeybindContext.cs index 08b6cb4..f3c6d9b 100644 --- a/SMOptionals/SM.Game/Controls/GameKeybindContext.cs +++ b/src/optionals/SM.Utils/Controls/GameKeybindContext.cs @@ -1,6 +1,6 @@ using OpenTK.Input; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public struct GameKeybindContext { diff --git a/SMOptionals/SM.Game/Controls/GameKeybindHost.cs b/src/optionals/SM.Utils/Controls/GameKeybindHost.cs similarity index 97% rename from SMOptionals/SM.Game/Controls/GameKeybindHost.cs rename to src/optionals/SM.Utils/Controls/GameKeybindHost.cs index c1d57f6..9c35ed1 100644 --- a/SMOptionals/SM.Game/Controls/GameKeybindHost.cs +++ b/src/optionals/SM.Utils/Controls/GameKeybindHost.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public class GameKeybindHost { diff --git a/SMOptionals/SM.Game/Controls/GameKeybindList.cs b/src/optionals/SM.Utils/Controls/GameKeybindList.cs similarity index 95% rename from SMOptionals/SM.Game/Controls/GameKeybindList.cs rename to src/optionals/SM.Utils/Controls/GameKeybindList.cs index 97662e1..2e37d86 100644 --- a/SMOptionals/SM.Game/Controls/GameKeybindList.cs +++ b/src/optionals/SM.Utils/Controls/GameKeybindList.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace SM.Game.Controls +namespace SM.Optionals.Controls { public class GameKeybindList : List> { diff --git a/SMCode/SM.OGL/OpenTK.dll.config b/src/optionals/SM.Utils/OpenTK.dll.config similarity index 100% rename from SMCode/SM.OGL/OpenTK.dll.config rename to src/optionals/SM.Utils/OpenTK.dll.config diff --git a/SMOptionals/SM.Game/Properties/AssemblyInfo.cs b/src/optionals/SM.Utils/Properties/AssemblyInfo.cs similarity index 100% rename from SMOptionals/SM.Game/Properties/AssemblyInfo.cs rename to src/optionals/SM.Utils/Properties/AssemblyInfo.cs diff --git a/SMOptionals/SM.Game/SM.Game.csproj b/src/optionals/SM.Utils/SM.Utils.csproj similarity index 89% rename from SMOptionals/SM.Game/SM.Game.csproj rename to src/optionals/SM.Utils/SM.Utils.csproj index cf248b4..92fd385 100644 --- a/SMOptionals/SM.Game/SM.Game.csproj +++ b/src/optionals/SM.Utils/SM.Utils.csproj @@ -7,8 +7,8 @@ {079BAB31-3DC4-40DA-90C7-EFAA8517C647} Library Properties - SM.Game - SM.Game + SM.Utils + SM.Utils v4.5.2 512 true @@ -32,13 +32,13 @@ - ..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll + ..\..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll - ..\..\packages\SharpDX.4.2.0\lib\net45\SharpDX.dll + ..\..\..\packages\SharpDX.4.2.0\lib\net45\SharpDX.dll - ..\..\packages\SharpDX.XInput.4.2.0\lib\net45\SharpDX.XInput.dll + ..\..\..\packages\SharpDX.XInput.4.2.0\lib\net45\SharpDX.XInput.dll diff --git a/SMOptionals/SM.Game/packages.config b/src/optionals/SM.Utils/packages.config similarity index 100% rename from SMOptionals/SM.Game/packages.config rename to src/optionals/SM.Utils/packages.config diff --git a/SMCode/SM.Base/Animation/AnimationCurves.cs b/src/renderer/SM.Base/Animation/AnimationCurves.cs similarity index 100% rename from SMCode/SM.Base/Animation/AnimationCurves.cs rename to src/renderer/SM.Base/Animation/AnimationCurves.cs diff --git a/SMCode/SM.Base/Animation/InterpolationProcess.cs b/src/renderer/SM.Base/Animation/InterpolationProcess.cs similarity index 100% rename from SMCode/SM.Base/Animation/InterpolationProcess.cs rename to src/renderer/SM.Base/Animation/InterpolationProcess.cs diff --git a/SMCode/SM.Base/Controls/Keyboard.cs b/src/renderer/SM.Base/Controls/Keyboard.cs similarity index 100% rename from SMCode/SM.Base/Controls/Keyboard.cs rename to src/renderer/SM.Base/Controls/Keyboard.cs diff --git a/SMCode/SM.Base/Controls/Mouse.cs b/src/renderer/SM.Base/Controls/Mouse.cs similarity index 100% rename from SMCode/SM.Base/Controls/Mouse.cs rename to src/renderer/SM.Base/Controls/Mouse.cs diff --git a/SMCode/SM.Base/Drawing/DrawingBasis.cs b/src/renderer/SM.Base/Drawing/DrawingBasis.cs similarity index 100% rename from SMCode/SM.Base/Drawing/DrawingBasis.cs rename to src/renderer/SM.Base/Drawing/DrawingBasis.cs diff --git a/SMCode/SM.Base/Drawing/GenericTransformation.cs b/src/renderer/SM.Base/Drawing/GenericTransformation.cs similarity index 100% rename from SMCode/SM.Base/Drawing/GenericTransformation.cs rename to src/renderer/SM.Base/Drawing/GenericTransformation.cs diff --git a/SMCode/SM.Base/Drawing/Instance.cs b/src/renderer/SM.Base/Drawing/Instance.cs similarity index 100% rename from SMCode/SM.Base/Drawing/Instance.cs rename to src/renderer/SM.Base/Drawing/Instance.cs diff --git a/SMCode/SM.Base/Drawing/Material.cs b/src/renderer/SM.Base/Drawing/Material.cs similarity index 68% rename from SMCode/SM.Base/Drawing/Material.cs rename to src/renderer/SM.Base/Drawing/Material.cs index 3f14675..dc8c8fb 100644 --- a/SMCode/SM.Base/Drawing/Material.cs +++ b/src/renderer/SM.Base/Drawing/Material.cs @@ -2,6 +2,7 @@ using OpenTK.Graphics; using SM.Base.Shaders; +using SM.Base.Window; using SM.OGL.Texture; #endregion @@ -16,26 +17,31 @@ namespace SM.Base.Drawing /// /// A setting to enable Blending. /// - public bool Blending = false; + public virtual bool Blending { get; set; } = false; /// /// A custom shader, that is used to draw this material. /// - public MaterialShader CustomShader; + public virtual MaterialShader CustomShader { get; set; } /// /// The base texture. (aka. Diffuse Texture) /// - public TextureBase Texture; + public virtual TextureBase Texture { get; set; } /// /// The tint or color. /// - public Color4 Tint = Color4.White; + public virtual Color4 Tint { get; set; } = Color4.White; /// /// This allows custom shaders to use own shader arguments. /// public ShaderArguments ShaderArguments { get; internal set; } = new ShaderArguments(); + + public virtual void Draw(DrawContext context) + { + context.Shader.Draw(context); + } } } \ No newline at end of file diff --git a/SMCode/SM.Base/Drawing/Particles/ParticleDrawingBasis.cs b/src/renderer/SM.Base/Drawing/Particles/ParticleDrawingBasis.cs similarity index 91% rename from SMCode/SM.Base/Drawing/Particles/ParticleDrawingBasis.cs rename to src/renderer/SM.Base/Drawing/Particles/ParticleDrawingBasis.cs index c49359e..8461927 100644 --- a/SMCode/SM.Base/Drawing/Particles/ParticleDrawingBasis.cs +++ b/src/renderer/SM.Base/Drawing/Particles/ParticleDrawingBasis.cs @@ -6,6 +6,7 @@ using OpenTK; using SM.Base.Scene; using SM.Base.Time; using SM.Base.Window; +using Stopwatch = System.Diagnostics.Stopwatch; #endregion @@ -41,7 +42,7 @@ namespace SM.Base.Drawing.Particles /// public float Lifetime; /// - /// Ranomizes the lifetime for particles. + /// Randomizes the lifetime for particles. /// public float LifetimeRandomize = 0; @@ -62,6 +63,9 @@ namespace SM.Base.Drawing.Particles } } + /// + /// If true, the particles will spawn in Worldspace and can't be moved by the transformation. + /// public bool DetachedParticles; /// @@ -106,7 +110,8 @@ namespace SM.Base.Drawing.Particles /// public void Update(UpdateContext context) { - + Stopwatch stp = new Stopwatch(); + stp.Start(); for (int i = 0; i < instances.Count; i++) { instances[i].Lifetime -= context.Deltatime; @@ -116,9 +121,10 @@ namespace SM.Base.Drawing.Particles break; } - instances[i].ModelMatrix = CreateMatrix(instances[i], - MovementCalculation(instances[i])); + instances[i].ModelMatrix = CreateMatrix(instances[i], MovementCalculation(instances[i])); } + + Console.WriteLine(); } /// @@ -153,6 +159,7 @@ namespace SM.Base.Drawing.Particles timer.Stop(); } + /// public override void OnRemoved(object sender) { base.OnRemoved(sender); @@ -171,7 +178,7 @@ namespace SM.Base.Drawing.Particles context.Instances = instances.ConvertAll(a => (Instance)a); - context.Shader.Draw(context); + Material.Draw(context); } /// @@ -189,7 +196,7 @@ namespace SM.Base.Drawing.Particles private void CreateContinuesParticles(Timer arg1, UpdateContext arg2) { - instances.Add(CreateObject(instances.Count)); + instances.Add(CreateObject(0)); } /// diff --git a/SMCode/SM.Base/Drawing/Particles/ParticleInstance.cs b/src/renderer/SM.Base/Drawing/Particles/ParticleInstance.cs similarity index 83% rename from SMCode/SM.Base/Drawing/Particles/ParticleInstance.cs rename to src/renderer/SM.Base/Drawing/Particles/ParticleInstance.cs index 1010414..9b94926 100644 --- a/SMCode/SM.Base/Drawing/Particles/ParticleInstance.cs +++ b/src/renderer/SM.Base/Drawing/Particles/ParticleInstance.cs @@ -2,8 +2,14 @@ namespace SM.Base.Drawing.Particles { + /// + /// This describes a instance of a particle + /// public class ParticleInstance : Instance { + /// + /// The lifetime the particle started with. + /// public float StartLifetime = 0; /// @@ -22,6 +28,7 @@ namespace SM.Base.Drawing.Particles public float Speed; } + /// public class ParticleInstance : ParticleInstance where TValue : struct { @@ -29,10 +36,5 @@ namespace SM.Base.Drawing.Particles /// A direction, that the particle should travel. /// public TValue Direction; - - /// - /// The start position. - /// - public TValue StartPosition; } } \ No newline at end of file diff --git a/SMCode/SM.Base/Drawing/Particles/ParticleMovement.cs b/src/renderer/SM.Base/Drawing/Particles/ParticleMovement.cs similarity index 100% rename from SMCode/SM.Base/Drawing/Particles/ParticleMovement.cs rename to src/renderer/SM.Base/Drawing/Particles/ParticleMovement.cs diff --git a/SMCode/SM.Base/Drawing/ShaderArguments.cs b/src/renderer/SM.Base/Drawing/ShaderArguments.cs similarity index 100% rename from SMCode/SM.Base/Drawing/ShaderArguments.cs rename to src/renderer/SM.Base/Drawing/ShaderArguments.cs diff --git a/SMCode/SM.Base/Drawing/Text/CharParameter.cs b/src/renderer/SM.Base/Drawing/Text/CharParameter.cs similarity index 100% rename from SMCode/SM.Base/Drawing/Text/CharParameter.cs rename to src/renderer/SM.Base/Drawing/Text/CharParameter.cs diff --git a/SMCode/SM.Base/Drawing/Text/Font.cs b/src/renderer/SM.Base/Drawing/Text/Font.cs similarity index 100% rename from SMCode/SM.Base/Drawing/Text/Font.cs rename to src/renderer/SM.Base/Drawing/Text/Font.cs diff --git a/SMCode/SM.Base/Drawing/Text/FontCharStorage.cs b/src/renderer/SM.Base/Drawing/Text/FontCharStorage.cs similarity index 100% rename from SMCode/SM.Base/Drawing/Text/FontCharStorage.cs rename to src/renderer/SM.Base/Drawing/Text/FontCharStorage.cs diff --git a/SMCode/SM.Base/Drawing/Text/TextDrawingBasis.cs b/src/renderer/SM.Base/Drawing/Text/TextDrawingBasis.cs similarity index 100% rename from SMCode/SM.Base/Drawing/Text/TextDrawingBasis.cs rename to src/renderer/SM.Base/Drawing/Text/TextDrawingBasis.cs diff --git a/SMCode/SM.Base/Drawing/TextureTransformation.cs b/src/renderer/SM.Base/Drawing/TextureTransformation.cs similarity index 100% rename from SMCode/SM.Base/Drawing/TextureTransformation.cs rename to src/renderer/SM.Base/Drawing/TextureTransformation.cs diff --git a/SMCode/SM.Base/Legacy/Font.cs b/src/renderer/SM.Base/Legacy/Font.cs similarity index 100% rename from SMCode/SM.Base/Legacy/Font.cs rename to src/renderer/SM.Base/Legacy/Font.cs diff --git a/SMCode/SM.Base/Log.cs b/src/renderer/SM.Base/Log.cs similarity index 100% rename from SMCode/SM.Base/Log.cs rename to src/renderer/SM.Base/Log.cs diff --git a/SMCode/SM.Base/Objects/InstancedMesh.cs b/src/renderer/SM.Base/Objects/InstancedMesh.cs similarity index 100% rename from SMCode/SM.Base/Objects/InstancedMesh.cs rename to src/renderer/SM.Base/Objects/InstancedMesh.cs diff --git a/SMCode/SM.Base/Objects/Mesh.cs b/src/renderer/SM.Base/Objects/Mesh.cs similarity index 100% rename from SMCode/SM.Base/Objects/Mesh.cs rename to src/renderer/SM.Base/Objects/Mesh.cs diff --git a/SMCode/SM.Base/Objects/Static/AxisHelper.cs b/src/renderer/SM.Base/Objects/Static/AxisHelper.cs similarity index 100% rename from SMCode/SM.Base/Objects/Static/AxisHelper.cs rename to src/renderer/SM.Base/Objects/Static/AxisHelper.cs diff --git a/SMCode/SM.Base/Objects/Static/Plate.cs b/src/renderer/SM.Base/Objects/Static/Plate.cs similarity index 100% rename from SMCode/SM.Base/Objects/Static/Plate.cs rename to src/renderer/SM.Base/Objects/Static/Plate.cs diff --git a/SMOptionals/SM.Game/OpenTK.dll.config b/src/renderer/SM.Base/OpenTK.dll.config similarity index 100% rename from SMOptionals/SM.Game/OpenTK.dll.config rename to src/renderer/SM.Base/OpenTK.dll.config diff --git a/SMCode/SM.Base/PostEffects/BloomEffect.cs b/src/renderer/SM.Base/PostEffects/BloomEffect.cs similarity index 97% rename from SMCode/SM.Base/PostEffects/BloomEffect.cs rename to src/renderer/SM.Base/PostEffects/BloomEffect.cs index 9b3d279..fe8426b 100644 --- a/SMCode/SM.Base/PostEffects/BloomEffect.cs +++ b/src/renderer/SM.Base/PostEffects/BloomEffect.cs @@ -1,5 +1,6 @@ #region usings +using System.Drawing; using OpenTK; using OpenTK.Graphics.OpenGL4; using SM.Base.Drawing; @@ -155,7 +156,7 @@ namespace SM.Base.PostEffects } /// - public override void Draw(DrawContext context) + public override void Draw(ColorAttachment source, DrawContext context) { if (Enable) { @@ -171,7 +172,7 @@ namespace SM.Base.PostEffects _shader.Draw(collection => { - collection["renderedTexture"].SetTexture(first ? _source.ColorAttachments["color"] : (hoz ? _yBuffer : _xBuffer)); + collection["renderedTexture"].SetTexture(first ? source : (hoz ? _yBuffer : _xBuffer)); collection["First"].SetUniform1(first); collection["Threshold"].SetUniform1(Threshold); @@ -195,7 +196,7 @@ namespace SM.Base.PostEffects _mergeShader.Draw(collection => { - collection["Scene"].SetTexture(_source.ColorAttachments["color"]); + collection["Scene"].SetTexture(source); collection["Bloom"].SetTexture(_yBuffer); collection["MinAmount"].SetUniform1(MinAmount); diff --git a/SMCode/SM.Base/PostEffects/PostProcessUtility.cs b/src/renderer/SM.Base/PostEffects/PostProcessUtility.cs similarity index 100% rename from SMCode/SM.Base/PostEffects/PostProcessUtility.cs rename to src/renderer/SM.Base/PostEffects/PostProcessUtility.cs diff --git a/SMCode/SM.Base/PostEffects/Shaders/bloom_blur.glsl b/src/renderer/SM.Base/PostEffects/Shaders/bloom_blur.glsl similarity index 100% rename from SMCode/SM.Base/PostEffects/Shaders/bloom_blur.glsl rename to src/renderer/SM.Base/PostEffects/Shaders/bloom_blur.glsl diff --git a/SMCode/SM.Base/PostEffects/Shaders/bloom_merge.glsl b/src/renderer/SM.Base/PostEffects/Shaders/bloom_merge.glsl similarity index 100% rename from SMCode/SM.Base/PostEffects/Shaders/bloom_merge.glsl rename to src/renderer/SM.Base/PostEffects/Shaders/bloom_merge.glsl diff --git a/SMCode/SM.Base/PostEffects/Shaders/bloom_merge_vert.glsl b/src/renderer/SM.Base/PostEffects/Shaders/bloom_merge_vert.glsl similarity index 100% rename from SMCode/SM.Base/PostEffects/Shaders/bloom_merge_vert.glsl rename to src/renderer/SM.Base/PostEffects/Shaders/bloom_merge_vert.glsl diff --git a/SMCode/SM.Base/PostEffects/Shaders/finalize_gamma.glsl b/src/renderer/SM.Base/PostEffects/Shaders/finalize_gamma.glsl similarity index 100% rename from SMCode/SM.Base/PostEffects/Shaders/finalize_gamma.glsl rename to src/renderer/SM.Base/PostEffects/Shaders/finalize_gamma.glsl diff --git a/SMCode/SM.Base/PostEffects/Shaders/finalize_hdr.glsl b/src/renderer/SM.Base/PostEffects/Shaders/finalize_hdr.glsl similarity index 100% rename from SMCode/SM.Base/PostEffects/Shaders/finalize_hdr.glsl rename to src/renderer/SM.Base/PostEffects/Shaders/finalize_hdr.glsl diff --git a/SMCode/SM.Base/PostProcess/DefaultFiles/extensions.frag b/src/renderer/SM.Base/PostProcess/DefaultFiles/extensions.frag similarity index 100% rename from SMCode/SM.Base/PostProcess/DefaultFiles/extensions.frag rename to src/renderer/SM.Base/PostProcess/DefaultFiles/extensions.frag diff --git a/SMCode/SM.Base/PostProcess/DefaultFiles/vertexFile.vert b/src/renderer/SM.Base/PostProcess/DefaultFiles/vertexFile.vert similarity index 100% rename from SMCode/SM.Base/PostProcess/DefaultFiles/vertexFile.vert rename to src/renderer/SM.Base/PostProcess/DefaultFiles/vertexFile.vert diff --git a/SMCode/SM.Base/PostProcess/DefaultFiles/vertexWithExt.vert b/src/renderer/SM.Base/PostProcess/DefaultFiles/vertexWithExt.vert similarity index 100% rename from SMCode/SM.Base/PostProcess/DefaultFiles/vertexWithExt.vert rename to src/renderer/SM.Base/PostProcess/DefaultFiles/vertexWithExt.vert diff --git a/SMCode/SM.Base/PostProcess/PostProcessEffect.cs b/src/renderer/SM.Base/PostProcess/PostProcessEffect.cs similarity index 92% rename from SMCode/SM.Base/PostProcess/PostProcessEffect.cs rename to src/renderer/SM.Base/PostProcess/PostProcessEffect.cs index 5a522cb..3767ace 100644 --- a/SMCode/SM.Base/PostProcess/PostProcessEffect.cs +++ b/src/renderer/SM.Base/PostProcess/PostProcessEffect.cs @@ -3,6 +3,7 @@ using OpenTK; using SM.Base.Scene; using SM.Base.Window; +using SM.OGL.Framebuffer; #endregion @@ -44,7 +45,7 @@ namespace SM.Base.PostProcess /// /// Method to draw the actual effect. /// - public abstract void Draw(DrawContext context); + public abstract void Draw(ColorAttachment source, DrawContext context); /// /// Event, when the scene changed. diff --git a/SMCode/SM.Base/PostProcess/PostProcessShader.cs b/src/renderer/SM.Base/PostProcess/PostProcessShader.cs similarity index 100% rename from SMCode/SM.Base/PostProcess/PostProcessShader.cs rename to src/renderer/SM.Base/PostProcess/PostProcessShader.cs diff --git a/SMCode/SM.Base/Properties/AssemblyInfo.cs b/src/renderer/SM.Base/Properties/AssemblyInfo.cs similarity index 100% rename from SMCode/SM.Base/Properties/AssemblyInfo.cs rename to src/renderer/SM.Base/Properties/AssemblyInfo.cs diff --git a/SMCode/SM.Base/SM.Base.csproj b/src/renderer/SM.Base/SM.Base.csproj similarity index 89% rename from SMCode/SM.Base/SM.Base.csproj rename to src/renderer/SM.Base/SM.Base.csproj index 1efa852..f0ea177 100644 --- a/SMCode/SM.Base/SM.Base.csproj +++ b/src/renderer/SM.Base/SM.Base.csproj @@ -1,5 +1,7 @@  + + @@ -37,23 +39,6 @@ 4 latest - - - ..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll - - - - ..\..\..\IAmTwo - Kopie\packages\SharpFont.4.0.1\lib\net45\SharpFont.dll - - - - - - - - - - @@ -126,12 +111,6 @@ - - - {f604d684-bc1d-4819-88b5-8b5d03a17be0} - SM.OGL - - @@ -140,8 +119,6 @@ - - @@ -153,12 +130,42 @@ + + + {f604d684-bc1d-4819-88b5-8b5d03a17be0} + SM.OGL + + + + + ..\..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll + True + + + ..\..\..\packages\SharpFont.4.0.1\lib\net45\SharpFont.dll + True + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - \ No newline at end of file diff --git a/SMCode/SM.Base/SM.Base.csproj.DotSettings b/src/renderer/SM.Base/SM.Base.csproj.DotSettings similarity index 100% rename from SMCode/SM.Base/SM.Base.csproj.DotSettings rename to src/renderer/SM.Base/SM.Base.csproj.DotSettings diff --git a/SMCode/SM.Base/SMRenderer.cs b/src/renderer/SM.Base/SMRenderer.cs similarity index 100% rename from SMCode/SM.Base/SMRenderer.cs rename to src/renderer/SM.Base/SMRenderer.cs diff --git a/SMCode/SM.Base/Scene/GenericCamera.cs b/src/renderer/SM.Base/Scene/GenericCamera.cs similarity index 100% rename from SMCode/SM.Base/Scene/GenericCamera.cs rename to src/renderer/SM.Base/Scene/GenericCamera.cs diff --git a/SMCode/SM.Base/Scene/GenericItemCollection.cs b/src/renderer/SM.Base/Scene/GenericItemCollection.cs similarity index 100% rename from SMCode/SM.Base/Scene/GenericItemCollection.cs rename to src/renderer/SM.Base/Scene/GenericItemCollection.cs diff --git a/SMCode/SM.Base/Scene/GenericScene.cs b/src/renderer/SM.Base/Scene/GenericScene.cs similarity index 100% rename from SMCode/SM.Base/Scene/GenericScene.cs rename to src/renderer/SM.Base/Scene/GenericScene.cs diff --git a/SMCode/SM.Base/Scene/IBackgroundItem.cs b/src/renderer/SM.Base/Scene/IBackgroundItem.cs similarity index 100% rename from SMCode/SM.Base/Scene/IBackgroundItem.cs rename to src/renderer/SM.Base/Scene/IBackgroundItem.cs diff --git a/SMCode/SM.Base/Scene/ICollectionItem.cs b/src/renderer/SM.Base/Scene/ICollectionItem.cs similarity index 100% rename from SMCode/SM.Base/Scene/ICollectionItem.cs rename to src/renderer/SM.Base/Scene/ICollectionItem.cs diff --git a/SMCode/SM.Base/Scene/IFixedScriptable.cs b/src/renderer/SM.Base/Scene/IFixedScriptable.cs similarity index 100% rename from SMCode/SM.Base/Scene/IFixedScriptable.cs rename to src/renderer/SM.Base/Scene/IFixedScriptable.cs diff --git a/SMCode/SM.Base/Scene/IScriptable.cs b/src/renderer/SM.Base/Scene/IScriptable.cs similarity index 100% rename from SMCode/SM.Base/Scene/IScriptable.cs rename to src/renderer/SM.Base/Scene/IScriptable.cs diff --git a/SMCode/SM.Base/Scene/IShowCollection.cs b/src/renderer/SM.Base/Scene/IShowCollection.cs similarity index 100% rename from SMCode/SM.Base/Scene/IShowCollection.cs rename to src/renderer/SM.Base/Scene/IShowCollection.cs diff --git a/SMCode/SM.Base/Scene/IShowItem.cs b/src/renderer/SM.Base/Scene/IShowItem.cs similarity index 100% rename from SMCode/SM.Base/Scene/IShowItem.cs rename to src/renderer/SM.Base/Scene/IShowItem.cs diff --git a/SMCode/SM.Base/Shaders/Extensions/ExtensionManager.cs b/src/renderer/SM.Base/Shaders/Extensions/ExtensionManager.cs similarity index 100% rename from SMCode/SM.Base/Shaders/Extensions/ExtensionManager.cs rename to src/renderer/SM.Base/Shaders/Extensions/ExtensionManager.cs diff --git a/SMCode/SM.Base/Shaders/Extensions/fragment/noise.glsl b/src/renderer/SM.Base/Shaders/Extensions/fragment/noise.glsl similarity index 100% rename from SMCode/SM.Base/Shaders/Extensions/fragment/noise.glsl rename to src/renderer/SM.Base/Shaders/Extensions/fragment/noise.glsl diff --git a/SMCode/SM.Base/Shaders/Extensions/fragment/textureGamma.glsl b/src/renderer/SM.Base/Shaders/Extensions/fragment/textureGamma.glsl similarity index 100% rename from SMCode/SM.Base/Shaders/Extensions/fragment/textureGamma.glsl rename to src/renderer/SM.Base/Shaders/Extensions/fragment/textureGamma.glsl diff --git a/SMCode/SM.Base/Shaders/Extensions/vertex/basic.vert b/src/renderer/SM.Base/Shaders/Extensions/vertex/basic.vert similarity index 100% rename from SMCode/SM.Base/Shaders/Extensions/vertex/basic.vert rename to src/renderer/SM.Base/Shaders/Extensions/vertex/basic.vert diff --git a/SMCode/SM.Base/Shaders/MaterialShader.cs b/src/renderer/SM.Base/Shaders/MaterialShader.cs similarity index 88% rename from SMCode/SM.Base/Shaders/MaterialShader.cs rename to src/renderer/SM.Base/Shaders/MaterialShader.cs index 470ad01..6aa9a48 100644 --- a/SMCode/SM.Base/Shaders/MaterialShader.cs +++ b/src/renderer/SM.Base/Shaders/MaterialShader.cs @@ -45,9 +45,7 @@ namespace SM.Base.Shaders { try { - if (context.Mesh is ILineMesh lineMesh) - GL.LineWidth(context.Material.ShaderArguments.Get("LineWidth", lineMesh.LineWidth)); - else if (context.Material.ShaderArguments.ContainsKey("LineWidth")) + if (context.Material.ShaderArguments.ContainsKey("LineWidth")) GL.LineWidth((float)context.Material.ShaderArguments["LineWidth"]); } catch diff --git a/SMCode/SM.Base/Shaders/SimpleShader.cs b/src/renderer/SM.Base/Shaders/SimpleShader.cs similarity index 100% rename from SMCode/SM.Base/Shaders/SimpleShader.cs rename to src/renderer/SM.Base/Shaders/SimpleShader.cs diff --git a/SMCode/SM.Base/Shaders/SimpleShaderPresets/basic_vertex.glsl b/src/renderer/SM.Base/Shaders/SimpleShaderPresets/basic_vertex.glsl similarity index 100% rename from SMCode/SM.Base/Shaders/SimpleShaderPresets/basic_vertex.glsl rename to src/renderer/SM.Base/Shaders/SimpleShaderPresets/basic_vertex.glsl diff --git a/SMCode/SM.Base/Shaders/SimpleShaderPresets/instanced_vertex.glsl b/src/renderer/SM.Base/Shaders/SimpleShaderPresets/instanced_vertex.glsl similarity index 100% rename from SMCode/SM.Base/Shaders/SimpleShaderPresets/instanced_vertex.glsl rename to src/renderer/SM.Base/Shaders/SimpleShaderPresets/instanced_vertex.glsl diff --git a/SMCode/SM.Base/Textures/Texture.cs b/src/renderer/SM.Base/Textures/Texture.cs similarity index 100% rename from SMCode/SM.Base/Textures/Texture.cs rename to src/renderer/SM.Base/Textures/Texture.cs diff --git a/SMCode/SM.Base/Time/Interval.cs b/src/renderer/SM.Base/Time/Interval.cs similarity index 100% rename from SMCode/SM.Base/Time/Interval.cs rename to src/renderer/SM.Base/Time/Interval.cs diff --git a/SMCode/SM.Base/Time/Stopwatch.cs b/src/renderer/SM.Base/Time/Stopwatch.cs similarity index 100% rename from SMCode/SM.Base/Time/Stopwatch.cs rename to src/renderer/SM.Base/Time/Stopwatch.cs diff --git a/SMCode/SM.Base/Time/Timer.cs b/src/renderer/SM.Base/Time/Timer.cs similarity index 100% rename from SMCode/SM.Base/Time/Timer.cs rename to src/renderer/SM.Base/Time/Timer.cs diff --git a/SMCode/SM.Base/Types/CVector1.cs b/src/renderer/SM.Base/Types/CVector1.cs similarity index 100% rename from SMCode/SM.Base/Types/CVector1.cs rename to src/renderer/SM.Base/Types/CVector1.cs diff --git a/SMCode/SM.Base/Types/CVector2.cs b/src/renderer/SM.Base/Types/CVector2.cs similarity index 100% rename from SMCode/SM.Base/Types/CVector2.cs rename to src/renderer/SM.Base/Types/CVector2.cs diff --git a/SMCode/SM.Base/Types/CVector3.cs b/src/renderer/SM.Base/Types/CVector3.cs similarity index 100% rename from SMCode/SM.Base/Types/CVector3.cs rename to src/renderer/SM.Base/Types/CVector3.cs diff --git a/SMCode/SM.Base/Types/CVector4.cs b/src/renderer/SM.Base/Types/CVector4.cs similarity index 99% rename from SMCode/SM.Base/Types/CVector4.cs rename to src/renderer/SM.Base/Types/CVector4.cs index 2f88938..5429a41 100644 --- a/SMCode/SM.Base/Types/CVector4.cs +++ b/src/renderer/SM.Base/Types/CVector4.cs @@ -1,5 +1,4 @@ using System; -using System.Windows.Forms; using OpenTK; using SM.Base.Animation; diff --git a/SMCode/SM.Base/Types/CVectorBase.cs b/src/renderer/SM.Base/Types/CVectorBase.cs similarity index 100% rename from SMCode/SM.Base/Types/CVectorBase.cs rename to src/renderer/SM.Base/Types/CVectorBase.cs diff --git a/SMCode/SM.Base/Utility/Assembly.cs b/src/renderer/SM.Base/Utility/Assembly.cs similarity index 100% rename from SMCode/SM.Base/Utility/Assembly.cs rename to src/renderer/SM.Base/Utility/Assembly.cs diff --git a/SMCode/SM.Base/Utility/Deltatime.cs b/src/renderer/SM.Base/Utility/Deltatime.cs similarity index 100% rename from SMCode/SM.Base/Utility/Deltatime.cs rename to src/renderer/SM.Base/Utility/Deltatime.cs diff --git a/SMCode/SM.Base/Utility/IInitializable.cs b/src/renderer/SM.Base/Utility/IInitializable.cs similarity index 100% rename from SMCode/SM.Base/Utility/IInitializable.cs rename to src/renderer/SM.Base/Utility/IInitializable.cs diff --git a/SMCode/SM.Base/Utility/Randomize.cs b/src/renderer/SM.Base/Utility/Randomize.cs similarity index 100% rename from SMCode/SM.Base/Utility/Randomize.cs rename to src/renderer/SM.Base/Utility/Randomize.cs diff --git a/SMCode/SM.Base/Utility/Ray.cs b/src/renderer/SM.Base/Utility/Ray.cs similarity index 100% rename from SMCode/SM.Base/Utility/Ray.cs rename to src/renderer/SM.Base/Utility/Ray.cs diff --git a/SMCode/SM.Base/Utility/RotationUtility.cs b/src/renderer/SM.Base/Utility/RotationUtility.cs similarity index 100% rename from SMCode/SM.Base/Utility/RotationUtility.cs rename to src/renderer/SM.Base/Utility/RotationUtility.cs diff --git a/SMCode/SM.Base/Utility/Util.cs b/src/renderer/SM.Base/Utility/Util.cs similarity index 100% rename from SMCode/SM.Base/Utility/Util.cs rename to src/renderer/SM.Base/Utility/Util.cs diff --git a/SMCode/SM.Base/Window/Contexts/DrawContext.cs b/src/renderer/SM.Base/Window/Contexts/DrawContext.cs similarity index 100% rename from SMCode/SM.Base/Window/Contexts/DrawContext.cs rename to src/renderer/SM.Base/Window/Contexts/DrawContext.cs diff --git a/SMCode/SM.Base/Window/Contexts/FixedUpdateContext.cs b/src/renderer/SM.Base/Window/Contexts/FixedUpdateContext.cs similarity index 100% rename from SMCode/SM.Base/Window/Contexts/FixedUpdateContext.cs rename to src/renderer/SM.Base/Window/Contexts/FixedUpdateContext.cs diff --git a/SMCode/SM.Base/Window/Contexts/UpdateContext.cs b/src/renderer/SM.Base/Window/Contexts/UpdateContext.cs similarity index 100% rename from SMCode/SM.Base/Window/Contexts/UpdateContext.cs rename to src/renderer/SM.Base/Window/Contexts/UpdateContext.cs diff --git a/SMCode/SM.Base/Window/GLWindow.cs b/src/renderer/SM.Base/Window/GLWindow.cs similarity index 100% rename from SMCode/SM.Base/Window/GLWindow.cs rename to src/renderer/SM.Base/Window/GLWindow.cs diff --git a/SMCode/SM.Base/Window/IGenericWindow.cs b/src/renderer/SM.Base/Window/IGenericWindow.cs similarity index 100% rename from SMCode/SM.Base/Window/IGenericWindow.cs rename to src/renderer/SM.Base/Window/IGenericWindow.cs diff --git a/SMCode/SM.Base/Window/ISetup.cs b/src/renderer/SM.Base/Window/ISetup.cs similarity index 100% rename from SMCode/SM.Base/Window/ISetup.cs rename to src/renderer/SM.Base/Window/ISetup.cs diff --git a/SMCode/SM.Base/Window/RenderPipeline.cs b/src/renderer/SM.Base/Window/RenderPipeline.cs similarity index 100% rename from SMCode/SM.Base/Window/RenderPipeline.cs rename to src/renderer/SM.Base/Window/RenderPipeline.cs diff --git a/SMCode/SM.Base/Window/WindowCode.cs b/src/renderer/SM.Base/Window/WindowCode.cs similarity index 100% rename from SMCode/SM.Base/Window/WindowCode.cs rename to src/renderer/SM.Base/Window/WindowCode.cs diff --git a/SMCode/SM.Base/Window/WindowFlags.cs b/src/renderer/SM.Base/Window/WindowFlags.cs similarity index 100% rename from SMCode/SM.Base/Window/WindowFlags.cs rename to src/renderer/SM.Base/Window/WindowFlags.cs diff --git a/SMCode/SM.Base/Window/winIcon.ico b/src/renderer/SM.Base/Window/winIcon.ico similarity index 100% rename from SMCode/SM.Base/Window/winIcon.ico rename to src/renderer/SM.Base/Window/winIcon.ico diff --git a/SMCode/SM.Base/packages.config b/src/renderer/SM.Base/packages.config similarity index 100% rename from SMCode/SM.Base/packages.config rename to src/renderer/SM.Base/packages.config diff --git a/SMCode/SM.OGL/Framebuffer/ColorAttachment.cs b/src/renderer/SM.OGL/Framebuffer/ColorAttachment.cs similarity index 100% rename from SMCode/SM.OGL/Framebuffer/ColorAttachment.cs rename to src/renderer/SM.OGL/Framebuffer/ColorAttachment.cs diff --git a/SMCode/SM.OGL/Framebuffer/Framebuffer.cs b/src/renderer/SM.OGL/Framebuffer/Framebuffer.cs similarity index 100% rename from SMCode/SM.OGL/Framebuffer/Framebuffer.cs rename to src/renderer/SM.OGL/Framebuffer/Framebuffer.cs diff --git a/SMCode/SM.OGL/Framebuffer/IFramebufferWindow.cs b/src/renderer/SM.OGL/Framebuffer/IFramebufferWindow.cs similarity index 100% rename from SMCode/SM.OGL/Framebuffer/IFramebufferWindow.cs rename to src/renderer/SM.OGL/Framebuffer/IFramebufferWindow.cs diff --git a/SMCode/SM.OGL/Framebuffer/RenderbufferAttachment.cs b/src/renderer/SM.OGL/Framebuffer/RenderbufferAttachment.cs similarity index 100% rename from SMCode/SM.OGL/Framebuffer/RenderbufferAttachment.cs rename to src/renderer/SM.OGL/Framebuffer/RenderbufferAttachment.cs diff --git a/SMCode/SM.OGL/GLCustomActions.cs b/src/renderer/SM.OGL/GLCustomActions.cs similarity index 100% rename from SMCode/SM.OGL/GLCustomActions.cs rename to src/renderer/SM.OGL/GLCustomActions.cs diff --git a/SMCode/SM.OGL/GLDebugging.cs b/src/renderer/SM.OGL/GLDebugging.cs similarity index 100% rename from SMCode/SM.OGL/GLDebugging.cs rename to src/renderer/SM.OGL/GLDebugging.cs diff --git a/SMCode/SM.OGL/GLObject.cs b/src/renderer/SM.OGL/GLObject.cs similarity index 100% rename from SMCode/SM.OGL/GLObject.cs rename to src/renderer/SM.OGL/GLObject.cs diff --git a/SMCode/SM.OGL/GLSettings.cs b/src/renderer/SM.OGL/GLSettings.cs similarity index 100% rename from SMCode/SM.OGL/GLSettings.cs rename to src/renderer/SM.OGL/GLSettings.cs diff --git a/SMCode/SM.OGL/GLSystem.cs b/src/renderer/SM.OGL/GLSystem.cs similarity index 100% rename from SMCode/SM.OGL/GLSystem.cs rename to src/renderer/SM.OGL/GLSystem.cs diff --git a/SMCode/SM.OGL/Mesh/BoundingBox.cs b/src/renderer/SM.OGL/Mesh/BoundingBox.cs similarity index 100% rename from SMCode/SM.OGL/Mesh/BoundingBox.cs rename to src/renderer/SM.OGL/Mesh/BoundingBox.cs diff --git a/SMCode/SM.OGL/Mesh/GenericMesh.cs b/src/renderer/SM.OGL/Mesh/GenericMesh.cs similarity index 100% rename from SMCode/SM.OGL/Mesh/GenericMesh.cs rename to src/renderer/SM.OGL/Mesh/GenericMesh.cs diff --git a/SMCode/SM.OGL/Mesh/ILineMesh.cs b/src/renderer/SM.OGL/Mesh/ILineMesh.cs similarity index 100% rename from SMCode/SM.OGL/Mesh/ILineMesh.cs rename to src/renderer/SM.OGL/Mesh/ILineMesh.cs diff --git a/SMCode/SM.OGL/Mesh/MeshAttribute.cs b/src/renderer/SM.OGL/Mesh/MeshAttribute.cs similarity index 100% rename from SMCode/SM.OGL/Mesh/MeshAttribute.cs rename to src/renderer/SM.OGL/Mesh/MeshAttribute.cs diff --git a/SMCode/SM.OGL/Mesh/MeshAttributeList.cs b/src/renderer/SM.OGL/Mesh/MeshAttributeList.cs similarity index 100% rename from SMCode/SM.OGL/Mesh/MeshAttributeList.cs rename to src/renderer/SM.OGL/Mesh/MeshAttributeList.cs diff --git a/SMCode/SM.OGL/Mesh/VBO.cs b/src/renderer/SM.OGL/Mesh/VBO.cs similarity index 100% rename from SMCode/SM.OGL/Mesh/VBO.cs rename to src/renderer/SM.OGL/Mesh/VBO.cs diff --git a/SM_TEST/OpenTK.dll.config b/src/renderer/SM.OGL/OpenTK.dll.config similarity index 100% rename from SM_TEST/OpenTK.dll.config rename to src/renderer/SM.OGL/OpenTK.dll.config diff --git a/SMCode/SM.OGL/Properties/AssemblyInfo.cs b/src/renderer/SM.OGL/Properties/AssemblyInfo.cs similarity index 100% rename from SMCode/SM.OGL/Properties/AssemblyInfo.cs rename to src/renderer/SM.OGL/Properties/AssemblyInfo.cs diff --git a/SMCode/SM.OGL/SM.OGL.csproj b/src/renderer/SM.OGL/SM.OGL.csproj similarity index 97% rename from SMCode/SM.OGL/SM.OGL.csproj rename to src/renderer/SM.OGL/SM.OGL.csproj index 74321d3..fcd5e49 100644 --- a/SMCode/SM.OGL/SM.OGL.csproj +++ b/src/renderer/SM.OGL/SM.OGL.csproj @@ -35,7 +35,7 @@ - ..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll + ..\..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll @@ -70,12 +70,12 @@ + + + - - - \ No newline at end of file diff --git a/SMCode/SM.OGL/Shaders/GenericShader.cs b/src/renderer/SM.OGL/Shaders/GenericShader.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/GenericShader.cs rename to src/renderer/SM.OGL/Shaders/GenericShader.cs diff --git a/SMCode/SM.OGL/Shaders/IUniform.cs b/src/renderer/SM.OGL/Shaders/IUniform.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/IUniform.cs rename to src/renderer/SM.OGL/Shaders/IUniform.cs diff --git a/SMCode/SM.OGL/Shaders/ShaderExtensions.cs b/src/renderer/SM.OGL/Shaders/ShaderExtensions.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/ShaderExtensions.cs rename to src/renderer/SM.OGL/Shaders/ShaderExtensions.cs diff --git a/SMCode/SM.OGL/Shaders/ShaderFile.cs b/src/renderer/SM.OGL/Shaders/ShaderFile.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/ShaderFile.cs rename to src/renderer/SM.OGL/Shaders/ShaderFile.cs diff --git a/SMCode/SM.OGL/Shaders/ShaderFileCollection.cs b/src/renderer/SM.OGL/Shaders/ShaderFileCollection.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/ShaderFileCollection.cs rename to src/renderer/SM.OGL/Shaders/ShaderFileCollection.cs diff --git a/SMCode/SM.OGL/Shaders/ShaderPreProcess.cs b/src/renderer/SM.OGL/Shaders/ShaderPreProcess.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/ShaderPreProcess.cs rename to src/renderer/SM.OGL/Shaders/ShaderPreProcess.cs diff --git a/SMCode/SM.OGL/Shaders/Uniform.cs b/src/renderer/SM.OGL/Shaders/Uniform.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/Uniform.cs rename to src/renderer/SM.OGL/Shaders/Uniform.cs diff --git a/SMCode/SM.OGL/Shaders/UniformArray.cs b/src/renderer/SM.OGL/Shaders/UniformArray.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/UniformArray.cs rename to src/renderer/SM.OGL/Shaders/UniformArray.cs diff --git a/SMCode/SM.OGL/Shaders/UniformCollection.cs b/src/renderer/SM.OGL/Shaders/UniformCollection.cs similarity index 100% rename from SMCode/SM.OGL/Shaders/UniformCollection.cs rename to src/renderer/SM.OGL/Shaders/UniformCollection.cs diff --git a/SMCode/SM.OGL/Texture/PixelInformation.cs b/src/renderer/SM.OGL/Texture/PixelInformation.cs similarity index 100% rename from SMCode/SM.OGL/Texture/PixelInformation.cs rename to src/renderer/SM.OGL/Texture/PixelInformation.cs diff --git a/SMCode/SM.OGL/Texture/TextureBase.cs b/src/renderer/SM.OGL/Texture/TextureBase.cs similarity index 100% rename from SMCode/SM.OGL/Texture/TextureBase.cs rename to src/renderer/SM.OGL/Texture/TextureBase.cs diff --git a/SMCode/SM.OGL/Version.cs b/src/renderer/SM.OGL/Version.cs similarity index 100% rename from SMCode/SM.OGL/Version.cs rename to src/renderer/SM.OGL/Version.cs diff --git a/SMCode/SM.OGL/packages.config b/src/renderer/SM.OGL/packages.config similarity index 100% rename from SMCode/SM.OGL/packages.config rename to src/renderer/SM.OGL/packages.config diff --git a/SMCode/SM2D/Controls/Mouse2D.cs b/src/renderer/SM2D/Controls/Mouse2D.cs similarity index 100% rename from SMCode/SM2D/Controls/Mouse2D.cs rename to src/renderer/SM2D/Controls/Mouse2D.cs diff --git a/SMCode/SM2D/Drawing/DrawBackground.cs b/src/renderer/SM2D/Drawing/DrawBackground.cs similarity index 98% rename from SMCode/SM2D/Drawing/DrawBackground.cs rename to src/renderer/SM2D/Drawing/DrawBackground.cs index 3fabd1d..da6c696 100644 --- a/SMCode/SM2D/Drawing/DrawBackground.cs +++ b/src/renderer/SM2D/Drawing/DrawBackground.cs @@ -85,7 +85,7 @@ namespace SM2D.Drawing { base.DrawContext(ref context); context.ModelMatrix = Matrix4.CreateScale((context.UseCamera as Camera).WorldScale.X, (context.UseCamera as Camera).WorldScale.Y, 0) * Matrix4.CreateTranslation(0,0, -1.1f); - context.Shader.Draw(context); + Material.Draw(context); } } } \ No newline at end of file diff --git a/SMCode/SM2D/Drawing/DrawObject2D.cs b/src/renderer/SM2D/Drawing/DrawObject2D.cs similarity index 97% rename from SMCode/SM2D/Drawing/DrawObject2D.cs rename to src/renderer/SM2D/Drawing/DrawObject2D.cs index e9176e6..ac2a95d 100644 --- a/SMCode/SM2D/Drawing/DrawObject2D.cs +++ b/src/renderer/SM2D/Drawing/DrawObject2D.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Drawing.Printing; using OpenTK; using OpenTK.Graphics; using SM.Base.Drawing; @@ -35,7 +36,7 @@ namespace SM2D.Drawing protected override void DrawContext(ref DrawContext context) { base.DrawContext(ref context); - context.Shader.Draw(context); + Material.Draw(context); } /// diff --git a/SMCode/SM2D/Drawing/DrawParticles.cs b/src/renderer/SM2D/Drawing/DrawParticles.cs similarity index 93% rename from SMCode/SM2D/Drawing/DrawParticles.cs rename to src/renderer/SM2D/Drawing/DrawParticles.cs index c01bda2..e85a302 100644 --- a/SMCode/SM2D/Drawing/DrawParticles.cs +++ b/src/renderer/SM2D/Drawing/DrawParticles.cs @@ -44,10 +44,9 @@ namespace SM2D.Drawing var particle = new ParticleInstance() { - Matrix = DetachedParticles ? Transform.GetMatrix() : Matrix4.CreateScale(1), + Matrix = DetachedParticles ? Transform.InWorldSpace : Matrix4.CreateScale(1), Direction = dir, - StartPosition = Transform.Position, Speed = Randomize.GetFloat(MaxSpeed), StartLifetime = Lifetime - Randomize.GetFloat(LifetimeRandomize) diff --git a/SMCode/SM2D/Drawing/DrawText.cs b/src/renderer/SM2D/Drawing/DrawText.cs similarity index 96% rename from SMCode/SM2D/Drawing/DrawText.cs rename to src/renderer/SM2D/Drawing/DrawText.cs index 3708e5c..32dc642 100644 --- a/SMCode/SM2D/Drawing/DrawText.cs +++ b/src/renderer/SM2D/Drawing/DrawText.cs @@ -41,7 +41,7 @@ namespace SM2D.Drawing base.DrawContext(ref context); context.Instances = _instances; - context.Shader.Draw(context); + Material.Draw(context); } } } \ No newline at end of file diff --git a/SMCode/SM2D/Object/PolyLine.cs b/src/renderer/SM2D/Object/PolyLine.cs similarity index 100% rename from SMCode/SM2D/Object/PolyLine.cs rename to src/renderer/SM2D/Object/PolyLine.cs diff --git a/SMCode/SM2D/Object/Polygon.cs b/src/renderer/SM2D/Object/Polygon.cs similarity index 100% rename from SMCode/SM2D/Object/Polygon.cs rename to src/renderer/SM2D/Object/Polygon.cs diff --git a/SMCode/SM2D/Object/PolygonVertex.cs b/src/renderer/SM2D/Object/PolygonVertex.cs similarity index 100% rename from SMCode/SM2D/Object/PolygonVertex.cs rename to src/renderer/SM2D/Object/PolygonVertex.cs diff --git a/SM_WPF_TEST/OpenTK.dll.config b/src/renderer/SM2D/OpenTK.dll.config similarity index 100% rename from SM_WPF_TEST/OpenTK.dll.config rename to src/renderer/SM2D/OpenTK.dll.config diff --git a/SMCode/SM2D/Pipelines/Basic2DPipeline.cs b/src/renderer/SM2D/Pipelines/Basic2DPipeline.cs similarity index 100% rename from SMCode/SM2D/Pipelines/Basic2DPipeline.cs rename to src/renderer/SM2D/Pipelines/Basic2DPipeline.cs diff --git a/SMCode/SM2D/Properties/AssemblyInfo.cs b/src/renderer/SM2D/Properties/AssemblyInfo.cs similarity index 100% rename from SMCode/SM2D/Properties/AssemblyInfo.cs rename to src/renderer/SM2D/Properties/AssemblyInfo.cs diff --git a/SMCode/SM2D/SM2D.csproj b/src/renderer/SM2D/SM2D.csproj similarity index 90% rename from SMCode/SM2D/SM2D.csproj rename to src/renderer/SM2D/SM2D.csproj index d58b4f3..67ed6ca 100644 --- a/SMCode/SM2D/SM2D.csproj +++ b/src/renderer/SM2D/SM2D.csproj @@ -31,6 +31,9 @@ 4 + + ..\..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll + @@ -53,11 +56,6 @@ - - - 3.3.1 - - @@ -71,5 +69,9 @@ SM.OGL + + + + \ No newline at end of file diff --git a/SMCode/SM2D/SM2D.csproj.DotSettings b/src/renderer/SM2D/SM2D.csproj.DotSettings similarity index 100% rename from SMCode/SM2D/SM2D.csproj.DotSettings rename to src/renderer/SM2D/SM2D.csproj.DotSettings diff --git a/SMCode/SM2D/Scene/Camera.cs b/src/renderer/SM2D/Scene/Camera.cs similarity index 100% rename from SMCode/SM2D/Scene/Camera.cs rename to src/renderer/SM2D/Scene/Camera.cs diff --git a/SMCode/SM2D/Scene/ItemCollection.cs b/src/renderer/SM2D/Scene/ItemCollection.cs similarity index 100% rename from SMCode/SM2D/Scene/ItemCollection.cs rename to src/renderer/SM2D/Scene/ItemCollection.cs diff --git a/SMCode/SM2D/Scene/Scene.cs b/src/renderer/SM2D/Scene/Scene.cs similarity index 100% rename from SMCode/SM2D/Scene/Scene.cs rename to src/renderer/SM2D/Scene/Scene.cs diff --git a/SMCode/SM2D/Shader/ShaderCollection.cs b/src/renderer/SM2D/Shader/ShaderCollection.cs similarity index 100% rename from SMCode/SM2D/Shader/ShaderCollection.cs rename to src/renderer/SM2D/Shader/ShaderCollection.cs diff --git a/SMCode/SM2D/Shader/ShaderFiles/basic.glsl b/src/renderer/SM2D/Shader/ShaderFiles/basic.glsl similarity index 100% rename from SMCode/SM2D/Shader/ShaderFiles/basic.glsl rename to src/renderer/SM2D/Shader/ShaderFiles/basic.glsl diff --git a/SMCode/SM2D/Types/Transformation.cs b/src/renderer/SM2D/Types/Transformation.cs similarity index 100% rename from SMCode/SM2D/Types/Transformation.cs rename to src/renderer/SM2D/Types/Transformation.cs diff --git a/SMCode/SM2D/Window/Window2DSetup.cs b/src/renderer/SM2D/Window/Window2DSetup.cs similarity index 100% rename from SMCode/SM2D/Window/Window2DSetup.cs rename to src/renderer/SM2D/Window/Window2DSetup.cs diff --git a/SM_WPF_TEST/packages.config b/src/renderer/SM2D/packages.config similarity index 100% rename from SM_WPF_TEST/packages.config rename to src/renderer/SM2D/packages.config diff --git a/SM_TEST/App.config b/tests/SM_TEST/App.config similarity index 100% rename from SM_TEST/App.config rename to tests/SM_TEST/App.config diff --git a/tests/SM_TEST/OpenTK.dll.config b/tests/SM_TEST/OpenTK.dll.config new file mode 100644 index 0000000..7098d39 --- /dev/null +++ b/tests/SM_TEST/OpenTK.dll.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SM_TEST/Program.cs b/tests/SM_TEST/Program.cs similarity index 68% rename from SM_TEST/Program.cs rename to tests/SM_TEST/Program.cs index 2880498..a13626d 100644 --- a/SM_TEST/Program.cs +++ b/tests/SM_TEST/Program.cs @@ -2,15 +2,18 @@ using System.Collections.Generic; using System.Diagnostics; using System.Drawing; +using System.Linq; using OpenTK; using OpenTK.Graphics; using OpenTK.Graphics.OpenGL; +using ShaderToolParser; using SM.Base; using SM.Base.Animation; using SM.Base.Controls; using SM.Base.Drawing; using SM.Base.Time; using SM.Base.Window; +using SM.Intergrations.ShaderTool; using SM2D; using SM2D.Controls; using SM2D.Drawing; @@ -25,9 +28,13 @@ namespace SM_TEST static Scene scene; private static GLWindow window; private static PolyLine line; + + private static ItemCollection test; private static DrawParticles particles; private static InterpolationProcess interpolation; + + public static STPProject portal; static void Main(string[] args) { Font font = new Font(@"C:\Windows\Fonts\Arial.ttf") @@ -36,30 +43,34 @@ namespace SM_TEST }; font.RegenerateTexture(); + portal = STPProject.CreateFromZIP("portal.zip"); + window = new GLWindow(1280, 720, "0ms", WindowFlags.Window, VSyncMode.Off); window.ApplySetup(new Window2DSetup()); - + window.SetRenderPipeline(new TestRenderPipeline()); + window.SetScene(scene = new Scene() { ShowAxisHelper = true }); - scene.Background.Color = Color4.Blue; + scene.Background.Color = Color4.Red; scene.Camera = new Camera() { }; - - particles = new DrawParticles(TimeSpan.FromSeconds(1)) + DrawObject2D obj = new DrawObject2D() { - Lifetime = 1f, - ContinuousInterval = .5f, - - Direction = -Vector2.UnitY, - DetachedParticles = true + Material = new STMaterial(portal.DrawNodes.First(a => a.Variables.ContainsKey("_MATColor"))) + { + ShaderArguments = { + { "RingLoc", .33f }, + + } + }, + Mesh = Polygon.GenerateCircle() }; - particles.Transform.Size.Set(50); - - scene.Objects.Add(particles); + obj.Transform.Size.Set(200); + scene.Objects.Add(obj); window.UpdateFrame += WindowOnUpdateFrame; window.RenderFrame += Window_RenderFrame; @@ -75,12 +86,12 @@ namespace SM_TEST private static void WindowOnUpdateFrame(object sender, FrameEventArgs e) { + /* if (Mouse.LeftClick) particles.Trigger(); if (Mouse.RightClick) - particles.ContinuousInterval = .05f; + particles.ContinuousInterval = .05f;*/ - particles.Transform.Position.Set(Mouse2D.InWorld(scene.Camera)); } } } \ No newline at end of file diff --git a/SM_TEST/Properties/AssemblyInfo.cs b/tests/SM_TEST/Properties/AssemblyInfo.cs similarity index 100% rename from SM_TEST/Properties/AssemblyInfo.cs rename to tests/SM_TEST/Properties/AssemblyInfo.cs diff --git a/tests/SM_TEST/SM_TEST.csproj b/tests/SM_TEST/SM_TEST.csproj new file mode 100644 index 0000000..54f83b0 --- /dev/null +++ b/tests/SM_TEST/SM_TEST.csproj @@ -0,0 +1,101 @@ + + + + + + + Debug + AnyCPU + {6D4FB8E6-4D0B-4928-8F9E-EF5C2FBF44E8} + WinExe + SM_TEST + SM_TEST + v4.5.2 + 512 + true + true + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + ..\..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll + + + ..\..\packages\ShaderToolParser.1.0.0-pre3\lib\net450\ShaderToolParser.dll + + + ..\..\packages\SharpDX.4.2.0\lib\net45\SharpDX.dll + + + ..\..\packages\SharpDX.XInput.4.2.0\lib\net45\SharpDX.XInput.dll + + + ..\..\packages\SharpFont.4.0.1\lib\net45\SharpFont.dll + + + + + + + + + + + + + + + + + + + + + {4cb351f4-b3f2-4f77-acc2-02f21dbf5ec2} + SM.Intergrations + + + {8e733844-4204-43e7-b3dc-3913cddabb0d} + SM.Base + + + {f604d684-bc1d-4819-88b5-8b5d03a17be0} + SM.OGL + + + {a4565538-625a-42c6-a330-dd4f1abb3986} + SM2D + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/SM_TEST/TestRenderPipeline.cs b/tests/SM_TEST/TestRenderPipeline.cs similarity index 59% rename from SM_TEST/TestRenderPipeline.cs rename to tests/SM_TEST/TestRenderPipeline.cs index 5c4edfb..5eecd9c 100644 --- a/SM_TEST/TestRenderPipeline.cs +++ b/tests/SM_TEST/TestRenderPipeline.cs @@ -1,6 +1,7 @@ using OpenTK.Graphics.OpenGL4; using SM.Base.PostEffects; using SM.Base.Window; +using SM.Intergrations.ShaderTool; using SM.OGL.Framebuffer; using SM.OGL.Texture; @@ -9,6 +10,8 @@ namespace SM_TEST public class TestRenderPipeline : RenderPipeline { private BloomEffect _bloom; + private STPostProcessEffect _vittage; + private Framebuffer _postBuffer; public override void Initialization() @@ -16,31 +19,45 @@ namespace SM_TEST MainFramebuffer = CreateWindowFramebuffer(16, PixelInformation.RGBA_HDR); - _postBuffer = CreateWindowFramebuffer(0, PixelInformation.RGBA_HDR, depth: false); + _postBuffer = CreateWindowFramebuffer(0, PixelInformation.RGBA_HDR, depth: true); Framebuffers.Add(_postBuffer); - _bloom = new BloomEffect(_postBuffer, hdr: true, .5f) + _bloom = new BloomEffect(_postBuffer, hdr: true, .75f) { - Threshold = .5f, }; - - _bloom.Initilize(this); + + _vittage = new STPostProcessEffect(Program.portal.DrawNodes.Find(a => a.Variables.ContainsKey("_ViewportSize"))) + { + Arguments = + { + {"CheckSize", 10f}, + {"Strength", .25f}, + {"TargetSize", 5f}, + {"Move", 3.33f} + } + }; + _vittage.Initilize(this); + base.Initialization(); } protected override void RenderProcess(ref DrawContext context) { + GL.Enable(EnableCap.DepthTest); MainFramebuffer.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); context.Scene.DrawBackground(context); context.Scene.DrawMainObjects(context); context.Scene.DrawHUD(context); + GL.Disable(EnableCap.DepthTest); + _postBuffer.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); PostProcessUtility.ResolveMultisampledBuffers(MainFramebuffer, _postBuffer); - // _bloom.Draw(context); + _vittage.Draw(_postBuffer["color"], context); + _bloom.Draw(_postBuffer["color"], context); Framebuffer.Screen.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); - PostProcessUtility.FinalizeHDR(_postBuffer["color"], .5f); + PostProcessUtility.FinalizeHDR(_postBuffer["color"], .1f); context.Scene.DrawDebug(context); } diff --git a/SM_TEST/packages.config b/tests/SM_TEST/packages.config similarity index 54% rename from SM_TEST/packages.config rename to tests/SM_TEST/packages.config index 2a7b555..7b1ca7f 100644 --- a/SM_TEST/packages.config +++ b/tests/SM_TEST/packages.config @@ -1,6 +1,9 @@  + + + \ No newline at end of file