Compare commits
4 commits
3c87b1cd06
...
10d4a523eb
Author | SHA1 | Date | |
---|---|---|---|
10d4a523eb | |||
a6b74502e4 | |||
d9ed5f2857 | |||
5fc50ce594 |
18 changed files with 13 additions and 122 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -25,6 +25,7 @@ Makefile
|
|||
**/Sandbox.txt
|
||||
|
||||
**/Logs/**
|
||||
**/logs/**
|
||||
**.ini
|
||||
!**/default_gui_layout.ini
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
|
|
|
@ -11,7 +11,6 @@ if(NOT WIN32)
|
|||
scene/scene.cpp
|
||||
time/timer.cpp
|
||||
utils/serializer.cpp
|
||||
utils/stringifier.cpp
|
||||
)
|
||||
else()
|
||||
add_library_module(engine
|
||||
|
@ -26,7 +25,6 @@ else()
|
|||
scene/scene.cpp
|
||||
time/timer.cpp
|
||||
utils/serializer.cpp
|
||||
utils/stringifier.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -33,5 +33,5 @@
|
|||
|
||||
// entry point
|
||||
#ifdef LIGHT_ENTRY_POINT
|
||||
#include <engine/base/entrypoint.hpp>
|
||||
#include <engine/core/entrypoint.hpp>
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#include <engine/scene/components/camera.hpp>
|
||||
#include <engine/scene/components/native_script.hpp>
|
||||
#include <engine/scene/components/sprite_renderer.hpp>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
#pragma once
|
||||
#ifndef LIGHT_STRINGIFIER_H
|
||||
#define LIGHT_STRINGIFIER_H
|
||||
|
||||
|
||||
|
||||
namespace Light {
|
||||
|
||||
enum class GraphicsAPI;
|
||||
|
||||
class Stringifier
|
||||
{
|
||||
public:
|
||||
static auto glDebugMsgSeverity(unsigned int severity) -> std::string;
|
||||
|
||||
static auto glDebugMsgSource(unsigned int source) -> std::string;
|
||||
|
||||
static auto glDebugMsgType(unsigned int type) -> std::string;
|
||||
|
||||
static auto spdlogLevel(unsigned int level) -> std::string;
|
||||
|
||||
static auto graphics_api_to_string(GraphicsAPI api) -> std::string;
|
||||
};
|
||||
|
||||
} // namespace Light
|
||||
|
||||
#endif
|
|
@ -7,7 +7,7 @@
|
|||
#include <input/events/event.hpp>
|
||||
#include <input/events/keyboard.hpp>
|
||||
#include <input/events/window.hpp>
|
||||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <ranges>
|
||||
#include <renderer/blender.hpp>
|
||||
#include <renderer/graphics_context.hpp>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <engine/debug/exceptions.hpp>
|
||||
#include <engine/utils/stringifier.hpp>
|
||||
#include <glad/gl.h>
|
||||
|
||||
#ifdef LIGHT_PLATFORM_WINDOWS
|
||||
|
@ -20,8 +19,8 @@ glException::glException(unsigned int source, unsigned int type, unsigned int id
|
|||
log_crt("glException::glException::");
|
||||
// log_crt(" Severity: {}",
|
||||
// Stringifier::glDebugMsgSeverity(GL_DEBUG_SEVERITY_HIGH));
|
||||
log_crt(" Source : {}", Stringifier::glDebugMsgSource(source));
|
||||
log_crt(" Type : {}", Stringifier::glDebugMsgType(type));
|
||||
// log_crt(" Source : {}", Stringifier::glDebugMsgSource(source));
|
||||
// log_crt(" Type : {}", Stringifier::glDebugMsgType(type));
|
||||
log_crt(" ID : {}", id);
|
||||
// log_crt(" Vendor : {}", glGetString(GL_VENDOR));
|
||||
// log_crt(" renderer: {}", glGetString(GL_RENDERER));
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
#include <renderer/graphics_context.hpp>
|
||||
#include <engine/utils/stringifier.hpp>
|
||||
#include <glad/gl.h>
|
||||
#include <spdlog/common.h>
|
||||
|
||||
namespace Light {
|
||||
|
||||
auto Stringifier::glDebugMsgSeverity(unsigned int severity) -> std::string
|
||||
{
|
||||
switch (severity)
|
||||
{
|
||||
case GL_DEBUG_SEVERITY_NOTIFICATION: return "GL_DEBUG_SEVERITY_NOTIFICATION";
|
||||
case GL_DEBUG_SEVERITY_LOW: return "GL_DEBUG_SEVERITY_LOW";
|
||||
case GL_DEBUG_SEVERITY_MEDIUM: return "GL_DEBUG_SEVERITY_MEDIUM";
|
||||
case GL_DEBUG_SEVERITY_HIGH: return "GL_DEBUG_SEVERITY_HIGH";
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
auto Stringifier::glDebugMsgSource(unsigned int source) -> std::string
|
||||
{
|
||||
switch (source)
|
||||
{
|
||||
case GL_DEBUG_SOURCE_API: return "GL_DEBUG_SOURCE_API";
|
||||
case GL_DEBUG_SOURCE_WINDOW_SYSTEM: return "GL_DEBUG_SOURCE_WINDOW_SYSTEM";
|
||||
case GL_DEBUG_SOURCE_SHADER_COMPILER: return "GL_DEBUG_SOURCE_SHADER_COMPILER";
|
||||
case GL_DEBUG_SOURCE_THIRD_PARTY: return "GL_DEBUG_SOURCE_THIRD_PARTY";
|
||||
case GL_DEBUG_SOURCE_APPLICATION: return "GL_DEBUG_SOURCE_APPLICATION";
|
||||
case GL_DEBUG_SOURCE_OTHER: return "GL_DEBUG_SOURCE_OTHER";
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
auto Stringifier::glDebugMsgType(unsigned int type) -> std::string
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GL_DEBUG_TYPE_ERROR: return "GL_DEBUG_TYPE_ERROR";
|
||||
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: return "GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR";
|
||||
case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: return "GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR";
|
||||
case GL_DEBUG_TYPE_PORTABILITY: return "GL_DEBUG_TYPE_PORTABILITY";
|
||||
case GL_DEBUG_TYPE_PERFORMANCE: return "GL_DEBUG_TYPE_PERFORMANCE";
|
||||
case GL_DEBUG_TYPE_MARKER: return "GL_DEBUG_TYPE_MARKER";
|
||||
case GL_DEBUG_TYPE_PUSH_GROUP: return "GL_DEBUG_TYPE_PUSH_GROUP";
|
||||
case GL_DEBUG_TYPE_POP_GROUP: return "GL_DEBUG_TYPE_POP_GROUP";
|
||||
case GL_DEBUG_TYPE_OTHER: return "GL_DEBUG_TYPE_OTHER";
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
auto Stringifier::spdlogLevel(unsigned int level) -> std::string
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
case SPDLOG_LEVEL_TRACE: return "SPDLOG_LEVEL_TRACE";
|
||||
case SPDLOG_LEVEL_DEBUG: return "SPDLOG_LEVEL_DEBUG";
|
||||
case SPDLOG_LEVEL_INFO: return "SPDLOG_LEVEL_INFO";
|
||||
case SPDLOG_LEVEL_WARN: return "SPDLOG_LEVEL_WARN";
|
||||
case SPDLOG_LEVEL_ERROR: return "SPDLOG_LEVEL_ERROR";
|
||||
case SPDLOG_LEVEL_CRITICAL: return "SPDLOG_LEVEL_CRITICAL";
|
||||
case SPDLOG_LEVEL_OFF: return "SPDLOG_LEVEL_OFF";
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
auto Stringifier::graphics_api_to_string(GraphicsAPI api) -> std::string
|
||||
{
|
||||
switch (api)
|
||||
{
|
||||
case Light::GraphicsAPI::Default: return "Default";
|
||||
case Light::GraphicsAPI::OpenGL: return "OpenGL";
|
||||
case Light::GraphicsAPI::DirectX: return "DirectX";
|
||||
case Light::GraphicsAPI::Vulkan: return "Vulkan";
|
||||
case Light::GraphicsAPI::Metal: return "Metal";
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Light
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
|
||||
namespace Light {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <renderer/buffers.hpp>
|
||||
#include <renderer/gl/buffers.hpp>
|
||||
#include <renderer/shared_context.hpp>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <glad/gl.h>
|
||||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <renderer/gl/texture.hpp>
|
||||
|
||||
namespace Light {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <glad/gl.h>
|
||||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <renderer/gl/buffers.hpp>
|
||||
#include <renderer/gl/vertex_layout.hpp>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <renderer/gl/render_command.hpp>
|
||||
#include <renderer/render_command.hpp>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <glm/matrix.hpp>
|
||||
#include <input/events/window.hpp>
|
||||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <renderer/blender.hpp>
|
||||
#include <renderer/buffers.hpp>
|
||||
#include <renderer/framebuffer.hpp>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <ltdebug/assertions.hpp>
|
||||
#include <debug/assertions.hpp>
|
||||
#include <renderer/gl/vertex_layout.hpp>
|
||||
#include <renderer/vertex_layout.hpp>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue