tb/Demo/platform/glfw_extra_linux.cpp
Michael Tesch c23159df2b
Hb cmake2 (#11)
* remove TBSystem::GetRoot.  fix glew header

* make runtime debug info an indepedent setting

* windows build on travis

* fix IOS and macos high-dpi

* fix win+sdl2 combo

* try to auto detect what can be make-all'd
2019-11-14 16:59:54 +01:00

59 lines
1.1 KiB
C++

#include "tb_system.h"
#if defined(TB_SYSTEM_LINUX) || defined(TB_SYSTEM_MACOSX)
#include "glfw_extra.h"
#include "tb_msg.h"
#include <stdio.h>
//#include <X11/Xlib.h>
//#define GLX_GLXEXT_LEGACY
//#include <GL/glx.h>
//#define GLFW_EXPOSE_NATIVE_X11_GLX
//#include "GLFW/glfw3native.h"
//#include "GLFW/glfw3.h"
// ## NOTE ############################################
// FIX: Implement message loop and timer on linux!
// For now, just poll using glfwPollEvents and
// always call timer callback, so we keep spinning
// and can at least run our code.
GLFWtimerfun timerCallback;
void glfwWakeUpMsgLoop(GLFWwindow *window)
{
}
void glfwWaitMsgLoop(GLFWwindow *window)
{
glfwPollEvents();
if (timerCallback)
timerCallback();
}
void glfwPollMsgLoop(GLFWwindow *window)
{
glfwPollEvents();
if (timerCallback)
timerCallback();
}
void glfwRescheduleTimer(unsigned int delay_ms)
{
}
void glfwKillTimer()
{
}
void glfwSetTimerCallback(GLFWtimerfun cbfun)
{
timerCallback = cbfun;
}
#endif // defined(TB_SYSTEM_LINUX) || defined(TB_SYSTEM_MACOSX)