From 41fee52cf7b5a2d31cbd38a1361fa774300e462f Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Tue, 23 Apr 2019 23:09:18 +0200 Subject: [PATCH] Disabled C based scene module --- src/main.cc | 4 +-- src/modules/CMakeLists.txt | 3 --- src/modules/SceneModule.c | 55 -------------------------------------- 3 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 src/modules/SceneModule.c diff --git a/src/main.cc b/src/main.cc index ee57115..c575026 100644 --- a/src/main.cc +++ b/src/main.cc @@ -146,7 +146,7 @@ int main(void) glfwSwapInterval(1); // Initialize OpenGL loader - gladLoadGLLoader((GLADloadproc) glfwGetProcAddress); + gladLoadGLLoader((GLADloadproc) glfwGetProcAddress); glfwSetKeyCallback(gWindow, key_callback); glfwSetScrollCallback (gWindow, mouse_scroll_callback); @@ -194,7 +194,7 @@ int main(void) RuntimeModuleManager module_manager; module_manager.RegisterModule("src/modules/libRenderModule.so"); module_manager.RegisterModule("src/modules/libTestModule.so"); - module_manager.RegisterModule("src/modules/libSceneModule.so"); +// module_manager.RegisterModule("src/modules/libSceneModule.so"); // module_manager.RegisterModule("src/modules/libCharacterModule.so"); // Setup global variables diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index 71bb802..cbef06e 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -11,6 +11,3 @@ ADD_LIBRARY (RenderModule SHARED ADD_LIBRARY (TestModule SHARED TestModule.cc) TARGET_LINK_LIBRARIES ( TestModule RenderModule) - -ADD_LIBRARY (SceneModule SHARED SceneModule.c) -TARGET_LINK_LIBRARIES ( SceneModule RenderModule) diff --git a/src/modules/SceneModule.c b/src/modules/SceneModule.c deleted file mode 100644 index 23d9dc6..0000000 --- a/src/modules/SceneModule.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "RuntimeModule.h" -#include "RenderCommands.h" -#include "Utils.h" - -typedef struct { -} module_state; - -static struct module_state *module_init() { - gLog ("%s %s called", __FILE__, __FUNCTION__); - module_state *state = (module_state*) malloc(sizeof(*state)); - - return state; -} - -static void module_finalize(struct module_state *state) { - gLog ("%s %s called (state %p)", __FILE__, __FUNCTION__, state); - free(state); -} - -static void module_reload(struct module_state *state, void* read_serializer) { - gLog ("%s %s called (state %p)", __FILE__, __FUNCTION__, state); -} - -static void module_unload(struct module_state *state, void* write_serializer) { - gLog ("%s %s called (state %p)", __FILE__, __FUNCTION__, state); -} - -static bool module_step(struct module_state *state, float dt) { - gLog ("Scene step4"); - float mat[16] = { - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f - }; - - float color[4] = { 1.0f, 1.0f, 1.0f, 1.0f}; - - RenderCommandsClear(); - - RenderSubmit( - DebugSphere, - mat, - color - ); - return true; -} - -const struct module_api MODULE_API = { - .init = module_init, - .finalize = module_finalize, - .reload = module_reload, - .unload = module_unload, - .step = module_step -};