Commit graph

139 commits

Author SHA1 Message Date
Light
1d87d71a06 Updated ImGui Submodule 2021-07-23 11:42:17 +04:30
Light
ffc29bec77 Maintenance
- Removed change log (was horrible idea D:)
- Fixed some premake mistakes
- Fixed a typo
- Enabled MultiProcessorCompile for windows builds
2021-07-23 11:22:01 +04:30
Light
0d28451010 premake5
- Moved premake5 Windows builds to BuildScripts/Windows
- Renamed premake5.lua files build.lua
2021-07-23 10:33:51 +04:30
Light
9701b08cc3 Maintenance
- ImGui ini file handling and .gitignore
- Minor maintenance
2021-07-23 10:11:20 +04:30
Light
8e39b82642 Deleted Logs 2021-07-23 09:44:49 +04:30
Light
5cc82f1558 Maintenance
- Added 'Get*Ref()' to 'dxSharedContext'

- Fixed 'dxFramebuffer::Resize' not resizing :/
- Fixed 'dxFrameBuffer::BindAsTarget' not setting the viewport
- Fixed 'dxRenderCommand::SetViewport()' not resizing the swapchain's
      buffer

- Improved 'dxGraphicsContext''s debug interface

-  Removed most of the 'ComPtr's in 'dxGraphicsContext',  they can be
      accessed with the 'm_SharedContext'
2021-07-22 13:00:41 +04:30
Light
aac2c51bd5 Input
- Added 'Input'
- Added <InputCodes>
- The 'MirrorLayer''s ImGuiWindow, "GameView" will not receive/react to
      input events if the window is not focused
2021-07-21 20:03:39 +04:30
Light
43b2f72ded Layer Improvements
- Added 'Layer::OnEvent()', 'Layer' now handles an event by itself and
      doesn't need another class to determine the event's type
- Added reverse iterators 'rend()' and 'rbegin()' to 'LayerStack'

- Removed 'LayerStack::On*()', 'LayerStack' is meant to be a data
      structure for the layers,

- 'Layer::On*Event()' are now protected and called by 'Layer::OnEvent()'

- 'Application' now handles iterating through the 'Layer's
      and calling the update/on* functions

- Fixed a typo where in 'Mirror' where the name of the 'MirrorLayer' was
      "SandboxLayer" instead of "MirrorLayer"
2021-07-21 15:14:22 +04:30
Light
2967cf5675 Failed engine/client assertion
- Separated 'FailedAssertion' into 'FailedEngineAssertion' and
      'FailedClientAssertion'
- Minor adjustment to the change log
2021-07-21 13:52:30 +04:30
Light
ac8c515b06 Merge branch 'main' of https://github.com/Light3039/Light into main 2021-07-21 13:36:27 +04:30
Light
919764cef7 LT_BERAK
- Added the 'LT_BERAK' macro, a portable debug-trap
2021-07-21 13:34:34 +04:30
Light
abd52cdfee
Update Base.h
- Fixed a commit mistake
2021-07-21 13:28:47 +04:30
Light
58ee71e0d8 Change log
- Added Change log
2021-07-21 13:27:29 +04:30
Light
2061abadd8 Framebuffer resizing
- Added 'Camera::OnResize()' for keeping the aspect ratio updated to
      prevent streching/squashing the scene

- Added 'FrameBuffe::Resize()'

- Enabled ImGui docking and viewport

- 'MirrorLayer::m_Camera' & 'MirrorLayer::m_Framebuffer' now adjust their properties
      when ImGui's available region changes
2021-07-16 19:59:14 +04:30
Light
e8b86931b2 Update LightEngine.h 2021-07-15 16:02:41 +04:30
Light
0b19b1aa30 Mirror
- Added Mirror:
      Mirror is the LightEngine's editor >w< (cuz it reflects light uwu)
2021-07-15 15:56:30 +04:30
Light
271f3b2075 Framebuffer
- Added 'Framebuffer'
- Added an optional 'FrameBuffer' parameter to'Renderer::BeginScene'
- Added 'RenderCommand::DefaultTargetFramebuffer()'
- Added static 'GraphicsContext::GetSharedContext()'

- Fixed 'dxBlender' by changing 'DestBlendAlpha' from D3D11_BLEND_ZERO
       to D3D11_BLEND_ONE
