diff --git a/pl/rules.pl b/pl/rules.pl index 123c128..f55fce3 100644 --- a/pl/rules.pl +++ b/pl/rules.pl @@ -53,10 +53,6 @@ if (param_get("stb-truetype")) { add_cflags("-DUSE_STB_TRUETYPE"); } -if (param_get("opengl")) { - add_cflags("-DHAS_OPENGL"); -} - if (param_get("freetype2")) { add_cflags("-DUSE_FREETYPE2"); if ($cross) { diff --git a/src/backend/wayland.c b/src/backend/wayland.c index 62a8b41..3e4b9ee 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -1468,14 +1468,11 @@ static int MwLLPendingImpl(MwLL handle) { } static void MwLLNextEventImpl(MwLL handle) { - if(!handle->wayland.always_render) { - event_loop(handle); - if(handle->wayland.events_pending) { - handle->wayland.events_pending = 0; - } - if(handle->wayland.force_render) { - handle->wayland.force_render = 0; - } + if(handle->wayland.events_pending) { + handle->wayland.events_pending = 0; + } + if(handle->wayland.force_render) { + handle->wayland.force_render = 0; } } diff --git a/src/widget/opengl.c b/src/widget/opengl.c index e0ee8ac..8e90d39 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -1,7 +1,6 @@ #include #include -#ifdef HAS_OPENGL #ifdef USE_GDI typedef HGLRC(WINAPI* MWwglCreateContext)(HDC); typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC); @@ -320,80 +319,6 @@ static void* mwOpenGLGetProcAddressImpl(MwWidget handle, const char* name) { #endif return NULL; } -#else -#ifdef USE_GDI -typedef HGLRC(WINAPI* MWwglCreateContext)(HDC); -typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC); -typedef PROC(WINAPI* MWwglGetProcAddress)(LPCSTR); -typedef BOOL(WINAPI* MWwglDeleteContext)(HGLRC); - -typedef struct gdiopengl { - HDC dc; - HGLRC gl; - - void* lib; - - MWwglCreateContext wglCreateContext; - MWwglMakeCurrent wglMakeCurrent; - MWwglDeleteContext wglDeleteContext; - MWwglGetProcAddress wglGetProcAddress; -} gdiopengl_t; -#endif -#ifdef USE_X11 -typedef XVisualInfo* (*MWglXChooseVisual)(Display* dpy, int screen, int* attribList); -typedef GLXContext (*MWglXCreateContext)(Display* dpy, XVisualInfo* vis, GLXContext shareList, Bool direct); -typedef void (*MWglXDestroyContext)(Display* dpy, GLXContext ctx); -typedef Bool (*MWglXMakeCurrent)(Display* dpy, GLXDrawable drawable, GLXContext ctx); -typedef void (*MWglXSwapBuffers)(Display* dpy, GLXDrawable drawable); -typedef void* (*MWglXGetProcAddress)(const GLubyte* procname); - -typedef struct x11opengl { - XVisualInfo* visual; - GLXContext gl; - - void* lib; - - MWglXChooseVisual glXChooseVisual; - MWglXCreateContext glXCreateContext; - MWglXDestroyContext glXDestroyContext; - MWglXMakeCurrent glXMakeCurrent; - MWglXSwapBuffers glXSwapBuffers; - MWglXGetProcAddress glXGetProcAddress; -} x11opengl_t; -#endif - -#ifdef USE_WAYLAND -#include -#include - -typedef struct waylandopengl { - struct wl_egl_window* egl_window_native; - EGLDisplay egl_display; - EGLContext egl_context; - EGLSurface egl_surface; - EGLConfig egl_config; -} waylandopengl_t; - -#endif - -static int create(MwWidget handle) { - printf("Milsko compiled without OpenGL support! OpenGL widgets will not work properly.\n"); - return 1; -} - -static void destroy(MwWidget handle) { -} - -static void mwOpenGLMakeCurrentImpl(MwWidget handle) { -} - -static void mwOpenGLSwapBufferImpl(MwWidget handle) { -} - -static void* mwOpenGLGetProcAddressImpl(MwWidget handle, const char* name) { - return NULL; -} -#endif static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { if(strcmp(name, "mwOpenGLMakeCurrent") == 0) {