mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Bindings: Improved FreeGLUT support for MinGW (#3004)
This commit is contained in:
parent
f6da5000bf
commit
b887259974
@ -41,7 +41,13 @@ endif
|
|||||||
|
|
||||||
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
||||||
ECHO_MESSAGE = "MinGW"
|
ECHO_MESSAGE = "MinGW"
|
||||||
LIBS += -lgdi32 -lopengl32 -limm32 -lglut
|
LIBS += -lgdi32 -lopengl32 -limm32
|
||||||
|
ifeq ($(shell pkg-config freeglut --exists 2> /dev/null && echo yes || echo no),yes)
|
||||||
|
CXXFLAGS += $(shell pkg-config freeglut --cflags)
|
||||||
|
LIBS += $(shell pkg-config freeglut --libs)
|
||||||
|
else
|
||||||
|
LIBS += -lglut
|
||||||
|
endif
|
||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
// !!! Nowadays, prefer using GLFW or SDL instead!
|
// !!! Nowadays, prefer using GLFW or SDL instead!
|
||||||
|
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "../imgui_impl_glut.h"
|
#include "imgui_impl_glut.h"
|
||||||
#include "../imgui_impl_opengl2.h"
|
#include "imgui_impl_opengl2.h"
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <GLUT/glut.h>
|
#include <GLUT/glut.h>
|
||||||
#else
|
#else
|
||||||
|
@ -39,7 +39,12 @@ static int g_Time = 0; // Current time, in milliseconds
|
|||||||
bool ImGui_ImplGLUT_Init()
|
bool ImGui_ImplGLUT_Init()
|
||||||
{
|
{
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
|
||||||
|
#ifdef FREEGLUT
|
||||||
|
io.BackendPlatformName ="imgui_impl_glut (freeglut)";
|
||||||
|
#else
|
||||||
io.BackendPlatformName ="imgui_impl_glut";
|
io.BackendPlatformName ="imgui_impl_glut";
|
||||||
|
#endif
|
||||||
|
|
||||||
g_Time = 0;
|
g_Time = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user