Disabled C based scene module

opengl3
Martin Felis 2019-04-23 23:09:18 +02:00
parent 4875e63950
commit 41fee52cf7
3 changed files with 2 additions and 60 deletions

View File

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

View File

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

View File

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