From b48fe5909bd9314c271f1cb729c9aa79d88a26f3 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Sun, 31 Mar 2019 21:54:14 +0200 Subject: [PATCH] * add some GL base to libui (only for Windows for now) * make the Codeblocks project a bit less braindead (don't repeat libraries for each build target) --- CMakeLists.txt | 2 ++ melonDS.cbp | 1 + src/libui_sdl/libui/ui.h | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8abe1129..a3337667 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,7 @@ elseif (WIN32) src/libui_sdl/libui/windows/fontbutton.cpp src/libui_sdl/libui/windows/fontdialog.cpp src/libui_sdl/libui/windows/form.cpp + src/libui_sdl/libui/windows/gl.cpp src/libui_sdl/libui/windows/graphemes.cpp src/libui_sdl/libui/windows/grid.cpp src/libui_sdl/libui/windows/group.cpp @@ -172,6 +173,7 @@ elseif (WIN32) LINK_LIBRARIES("usp10") LINK_LIBRARIES("ws2_32") LINK_LIBRARIES("uxtheme") + LINK_LIBRARIES("opengl32") endif (UNIX) find_package(SDL2 REQUIRED) diff --git a/melonDS.cbp b/melonDS.cbp index fc5f8df1..9f105fcd 100644 --- a/melonDS.cbp +++ b/melonDS.cbp @@ -222,6 +222,7 @@ + diff --git a/src/libui_sdl/libui/ui.h b/src/libui_sdl/libui/ui.h index a81aa705..381b85b0 100644 --- a/src/libui_sdl/libui/ui.h +++ b/src/libui_sdl/libui/ui.h @@ -601,11 +601,11 @@ _UI_EXTERN void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayou // OpenGL support -// TODO for later: allow using OpenGL inside a uiWindow or uiArea typedef struct uiGLContext uiGLContext; _UI_EXTERN uiGLContext *uiGLNewContext(uiControl* c); +_UI_EXTERN void uiGLFreeContext(uiGLContext* ctx); _UI_EXTERN void uiGLMakeContextCurrent(uiGLContext* ctx); _UI_EXTERN void *uiGLGetProcAddress(const char* proc);