aboutsummaryrefslogtreecommitdiff
path: root/core/src/Entrypoint
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-02-19 13:30:03 -0800
committerrtk0c <[email protected]>2022-02-19 13:30:03 -0800
commit9dcdcf68f6a60741cbdd287e7eda23b4a21a080e (patch)
treef5ff4c569607e1f63de9dd87bb7442e021b1f620 /core/src/Entrypoint
parent2599909052ef552efd5622bf73b60913e815b498 (diff)
Fix build errors and update all dependencies to latest version
- Fixed doctest executable not compiling - Fixed class accessibility error in Workflow_Main.cpp - Fixed selection of OpenGL loader in imgui OpenGL 2 & 3 backends - All loading is handled in our code now, the imgui_*_backend.cpp files are instructed to do nothing
Diffstat (limited to 'core/src/Entrypoint')
-rw-r--r--core/src/Entrypoint/Backend_OpenGL2.cpp5
-rw-r--r--core/src/Entrypoint/Backend_OpenGL3.cpp7
-rw-r--r--core/src/Entrypoint/main.cpp5
3 files changed, 12 insertions, 5 deletions
diff --git a/core/src/Entrypoint/Backend_OpenGL2.cpp b/core/src/Entrypoint/Backend_OpenGL2.cpp
index 8c56b81..8f80094 100644
--- a/core/src/Entrypoint/Backend_OpenGL2.cpp
+++ b/core/src/Entrypoint/Backend_OpenGL2.cpp
@@ -2,6 +2,7 @@
#if BUILD_CORE_WITH_OPENGL2_BACKEND
# include <glad/glad.h>
+
# include <GLFW/glfw3.h>
# include <backend/imgui_impl_glfw.h>
# include <backend/imgui_impl_opengl2.h>
@@ -9,7 +10,7 @@
# include <stdexcept>
# include <iostream>
-# define IMGUI_IMPL_OPENGL_LOADER_GLAD
+# define IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# include <backend/imgui_impl_opengl2.cpp>
class OpenGL2Backend : public RenderingBackend
@@ -97,7 +98,7 @@ std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL2Backend()
#else // ^^ BUILD_CORE_WITH_OPENGL2_BACKEND | !BUILD_CORE_WITH_OPENGL2_BACKEND vv
-std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL2Backend(){}()
+std::unique_ptr<RenderingBackend> RenderingBackend::CreateOpenGL2Backend()
{
return nullptr;
}
diff --git a/core/src/Entrypoint/Backend_OpenGL3.cpp b/core/src/Entrypoint/Backend_OpenGL3.cpp
index b4ae368..96a260a 100644
--- a/core/src/Entrypoint/Backend_OpenGL3.cpp
+++ b/core/src/Entrypoint/Backend_OpenGL3.cpp
@@ -2,6 +2,7 @@
#if BUILD_CORE_WITH_OPENGL3_BACKEND
# include <glad/glad.h>
+
# include <GLFW/glfw3.h>
# include <iostream>
# include <backend/imgui_impl_glfw.h>
@@ -9,7 +10,7 @@
# include <imgui.h>
# include <stdexcept>
-# define IMGUI_IMPL_OPENGL_LOADER_GLAD
+# define IMGUI_IMPL_OPENGL_LOADER_CUSTOM
# include <backend/imgui_impl_opengl3.cpp>
class OpenGL3Backend : public RenderingBackend
@@ -37,8 +38,8 @@ public:
const char* glslVersion = "#version 130";
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
- //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
- //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // 3.0+ only
+ // glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
+ // glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // 3.0+ only
# endif
mWindow = glfwCreateWindow(1280, 720, "Cplt", nullptr, nullptr);
diff --git a/core/src/Entrypoint/main.cpp b/core/src/Entrypoint/main.cpp
index 5ed7d84..abfb26c 100644
--- a/core/src/Entrypoint/main.cpp
+++ b/core/src/Entrypoint/main.cpp
@@ -96,6 +96,7 @@ static std::unique_ptr<RenderingBackend> CreateBackend(std::string_view option)
}
}
+#ifdef DOCTEST_CONFIG_DISABLE
int main(int argc, char* argv[])
{
argparse::ArgumentParser parser;
@@ -156,3 +157,7 @@ int main(int argc, char* argv[])
return 0;
}
+#else
+# define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
+# include <doctest/doctest.h>
+#endif