diff --git a/CMakeLists.txt b/CMakeLists.txt index 6283282..c9ead7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 4.0) + project(Light) set(CMAKE_CXX_STANDARD 20) diff --git a/Engine/src/Engine/Debug/Exceptions.cpp b/Engine/src/Engine/Debug/Exceptions.cpp index acbf025..6c5ff57 100644 --- a/Engine/src/Engine/Debug/Exceptions.cpp +++ b/Engine/src/Engine/Debug/Exceptions.cpp @@ -24,10 +24,10 @@ glException::glException(unsigned int source, unsigned int type, unsigned int id LOG(critical, " Source : {}", Stringifier::glDebugMsgSource(source)); LOG(critical, " Type : {}", Stringifier::glDebugMsgType(type)); LOG(critical, " ID : {}", id); - LOG(critical, " Vendor : {}", glGetString(GL_VENDOR)); - LOG(critical, " Renderer: {}", glGetString(GL_RENDERER)); - LOG(critical, " Version : {}", glGetString(GL_VERSION)); - LOG(critical, " critical, SVersion: {}", glGetString(GL_SHADING_LANGUAGE_VERSION)); + // LOG(critical, " Vendor : {}", glGetString(GL_VENDOR)); + // LOG(critical, " Renderer: {}", glGetString(GL_RENDERER)); + // LOG(critical, " Version : {}", glGetString(GL_VERSION)); + // LOG(critical, " critical, SVersion: {}", glGetString(GL_SHADING_LANGUAGE_VERSION)); LOG(critical, " {}", msg); LOG(critical, "________________________________________"); } diff --git a/Engine/src/Engine/Graphics/Blender.cpp b/Engine/src/Engine/Graphics/Blender.cpp index d785b60..18cbde9 100644 --- a/Engine/src/Engine/Graphics/Blender.cpp +++ b/Engine/src/Engine/Graphics/Blender.cpp @@ -22,7 +22,7 @@ Scope Blender::Create(Ref sharedContext) return CreateScope(std::static_pointer_cast(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); } } diff --git a/Engine/src/Engine/Graphics/Buffers.cpp b/Engine/src/Engine/Graphics/Buffers.cpp index b8af658..02e227c 100644 --- a/Engine/src/Engine/Graphics/Buffers.cpp +++ b/Engine/src/Engine/Graphics/Buffers.cpp @@ -24,7 +24,7 @@ Scope ConstantBuffer::Create(ConstantBufferIndex index, unsigned return CreateScope(index, size, std::static_pointer_cast(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } @@ -42,7 +42,7 @@ Ref VertexBuffer::Create(float* vertices, unsigned int stride, uns return CreateRef(vertices, stride, count, std::static_pointer_cast(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } @@ -60,7 +60,7 @@ Ref IndexBuffer::Create(unsigned int* indices, unsigned int count, return CreateRef(indices, count, std::dynamic_pointer_cast(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } diff --git a/Engine/src/Engine/Graphics/Framebuffer.cpp b/Engine/src/Engine/Graphics/Framebuffer.cpp index ea1c1ad..5acc70e 100644 --- a/Engine/src/Engine/Graphics/Framebuffer.cpp +++ b/Engine/src/Engine/Graphics/Framebuffer.cpp @@ -22,7 +22,7 @@ Ref Framebuffer::Create(const FramebufferSpecification& specificati return CreateRef(specification, std::static_pointer_cast(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } diff --git a/Engine/src/Engine/Graphics/RenderCommand.cpp b/Engine/src/Engine/Graphics/RenderCommand.cpp index 6d1f7cc..7b9cc5e 100644 --- a/Engine/src/Engine/Graphics/RenderCommand.cpp +++ b/Engine/src/Engine/Graphics/RenderCommand.cpp @@ -22,7 +22,7 @@ Scope RenderCommand::Create(GLFWwindow* windowHandle, Ref((std::static_pointer_cast)(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } diff --git a/Engine/src/Engine/Graphics/Shader.cpp b/Engine/src/Engine/Graphics/Shader.cpp index 94db2cf..717f171 100644 --- a/Engine/src/Engine/Graphics/Shader.cpp +++ b/Engine/src/Engine/Graphics/Shader.cpp @@ -23,7 +23,7 @@ Ref Shader::Create(BasicFileHandle vertexFile, BasicFileHandle pixelFile return CreateRef(vertexFile, pixelFile, std::static_pointer_cast(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } diff --git a/Engine/src/Engine/Graphics/Texture.cpp b/Engine/src/Engine/Graphics/Texture.cpp index ceea48b..4ff3af7 100644 --- a/Engine/src/Engine/Graphics/Texture.cpp +++ b/Engine/src/Engine/Graphics/Texture.cpp @@ -3,8 +3,8 @@ #include "OpenGL/glTexture.hpp" #ifdef LIGHT_PLATFORM_WINDOWS - #include "DirectX/dxTexture.hpp" #include "DirectX/dxSharedContext.hpp" + #include "DirectX/dxTexture.hpp" #endif #include "GraphicsContext.hpp" @@ -22,7 +22,7 @@ Ref Texture::Create(unsigned int width, unsigned int height, unsigned i return CreateRef(width, height, components, pixels, std::static_pointer_cast(sharedContext), filePath);) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } diff --git a/Engine/src/Engine/Graphics/VertexLayout.cpp b/Engine/src/Engine/Graphics/VertexLayout.cpp index 7445d6c..ad2276a 100644 --- a/Engine/src/Engine/Graphics/VertexLayout.cpp +++ b/Engine/src/Engine/Graphics/VertexLayout.cpp @@ -3,8 +3,8 @@ #include "OpenGL/glVertexLayout.hpp" #ifdef LIGHT_PLATFORM_WINDOWS - #include "DirectX/dxVertexLayout.hpp" #include "DirectX/dxSharedContext.hpp" + #include "DirectX/dxVertexLayout.hpp" #endif #include "GraphicsContext.hpp" @@ -22,7 +22,7 @@ Ref VertexLayout::Create(Ref vertexBuffer, Ref(shader, elements, std::static_pointer_cast(sharedContext));) default: - ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI()); + ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast(GraphicsContext::GetGraphicsAPI())); return nullptr; } } diff --git a/Engine/src/Engine/UserInterface/UserInterface.cpp b/Engine/src/Engine/UserInterface/UserInterface.cpp index e5f5121..c3ce3ff 100644 --- a/Engine/src/Engine/UserInterface/UserInterface.cpp +++ b/Engine/src/Engine/UserInterface/UserInterface.cpp @@ -3,8 +3,8 @@ #include "OpenGL/glUserInterface.hpp" #ifdef LIGHT_PLATFORM_WINDOWS - #include "DirectX/dxUserInterface.hpp" #include "DirectX/dxSharedContext.hpp" + #include "DirectX/dxUserInterface.hpp" #endif #include "Events/CharEvent.hpp" @@ -36,7 +36,7 @@ Scope UserInterface::Create(GLFWwindow* windowHandle, Ref(GraphicsContext::GetGraphicsAPI())); return nullptr; } diff --git a/Engine/src/Platform/GraphicsAPI/OpenGL/glGraphicsContext.cpp b/Engine/src/Platform/GraphicsAPI/OpenGL/glGraphicsContext.cpp index 072c89f..3814c94 100644 --- a/Engine/src/Platform/GraphicsAPI/OpenGL/glGraphicsContext.cpp +++ b/Engine/src/Platform/GraphicsAPI/OpenGL/glGraphicsContext.cpp @@ -37,8 +37,8 @@ void glGraphicsContext::LogDebugData() LOG(info, "________________________________________"); LOG(info, "GraphicsContext::"); LOG(info, " API : OpenGL"); - LOG(info, " Version : {}", glGetString(GL_VERSION)); - LOG(info, " Renderer: {}", glGetString(GL_RENDERER)); + // LOG(info, " Version : {}", glGetString(GL_VERSION)); + // LOG(info, " Renderer: {}", glGetString(GL_RENDERER)); LOG(info, "________________________________________"); } diff --git a/default_gui_layout.ini b/default_gui_layout.ini index cbe479f..a217f22 100644 --- a/default_gui_layout.ini +++ b/default_gui_layout.ini @@ -1,6 +1,6 @@ [Window][Dockspace] Pos=0,0 -Size=843,1404 +Size=1595,720 Collapsed=0 [Window][Debug##Default] @@ -8,29 +8,28 @@ ViewportPos=2078,721 ViewportId=0x9F5F46A1 Size=848,1408 Collapsed=0 -DockId=0x00000007,0 [Window][Dear ImGui Demo] -Pos=372,24 -Size=295,1380 +Pos=836,24 +Size=759,696 Collapsed=0 -DockId=0x00000004,0 +DockId=0x00000003,1 [Window][Hierarchy] Pos=0,24 -Size=184,1380 +Size=184,696 Collapsed=0 DockId=0x00000001,0 [Window][Properties] -Pos=669,24 -Size=160,1380 +Pos=836,24 +Size=759,696 Collapsed=0 -DockId=0x00000005,0 +DockId=0x00000003,0 [Window][Game] Pos=186,24 -Size=184,1380 +Size=648,696 Collapsed=0 DockId=0x00000002,0 @@ -41,12 +40,9 @@ Size=1274,1296 Collapsed=0 [Docking][Data] -DockNode ID=0x00000007 Pos=2078,721 Size=848,1408 Selected=0xBF096F38 -DockSpace ID=0x1ED03EE2 Window=0x5B816B74 Pos=1711,30 Size=829,1380 Split=X - DockNode ID=0x00000006 Parent=0x1ED03EE2 SizeRef=370,696 Split=X +DockSpace ID=0x1ED03EE2 Window=0x5B816B74 Pos=516,375 Size=1595,696 Split=X + DockNode ID=0x00000006 Parent=0x1ED03EE2 SizeRef=834,696 Split=X DockNode ID=0x00000001 Parent=0x00000006 SizeRef=184,696 Selected=0x29EABFBD - DockNode ID=0x00000002 Parent=0x00000006 SizeRef=184,696 CentralNode=1 Selected=0x26816F31 - DockNode ID=0x00000003 Parent=0x1ED03EE2 SizeRef=457,696 Split=X - DockNode ID=0x00000004 Parent=0x00000003 SizeRef=295,680 Selected=0xE87781F4 - DockNode ID=0x00000005 Parent=0x00000003 SizeRef=160,680 Selected=0x199AB496 + DockNode ID=0x00000002 Parent=0x00000006 SizeRef=648,696 CentralNode=1 Selected=0x26816F31 + DockNode ID=0x00000003 Parent=0x1ED03EE2 SizeRef=759,696 Selected=0x199AB496