fix: build

This commit is contained in:
light7734 2025-07-04 22:11:26 +03:30
parent c5f3d6354d
commit 4f74522979
Signed by: light7734
GPG key ID: 8C30176798F1A6BA
12 changed files with 34 additions and 37 deletions

View file

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 4.0)
project(Light)
set(CMAKE_CXX_STANDARD 20)

View file

@ -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, "________________________________________");
}

View file

@ -22,7 +22,7 @@ Scope<Blender> Blender::Create(Ref<SharedContext> sharedContext)
return CreateScope<dxBlender>(std::static_pointer_cast<dxSharedContext>(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
}
}

View file

@ -24,7 +24,7 @@ Scope<ConstantBuffer> ConstantBuffer::Create(ConstantBufferIndex index, unsigned
return CreateScope<dxConstantBuffer>(index, size, std::static_pointer_cast<dxSharedContext>(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}
@ -42,7 +42,7 @@ Ref<VertexBuffer> VertexBuffer::Create(float* vertices, unsigned int stride, uns
return CreateRef<dxVertexBuffer>(vertices, stride, count, std::static_pointer_cast<dxSharedContext>(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}
@ -60,7 +60,7 @@ Ref<IndexBuffer> IndexBuffer::Create(unsigned int* indices, unsigned int count,
return CreateRef<dxIndexBuffer>(indices, count, std::dynamic_pointer_cast<dxSharedContext>(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}

View file

@ -22,7 +22,7 @@ Ref<Framebuffer> Framebuffer::Create(const FramebufferSpecification& specificati
return CreateRef<dxFramebuffer>(specification, std::static_pointer_cast<dxSharedContext>(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}

View file

@ -22,7 +22,7 @@ Scope<RenderCommand> RenderCommand::Create(GLFWwindow* windowHandle, Ref<SharedC
return CreateScope<dxRenderCommand>((std::static_pointer_cast<dxSharedContext>)(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}

View file

@ -23,7 +23,7 @@ Ref<Shader> Shader::Create(BasicFileHandle vertexFile, BasicFileHandle pixelFile
return CreateRef<dxShader>(vertexFile, pixelFile, std::static_pointer_cast<dxSharedContext>(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}

View file

@ -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> Texture::Create(unsigned int width, unsigned int height, unsigned i
return CreateRef<dxTexture>(width, height, components, pixels, std::static_pointer_cast<dxSharedContext>(sharedContext), filePath);)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}

View file

@ -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> VertexLayout::Create(Ref<VertexBuffer> vertexBuffer, Ref<Shade
return CreateRef<dxVertexLayout>(shader, elements, std::static_pointer_cast<dxSharedContext>(sharedContext));)
default:
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "Invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}
}

View file

@ -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> UserInterface::Create(GLFWwindow* windowHandle, Ref<SharedC
break;
default:
ASSERT(false, "UserInterface::Create: invalid/unsupported 'GraphicsAPI' {}", GraphicsContext::GetGraphicsAPI());
ASSERT(false, "UserInterface::Create: invalid/unsupported 'GraphicsAPI' {}", static_cast<uint32_t>(GraphicsContext::GetGraphicsAPI()));
return nullptr;
}

View file

@ -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, "________________________________________");
}

View file

@ -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