- Fixed 'glRenderCommand::ClearBackBuffer()' by calling glClear before
      glClearColor

- 'Application::GameLoop' now updates the ui ._.
2021-07-15 15:46:28 +04:30
Light
590c319d4d Instrumentor
- 'Instrumentor' now creates a directory for the specified session path
- Added <filesystem> to <ltpch>
2021-07-15 01:10:50 +04:30
Light
dff6bec35c fml 2021-07-14 03:33:32 +04:30
Light
123160c13b Work for fucks sake 2021-07-14 03:31:56 +04:30
Light
929358e420 Submodules 2021-07-14 03:29:55 +04:30
Light
99c7a1c108 Submodules 2021-07-14 03:22:42 +04:30
Light
9d3a650273 moved imgui to docking 2021-07-14 02:48:01 +04:30
Light3039
d2bd0881d1 Linux fix
- Fixed 'Instrumentor' by including 'ostream' & 'fstream'
- Fixed 'Application' by including 'Instrumentor'
- Fixed both 'RendererProgram''s 'Advance()', should have returned true
2021-07-14 02:19:52 +04:30
Light
cf888cfbe0 Update SandboxLayer.h 2021-07-14 01:23:22 +04:30
Light
aaf1bbfe74 WindowResizeEvent | FlushScene
- 'Renderer' now receives 'WindowResizedEvent' and handle the
      'Framebuffer' and viewport stuff
- Added 'Renderer' now uses the new 'FlushScene' function to flush when
      the mapped vertex buffer is filled
- The viewport is now set by 'RenderCommand' via the 'Renderer' rather
      than the 'GraphicsConntext'

- 'Window' no longer sends 'WindowResizedEvent' to 'GraphicsContext'
- 'GraphicsContext' no longer receives 'OnWindowResize' events

- Note: Sending events should be done by the 'Application'

- Note: Excuse the double commit, forgot to commit 'wWindow.cpp'
2021-07-14 00:18:34 +04:30
Light
57616d755c WindowResizeEvent | FlushScene
- 'Renderer' now receives 'WindowResizedEvent' and handle the
      'Framebuffer' and viewport stuff
- Added 'Renderer' now uses the new 'FlushScene' function to flush when
      the mapped vertex buffer is filled
- The viewport is now set by 'RenderCommand' via the 'Renderer' rather
      than the 'GraphicsConntext'

- 'Window' no longer sends 'WindowResizedEvent' to 'GraphicsContext'
- 'GraphicsContext' no longer receives 'OnWindowResize' events

- Note: Sending events should be done by the 'Application'
2021-07-14 00:17:30 +04:30
Light
44b135f157 Instrumentor
- 'Instrumentor' now tracks the sessionn's submit count
- 'Instrumentor::SubmitScopeProfileImpl' no longer uses a static variable
2021-07-14 00:16:10 +04:30
Light
cd30d0bba1 Instrumentpr
- Added Instrumentor
      * Instrumentor (class)
      * InstrumentorTimer (class, used statically)
      * ScopeProfileResult (struct)

- Tidy
      * wWindow::wWindow
2021-07-12 15:20:47 +04:30
Light3039
3363239c8d Linux fix
* Fixed lWindow
      # Fixed the key and mouse button events
      # Decleared the 'PollEvents' function
      # Decleared the 'OnEvent' function

* Fixed GraphicsContext (typo)
      # Changed the GraphicsContext::OpenGL to GraphicsAPI::OpenGL

* Fixed 'QuadRendererProgram' (linux)
      # Removed 'QuadRendererVertex''s forward decleration

* Fixed 'TextureRendererProgram' (linux)
      # Removed 'TextureRendererProgram''s forward decleration

* Added __builtin_trap on 'LT_*_ASSERT's for linux platforms
2021-07-12 11:32:07 +04:30
Light
033a3b1dd1 Shader files: hlsl & glsl
- Moved #define LT_ENGINE_RESOURCES_*_SHADER_* definitions to files
       * Note: This was done so for a gcc compilation error caused by R"()" string

