From 17ffa736d353591b9545d1cedaa6373482f7f1a3 Mon Sep 17 00:00:00 2001 From: Victor Bombi Date: Sun, 22 Aug 2021 13:48:02 +0200 Subject: [PATCH] backend_test: use custom imgui gl3w --- backend_test/CMakeLists.txt | 2 +- backend_test/cimgui_extras.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backend_test/CMakeLists.txt b/backend_test/CMakeLists.txt index c21e680..60a9365 100644 --- a/backend_test/CMakeLists.txt +++ b/backend_test/CMakeLists.txt @@ -52,7 +52,7 @@ if(IMGUI_FREETYPE) endif(IMGUI_FREETYPE) #opengl3 -list(APPEND IMGUI_SOURCES ${BAKENDS_FOLDER}imgui_impl_opengl3.cpp ../imgui/examples/libs/gl3w/GL/gl3w.c) +list(APPEND IMGUI_SOURCES ${BAKENDS_FOLDER}imgui_impl_opengl3.cpp) list(APPEND IMGUI_SOURCES ./cimgui_extras.cpp) include_directories(../imgui/examples/libs/gl3w) if(WIN32) diff --git a/backend_test/cimgui_extras.cpp b/backend_test/cimgui_extras.cpp index c2c5456..e42beda 100644 --- a/backend_test/cimgui_extras.cpp +++ b/backend_test/cimgui_extras.cpp @@ -1,11 +1,10 @@ #include "../imgui/imgui.h" -// GL3W/GLFW -#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you. +#include "../imgui/backends/imgui_impl_opengl3_loader.h" //making it accesible for luajit #ifdef _WIN32 -extern "C" __declspec( dllexport ) int Do_gl3wInit(void){ return gl3wInit();}; +extern "C" __declspec( dllexport ) int Do_gl3wInit(void){ return imgl3wInit();}; #else -extern "C" int Do_gl3wInit(void){ return gl3wInit();}; +extern "C" int Do_gl3wInit(void){ return imgl3wInit();}; #endif