- Removed test print fps in  'Application::GameLoop()'
2021-07-10 19:59:27 +04:30
Light
a3f0693655 Blender
- Added 'Blender' (gl, dx)
2021-07-09 11:56:31 +04:30
Light
422241479c Time
- Fixed DeltaTimer
2021-07-09 11:56:06 +04:30
Light
45c5073deb Time
- Added Timer
- Added DeltaTimer
2021-07-09 09:55:05 +04:30
Light
91a0c92fe7 - ConstantBuffers
- Added ConstantBuffers
- Updated GLAD to have GL_ARB_shading_language_420pack extensions
2021-07-05 14:36:36 +04:30
Light
b8ca0099cb Camera
- Added 'Camera'
- Added 'SetuniformMat4' to the 'Shader' , this is a temporary solution
- Added u_ViewProjection to glsl shaders

- Fixed 'Application's' placeholder delta time
- Fixed glfwKeyEvent returning KeyReleasedEvent on GLFW_REPEAT

- Note: Camera is not supported for DirectX for the time being due to hlsl not
       supporting uniforms like glsl
2021-07-05 01:59:18 +04:30
Light
2ab97d3863 Major Maintenance
- Major tidying
- Moved 'RendererProgram' classes out of the 'Renderer' class
- Moved 'RenderCommand' member variable out of 'GraphicsContext' and into
       the 'Renderer' class as a unique_ptr. results in 'Renderer' taking a
       windowHandle for construction
- Defined new macros for max quads in 'Renderer.h'
- Added the 'Stringifier' to 'Base.h'
- Added the 'ResourceManager' to the 'LightEngine.h'
- Application now logs the current file directory
- Fixed the forward declaration in GraphicsContext
- Fixed the debug break in Base.h
- Fixed 'dxShader' not logging compile errors
- 'glVertexLayout' now takes in a shared_ptr for 'VertexBuffer'
- 'glShader' now logs the shader compilation errors properly
- 'dxVertexLayout' now takes in a shared_ptr for 'Shader"
- Modified 'dxSharedContext' members to be private and made getters for them
- 'dxRenderCommand::SwapBuffers' now throws dxException for
       DXGI_ERROR_DEVICE_REMOD error
2021-07-01 19:25:46 +04:30
Light
7872e42c76 dxTexture
- Added dxTexture
- Added hlsl to TextureShader.h
2021-06-29 14:21:05 +04:30
Light
c9352407e1 Textures
- Added Texture and glTexture class ( no dx implementation yet )
- Added TextureRendererProgram to Renderer
- Added LoadTexture to ResourceManager
- Added TextureShader
- Added awesomeface.png
- Removed unused shader files from Sandbox/res
- Fixed gladLoadGLLoader call in glGraphicsContext
- Enabled alpha blending in glGraphicsContext
- Added stb_image library
2021-06-29 11:01:11 +04:30
Light
2b87fd22fe
Update README.md 2021-06-29 07:36:26 +04:30
Light
6149c0da70 ResourceManager
- Added ResourceManager
- Removed FileManager
- Shader's constructor now takes the shader source specific to the current GraphicsAPI
2021-06-28 14:37:48 +04:30
Light
b50564c833 Fixed premake5 excludes
- Fixed mistakes from previous fix... :/
- It seems like premake5 can't do nested filters therefore I have to
      use multiple tokens in the same filter
2021-06-27 14:48:26 +04:30
Light3039
7e870970a9 Fixed premake5 excludes
- Premake now excludes non-Linux folders from Linux builds
- Premake now excludes non-Windows folders from Windows builds
2021-06-27 13:06:57 +04:30
Light3039
8ece539976 lWindow class
- Added window class for linux
2021-06-27 12:05:46 +04:30
Light
24a06fadfe
Update README.md 2021-06-27 08:33:48 +04:30
Light
42ed4c1b79 Dependencies 2021-06-27 08:08:07 +04:30
Light
3c2e7d6bb1 Minor fixes
- removed the test '#error' in 'Base.h'
- changed from random color per vertex to input 'tint' from argument in 'DrawQuad'
- reverted back some window creation stuff
2021-06-26 15:59:26 +04:30
Light3039
a682523076 Initial Linux Support 2021-06-26 13:09:11 +04:30
Light
49b4560351
Update README.md 2021-06-21 19:16:53 +04:30
Light
6ded78531f DrawQuad tint
- Renderer::DrawQuad now uses the parameter's value rather than the hardcoded ones.
2021-06-21 18:39:19 +04:30