Epoxy is a library for handling OpenGL function pointer management for you

Related tags

Game libepoxy
Overview

Ubuntu macOS MSVC Build MSYS2 Build License: MIT

Epoxy is a library for handling OpenGL function pointer management for you.

It hides the complexity of dlopen(), dlsym(), glXGetProcAddress(), eglGetProcAddress(), etc. from the app developer, with very little knowledge needed on their part. They get to read GL specs and write code using undecorated function names like glCompileShader().

Don't forget to check for your extensions or versions being present before you use them, just like before! We'll tell you what you forgot to check for instead of just segfaulting, though.

Features

  • Automatically initializes as new GL functions are used.
  • GL 4.6 core and compatibility context support.
  • GLES 1/2/3 context support.
  • Knows about function aliases so (e.g.) glBufferData() can be used with GL_ARB_vertex_buffer_object implementations, along with GL 1.5+ implementations.
  • EGL, GLX, and WGL support.
  • Can be mixed with non-epoxy GL usage.

Building

mkdir _build && cd _build
meson
ninja
sudo ninja install

Dependencies for Debian:

  • meson
  • libegl1-mesa-dev

Dependencies for macOS (using MacPorts):

  • pkgconfig
  • meson

The test suite has additional dependencies depending on the platform. (X11, EGL, a running X Server).

Switching your code to using epoxy

It should be as easy as replacing:

#include <GL/gl.h>
#include <GL/glx.h>
#include <GL/glext.h>

with:

#include <epoxy/gl.h>
#include <epoxy/glx.h>

As long as epoxy's headers appear first, you should be ready to go. Additionally, some new helpers become available, so you don't have to write them:

int epoxy_gl_version() returns the GL version:

  • 12 for GL 1.2
  • 20 for GL 2.0
  • 44 for GL 4.4

bool epoxy_has_gl_extension() returns whether a GL extension is available (GL_ARB_texture_buffer_object, for example).

Note that this is not terribly fast, so keep it out of your hot paths, ok?

Why not use libGLEW?

GLEW has several issues:

  • Doesn't know about aliases of functions (There are 5 providers of glPointParameterfv(), for example, and you don't want to have to choose which one to call when they're all the same).
  • Doesn't support OpenGL ES.
  • Has a hard-to-maintain parser of extension specification text instead of using the old .spec file or the new .xml.
  • Has significant startup time overhead when glewInit() autodetects the world.
  • User-visible multithreading support choice for win32.

The motivation for this project came out of previous use of libGLEW in piglit. Other GL dispatch code generation projects had similar failures. Ideally, piglit wants to be able to build a single binary for a test that can run on whatever context or window system it chooses, not based on link time choices.

We had to solve some of GLEW's problems for piglit and solving them meant replacing every single piece of GLEW, so we built piglit-dispatch from scratch. And since we wanted to reuse it in other GL-related projects, this is the result.

Known issues when running on Windows

The automatic per-context symbol resolution for win32 requires that epoxy knows when wglMakeCurrent() is called, because wglGetProcAddress() returns values depend on the context's device and pixel format. If wglMakeCurrent() is called from outside of epoxy (in a way that might change the device or pixel format), then epoxy needs to be notified of the change using the epoxy_handle_external_wglMakeCurrent() function.

The win32 wglMakeCurrent() variants are slower than they should be, because they should be caching the resolved dispatch tables instead of resetting an entire thread-local dispatch table every time.

Comments
  • Upgrading libepoxy from 1.5.5 to 1.5.7 results in Xorg crashing on boot

    Upgrading libepoxy from 1.5.5 to 1.5.7 results in Xorg crashing on boot

    Hello,

    Basic info:

    • OS: Manjaro Linux KDE
    • Kernel: 5.11.18-1-MANJARO
    • GPU: Radeon R9 380 with AMDGPU drivers

    I encountered this issue after an recent Manjaro update which amongst other things updated the libepoxy version from 1.5.5 to 1.5.7 which (as I later found) was the package causing my Xorg to crash on boot. Using the git bisect I managed to find the problematic commit, which is: dbfa4b2

    This is the Xorg log after it crashed:

    [  5840.928] (WW) Failed to open protocol names file lib/xorg/protocol.txt
    [  5840.929] 
    X.Org X Server 1.20.11
    ... a lot more stuff (I can post if needed)
    [  5841.290] (II) Initializing extension XFree86-DRI
    [  5841.290] (II) Initializing extension DRI2
    [  5841.291] (II) AMDGPU(0): Setting screen physical size to 1377 x 285
    [  5841.311] (EE) 
    [  5841.311] (EE) Backtrace:
    [  5841.311] (EE) 0: /usr/lib/Xorg (xorg_backtrace+0x53) [0x55f225222fd3]
    [  5841.311] (EE) 1: /usr/lib/Xorg (0x55f2250dc000+0x151df5) [0x55f22522ddf5]
    [  5841.311] (EE) 2: /usr/lib/libc.so.6 (0x7f2164329000+0x3cf80) [0x7f2164365f80]
    [  5841.311] (EE) 3: /usr/lib/libc.so.6 (gsignal+0x145) [0x7f2164365ef5]
    [  5841.311] (EE) 4: /usr/lib/libc.so.6 (abort+0x116) [0x7f216434f862]
    [  5841.311] (EE) 5: /usr/lib/libc.so.6 (0x7f2164329000+0x26747) [0x7f216434f747]
    [  5841.311] (EE) 6: /usr/lib/libc.so.6 (0x7f2164329000+0x35646) [0x7f216435e646]
    [  5841.311] (EE) 7: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (0x7f216485f000+0x8fd3) [0x7f2164867fd3]
    [  5841.311] (EE) 8: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (0x7f216485f000+0x933a) [0x7f216486833a]
    [  5841.311] (EE) 9: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (0x7f216485f000+0x1534d) [0x7f216487434d]
    [  5841.311] (EE) 10: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (0x7f216485f000+0x1746a) [0x7f216487646a]
    [  5841.311] (EE) 11: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (0x7f216485f000+0x19127) [0x7f2164878127]
    [  5841.311] (EE) 12: /usr/lib/Xorg (MapWindow+0x251) [0x55f22517f871]
    [  5841.311] (EE) 13: /usr/lib/Xorg (0x55f2250dc000+0x39619) [0x55f225115619]
    [  5841.311] (EE) 14: /usr/lib/libc.so.6 (__libc_start_main+0xd5) [0x7f2164350b25]
    [  5841.311] (EE) 15: /usr/lib/Xorg (_start+0x2e) [0x55f2251165de]
    [  5841.311] (EE) 
    [  5841.311] (EE) 
    Fatal server error:
    [  5841.311] (EE) Caught signal 6 (Aborted). Server aborting
    [  5841.311] (EE) 
    [  5841.311] (EE) 
    Please consult the The X.Org Foundation support 
             at http://wiki.x.org
     for help. 
    [  5841.311] (EE) Please also check the log file at "/home/my_username/.local/share/xorg/Xorg.1.log" for additional information.
    [  5841.311] (EE) 
    [  5841.327] (EE) Server terminated with error (1). Closing log file.
    

    Link to the Manjaro forum discussing the issue: https://forum.manjaro.org/t/upgrading-libepoxy-from-1-5-5-to-1-5-7-results-in-xorg-crashing-on-boot/66195

    opened by Ernest1338 29
  • meson: add library versioning?

    meson: add library versioning?

    Hi,

    I maintain the libepoxy formula in Homebrew. After yesterday's release I decided to give the new meson build system a try, but noticed that the produced dylib is not versioned. This is a bit of a problem, as it breaks our gtk+3 binaries, and all packages that depend on it.

    The configure script based install produces:

    /usr/local/Cellar/libepoxy/1.4.1/lib/libepoxy.0.dylib
    /usr/local/Cellar/libepoxy/1.4.1/lib/libepoxy.dylib
    

    with libepoxy.dylib being a symlink to libepoxy.0.dylib

    and with the meson installation:

    /usr/local/Cellar/libepoxy/1.4.1/lib/libepoxy.dylib
    

    Since the meson docs mention support for versioned libraries, I wondered if it would be useful to use this feature? To me it makes sense that both installation types produce the exact same files.

    Best,

    Tom

    macos build 
    opened by tschoonj 29
  • libepoxy crash with AMDGPU-PRO

    libepoxy crash with AMDGPU-PRO

    Hello, I cherry-picked commit 8d58c890646fc1f43bcab702bb9ed6bae94daefe and this caused unbootability of some old proprietary AMD drivers

    Can you please enlighten me? Seems that 1.3.1 with that commit is a no-go, but I'm not sure how this can be solved, and if the revert is doable for you

    question linux amd binary driver 
    opened by LocutusOfBorg 28
  • Allow libopengl.so to be used when GLX_LIB is missing

    Allow libopengl.so to be used when GLX_LIB is missing

    This maintains compatibility with previous behavior of always using GLX_LIB if it is found. The only change is when there is no GLX_LIB.

    Previous behavior when no GLX_LIB:

    • abort.

    New behavior when no GLX_LIB:

    • Try to load libOpenGL.so as gl_handle (glx_handle remains NULL).
    • Else, abort.
    opened by batesj 20
  • 1.5.0 breaks KWin

    1.5.0 breaks KWin

    Updating libepoxy from 1.4.3 to 1.5.0 breaks KWin compositing. OGL 2 nor OGL 3.1 does work. More info can be found here: https://bugs.kde.org/show_bug.cgi?id=391486 and https://bbs.archlinux.org/viewtopic.php?id=235021.

    Is this a regression or intentional change? It has been suggested to report upstream, which is here.

    glx nvidia binary driver 
    opened by jonnyrobbie 20
  • Appveyor - Windows autobuilds

    Appveyor - Windows autobuilds

    I created an appveyor yml file for autobuilding libepoxy on Windows and uploading the install artifacts (include, lib, bin) as a zip file to the GitHub releases. Currently the script turns EGL support off. The appveyor yml file would have to be edited to upload to the main repo's GitHub page rather than mine (simply replace 'auth_token', with an encoded GitHub API token for appveyor.

    enhancement 
    opened by tmarrinan 19
  • Fix some bugs in loading OpenGL/GLX/EGL libraries

    Fix some bugs in loading OpenGL/GLX/EGL libraries

    Without additional check, even if libOpenGL was loaded, libGL.so will be loaded as well, and used both in gl_handle and glx_handle, so libglvnd libraries will not be used.

    The problem is that on Wayland-only system, there will be no libGL, so epoxy_load_gl will fail even if libOpenGL was loaded.

    opened by ya-isakov 18
  • "Couldn't find current GLX or EGL context.\n" exits GNOME Games

    When running a game in GNOME Games in some ancient machine, the application quits with this message on stderr: "Couldn't find current GLX or EGL context.". The machine still has a powerful enough GPU (i915 driver) to run gnome-shell and power totem's clutter-gtk video display.

    The error message was found in epoxy_get_proc_address().

    I would like Games (which uses GtkGLArea) to be able to recover from this error by using a software rendering method, which implies for libepoxy to transmit its errors.

    bug linux 
    opened by Kekun 18
  • Meson build - Windows

    Meson build - Windows

    Hello. I am having an issue building with Meson on Windows.

    First, when I install Python 3.6 for windows, the executable is python.exe (not python3.exe). When I run meson.py .. . --backend=vs2015 I get an error saying Program python3 found: NO.

    I created a symlink from python.exe to python3.exe. This resolved that issue and successfully creates a MSVC solution. However, when building, it has several errors along the lines of:

    "C:/Python36/python3.EXE" "python" "C:/projects/libepoxy/src/gen_dispatch.py" <...>
    C:/Python36/python3.EXE: can't open file 'python': [Errno 2] No such file or directory
    

    It appears as though the gen_dispatch.py is set to be called from python twice, which is what causes the error.

    windows build 
    opened by tmarrinan 18
  • libepoxy tries to use GLX on Wayland when running in apitrace with libGL

    libepoxy tries to use GLX on Wayland when running in apitrace with libGL

    apitrace prints the following message:

    glXGetCurrentContext() not found in libGL.so.1: /usr/bin/../lib/apitrace/wrappers/egltrace.so: undefined symbol: glXGetCurrentContext
    

    Here is the backtrace from where libepoxy calls exit():

    Breakpoint 1, 0x00007ffff6faccd0 in _exit () from /usr/lib/libc.so.6
    (gdb) bt
    #0  0x00007ffff6faccd0 in _exit () from /usr/lib/libc.so.6
    #1  0x00007ffff6f29f3b in __run_exit_handlers () from /usr/lib/libc.so.6
    #2  0x00007ffff6f29fd5 in exit () from /usr/lib/libc.so.6
    #3  0x00007ffff72f051a in do_dlsym (handle=<optimized out>, lib_name=0x7ffff7344b20 "libGL.so.1", name=0x7ffff7362b77 <entrypoint_strings+1143> "glXGetCurrentContext", exit_on_fail=<optimized out>)
        at dispatch_common.c:262
    #4  0x00007ffff73413c6 in glx_provider_resolver (entrypoints=0x7fffffffda2c, providers=0x7fffffffda30, name=0x7ffff7362b77 <entrypoint_strings+1143> "glXGetCurrentContext") at glx_generated_dispatch.c:562
    #5  glx_single_resolver (provider=provider@entry=GLX_10, entrypoint_offset=entrypoint_offset@entry=1143) at glx_generated_dispatch.c:590
    #6  0x00007ffff7342c26 in epoxy_glXGetCurrentContext_resolver () at glx_generated_dispatch.c:903
    #7  epoxy_glXGetCurrentContext_global_rewrite_ptr () at glx_generated_dispatch.c:1425
    #8  0x00007ffff72f0553 in epoxy_current_context_is_glx () at dispatch_common.c:412
    #9  0x00007ffff72f060d in epoxy_is_desktop_gl () at dispatch_common.c:282
    #10 0x00007ffff72f6635 in gl_provider_resolver (name=0x7ffff7354ad8 <entrypoint_strings+16120> "glGenTextures", providers=0x7ffff734ef78 <providers>, entrypoints=0x7ffff734ef72 <entrypoints>)
        at gl_generated_dispatch.c:7319
    #11 0x00007ffff73240b9 in epoxy_glGenTextures_resolver () at gl_generated_dispatch.c:18408
    #12 epoxy_glGenTextures_global_rewrite_ptr (n=1, textures=0x7fffffffdb54) at gl_generated_dispatch.c:46117
    #13 0x00000000004009c0 in main ()
    

    I originally thought this was an apitrace bug, see https://github.com/apitrace/apitrace/issues/380

    opened by linkmauve 17
  • macOS epoxy_has_gl_extension() only working with legacy OpenGL

    macOS epoxy_has_gl_extension() only working with legacy OpenGL

    I've been playing with trying to understand why VICE Gtk3 performs so bad on macOS vs linux and Windows.

    I discovered that VICE works great if Gdk doesn't ask for OpenGL 3.2 or 4.1, and gets the legacy renderer instead. Host CPU performance goes from about 75% to 45%.

    When running with gl 2.1, epoxy_has_gl_extension() reports support for GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle and GL_EXT_framebuffer_blit. When running with gl 3.2 or 4.1, epoxy_has_gl_extension() does not detect support for these extensions.

    I found that if I force the detection result for these extensions in Gdk, VICE performance is also great with the 3.2 and 4.1 renderers. So I assume there must be something wrong with epoxy_has_gl_extension() in this case. In fact, I just have to force detection of GL_EXT_framebuffer_blit to get the result i'm looking for

    I intend to try to understand and fix this, but I thought i'd open an issue to track it.

    opened by dqh-au 15
  • undefined glXGetCurrentContext on EGL tracing

    undefined glXGetCurrentContext on EGL tracing

    How I understand the situation is following:

    1. GTK wants to render context.
    2. libepoxy starts query for symbol glXGetCurrentContext
    3. because the GL library points to EGL, the symbol is missing
    4. apitrace crashes due to the GTK app (epoxy) cannot find the symbol

    A possible solution would be a variable to disable GLX or EGL at runtime.

    Additional idea: Change order to prefer EGL in epoxy (which makes sense because EGL is more widespread these days).

    $ apitrace trace -a egl gtk4-demo
    apitrace: loaded into /usr/bin/apitrace
    apitrace: unloaded from /usr/bin/apitrace
    apitrace: loaded into /usr/bin/gtk4-demo
    ** Message: 02:06:00.252: For syntax highlighting, install the “highlight” program
    apitrace: redirecting dlopen("libEGL.so.1", 0x1) from /lib/x86_64-linux-gnu/libepoxy.so.0
    apitrace: tracing to /home/projects/collabora/mesa/gtk4-demo.trace
    apitrace: warning: eglChooseConfig: unknown key 0x3339, interpreting value as int
    apitrace: warning: eglChooseConfig: unknown key 0x3339, interpreting value as int
    apitrace: redirecting dlopen("libGL.so.1", 0x1) from /lib/x86_64-linux-gnu/libepoxy.so.0
    apitrace: attempting to read configuration file: /home/okias/.config/apitrace/gltrace.conf
    apitrace: using configuration file: /home/okias/.config/apitrace/gltrace.conf
    apitrace: config GL_VENDOR = 
    apitrace: config GL_VERSION = 4.5
    apitrace: config GL_EXTENSIONS = 
    apitrace: config GL_NUM_EXTENSIONS = 0
    apitrace: config GL_RENDERER = 
    apitrace: config GL_SHADING_LANGUAGE_VERSION = 4.50
    apitrace: config GL_MAX_TEXTURE_SIZE = 0
    apitrace: config GL_MAJOR_VERSION = 4
    apitrace: config GL_MINOR_VERSION = 5
    apitrace: config GL_CONTEXT_PROFILE_MASK = 0x0
    apitrace: config GL_CONTEXT_PROFILE_MASK = 0x0
    apitrace: config GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 32
    apitrace: config GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 16
    apitrace: config GL_STORAGE_BUFFER_OFFSET_ALIGNMENT = 4
    glXGetCurrentContext() not found: /usr/bin/../lib/x86_64-linux-gnu/apitrace/wrappers/egltrace.so: undefined symbol: glXGetCurrentContext
    apitrace: warning: caught signal 6
    apitrace: flushing trace
    /usr/bin/../lib/x86_64-linux-gnu/apitrace/wrappers/egltrace.so+0x226300
    /lib/x86_64-linux-gnu/libc.so.6+0x3bf8f: ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
    /lib/x86_64-linux-gnu/libc.so.6: __pthread_kill_implementation+0x8accc: ./nptl/pthread_kill.c:44
    /lib/x86_64-linux-gnu/libc.so.6: __GI_raise+0x11: ../sysdeps/posix/raise.c:26
    /lib/x86_64-linux-gnu/libc.so.6: __GI_abort+0xd2: ./stdlib/abort.c:79
    /lib/x86_64-linux-gnu/libepoxy.so.0: do_dlsym+0xc0fb0: ../src/dispatch_common.c:343
    /lib/x86_64-linux-gnu/libepoxy.so.0: epoxy_glXGetCurrentContext_resolver+0xbecee: src/glx_generated_dispatch.c:3736
    /lib/x86_64-linux-gnu/libepoxy.so.0: epoxy_glXGetCurrentContext_global_rewrite_ptr+0xbecee: src/glx_generated_dispatch.c:4270
    /lib/x86_64-linux-gnu/libepoxy.so.0: epoxy_get_bootstrap_proc_address+0xc185d: ../src/dispatch_common.c:813
    /lib/x86_64-linux-gnu/libepoxy.so.0: gl_single_resolver+0x64332: src/gl_generated_dispatch.c:75810
    /lib/x86_64-linux-gnu/libepoxy.so.0: epoxy_glGetIntegerv_resolver+0x70ffe: src/gl_generated_dispatch.c:87733
    /lib/x86_64-linux-gnu/libepoxy.so.0: epoxy_glGetIntegerv_global_rewrite_ptr+0x70ffe: src/gl_generated_dispatch.c:115489
    /lib/x86_64-linux-gnu/libepoxy.so.0: epoxy_internal_has_gl_extension+0xc128a: ../src/dispatch_common.c:530
    /lib/x86_64-linux-gnu/libepoxy.so.0: epoxy_internal_has_gl_extension+0xc128a: ../src/dispatch_common.c:519
    /lib/x86_64-linux-gnu/libgtk-4.so.1: gdk_gl_context_make_current+0x21a
    /lib/x86_64-linux-gnu/libgtk-4.so.1+0x4b7a23
    /lib/x86_64-linux-gnu/libgtk-4.so.1+0x4ac48f
    /lib/x86_64-linux-gnu/libgtk-4.so.1: gsk_renderer_realize+0x11d
    /lib/x86_64-linux-gnu/libgtk-4.so.1: gsk_renderer_new_for_surface+0x9c
    /lib/x86_64-linux-gnu/libgtk-4.so.1+0x31e6b7
    /lib/x86_64-linux-gnu/libgtk-4.so.1+0xd3680
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_closure_invoke+0x15f
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x28d2c
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_signal_emit_valist+0xf34
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_signal_emit+0x8e
    /lib/x86_64-linux-gnu/libgtk-4.so.1: gtk_widget_realize+0x6f
    /lib/x86_64-linux-gnu/libgtk-4.so.1+0x323851
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x165a8
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_signal_emit_valist+0xefe
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_signal_emit+0x8e
    /lib/x86_64-linux-gnu/libgtk-4.so.1: gtk_widget_show+0xa0
    /lib/x86_64-linux-gnu/libgtk-4.so.1: gtk_window_present_with_time+0xb4
    gtk4-demo+0x6cf77
    /lib/x86_64-linux-gnu/libgio-2.0.so.0+0x81b66
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_closure_invoke+0x15f
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x29075
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_signal_emit_valist+0x76c
    /lib/x86_64-linux-gnu/libgobject-2.0.so.0: g_signal_emit+0x8e
    /lib/x86_64-linux-gnu/libgio-2.0.so.0+0xdafd2
    /lib/x86_64-linux-gnu/libgio-2.0.so.0+0xdd309
    /lib/x86_64-linux-gnu/libgio-2.0.so.0: g_application_run+0x145
    gtk4-demo: main+0x204
    /lib/x86_64-linux-gnu/libc.so.6: __libc_start_call_main+0x27189: ../sysdeps/nptl/libc_start_call_main.h:58
    /lib/x86_64-linux-gnu/libc.so.6: __libc_start_main_impl+0x84: ../csu/libc-start.c:381
    gtk4-demo: _start+0x20
    ?
    apitrace: info: taking default action for signal 6
    
    opened by okias 0
  • How better to implement strndup for MacOS versions that do not have it? (needed for EGL)

    How better to implement strndup for MacOS versions that do not have it? (needed for EGL)

    Two source file related to EGL use strndup which is missing on MacOS X < 10.7 – egl_has_extension_nocontext.c and egl_epoxy_api.c.

    In Macports we can use legacysupport PortGroup, which provides needed definition: https://github.com/macports/macports-legacy-support/blob/master/include/string.h

    I guess it can be borrowed and included either directly in those 2 files or in a header common to them. Condition can be something like:

    #ifdef __APPLE__
    #include <AvailabilityMacros.h>
    
    #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
    [put definition here]
    #endif
    #endif
    
    opened by barracuda156 0
  • Build failure on dispatch_egl: error: unknown type name 'EGLDisplay'

    Build failure on dispatch_egl: error: unknown type name 'EGLDisplay'

    Compilation fails with Egl option enabled on 10.6.8:

    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c: In function 'epoxy_conservative_egl_version':
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:33:5: error: unknown type name 'EGLDisplay'; did you mean 'Display'?
       33 |     EGLDisplay dpy = eglGetCurrentDisplay();
          |     ^~~~~~~~~~
          |     Display
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:33:22: error: implicit declaration of function 'eglGetCurrentDisplay'; did you mean 'glXGetCurrentDisplay'? [-Werror=implicit-function-declaration]
       33 |     EGLDisplay dpy = eglGetCurrentDisplay();
          |                      ^~~~~~~~~~~~~~~~~~~~
          |                      glXGetCurrentDisplay
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:33:22: warning: nested extern declaration of 'eglGetCurrentDisplay' [-Wnested-externs]
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:38:12: error: implicit declaration of function 'epoxy_egl_version'; did you mean 'epoxy_gl_version'? [-Werror=implicit-function-declaration]
       38 |     return epoxy_egl_version(dpy);
          |            ^~~~~~~~~~~~~~~~~
          |            epoxy_gl_version
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:38:12: warning: nested extern declaration of 'epoxy_egl_version' [-Wnested-externs]
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c: At top level:
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:61:19: error: unknown type name 'EGLDisplay'; did you mean 'Display'?
       61 | epoxy_egl_version(EGLDisplay dpy)
          |                   ^~~~~~~~~~
          |                   Display
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c: In function 'epoxy_conservative_has_egl_extension':
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:79:12: error: implicit declaration of function 'epoxy_has_egl_extension'; did you mean 'epoxy_has_gl_extension'? [-Werror=implicit-function-declaration]
       79 |     return epoxy_has_egl_extension(eglGetCurrentDisplay(), ext);
          |            ^~~~~~~~~~~~~~~~~~~~~~~
          |            epoxy_has_gl_extension
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:79:12: warning: nested extern declaration of 'epoxy_has_egl_extension' [-Wnested-externs]
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c: At top level:
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:94:25: error: unknown type name 'EGLDisplay'; did you mean 'Display'?
       94 | epoxy_has_egl_extension(EGLDisplay dpy, const char *ext)
          |                         ^~~~~~~~~~
          |                         Display
    ../anholt-libepoxy-70a20c6/src/dispatch_egl.c:107:1: warning: no previous prototype for 'epoxy_has_egl' [-Wmissing-prototypes]
      107 | epoxy_has_egl(void)
          | ^~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    

    P. S. mesa @19.0.8_1+osmesa+python27 (with Egl support enabled), gcc12 @12.2.0.

    opened by barracuda156 3
  • glPushDebugGroupKHR jumping at the wrong offset into the dispatch table

    glPushDebugGroupKHR jumping at the wrong offset into the dispatch table

    Epoxy reports that the GL_KHR_debug extension is supported, but when calling glPushDebugGroupKHR it actually jumps at the dispatch entry for glProgramUniformMatrix2x4fvEXT, which happens to ba unavailable on my system, and then the application crashes.

    769         glPushDebugGroupKHR (GL_DEBUG_SOURCE_APPLICATION, 0, -1, message);
    (gdb) s
    epoxy_glPushDebugGroupKHR_dispatch_table_thunk (source=33354, id=0, length=-1, message=0x7ffdc2e189cb <__func__.0+1915> "Building command queue") at src/gl_generated_dispatch.c:51142
    51142      0, // glProgramUniformMatrix2x4fvEXT
    (gdb) n
    Thread 1 received signal SIGSEGV, Segmentation fault.
    0x0000000000000000 in ?? ()
    (gdb)
    

    See https://gitlab.gnome.org/GNOME/gtk/-/issues/5128

    • AMD driver
    • Windows 10 21H2
    • MSYS2
    opened by lb90 3
  • missing WGL_ARB_extensions_string

    missing WGL_ARB_extensions_string

    I am getting

    Implementation unexpectedly missing WGL_ARB_extensions_string.  Probably a libepoxy bug.
    

    from https://github.com/anholt/libepoxy/blob/1.5.10/src/dispatch_wgl.c#L54-L60.

    Apparently, wglGetProcAddress("wglGetExtensionsStringARB") returns NULL. Any idea what might be wrong?

    opened by christianrauch 0
Releases(1.5.10)
Owner
Eric Anholt
Eric Anholt
A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor.

A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor.

Samuel Rasquinha 59 Jan 3, 2023
A simple 2d snake game made using opengl in c++

opengl-snakegame A simple 2d snake game made using opengl in c++ Demo Keyboard Controls P - To resume/start or pause the game R - To restart the game

Dhruv Sawarkar 3 Dec 1, 2022
A minecraft clone built in c++ opengl for the purpose of prefecting graphics programming skills.

LearnOpenGL - CLion This is a project template for OpenGL development with JetBrains CLion IDE. It was created mainly for LearnOpenGL tutorials. Inclu

Jeremy Dellock 1 Dec 28, 2021
FPS Game built from scratch using C++ and Legacy OpenGL.

A small game made by a couple of students as a university project. Built from scratch using C++ and Legacy OpenGL, hence the name.

Yaman Qassas 55 Dec 11, 2022
Game Engine that is being developed by a computer science student using C and OpenGL

Project LOGLE Contents About the Project Project Status Known Issues Setup ?? About Game Engine that is being developed by a computer science student

Ewan 1 Jan 21, 2022
An OpenGL 4.3 / C++ 11 rendering engine oriented towards animation

aer-engine About An OpenGL 4.3 / C++ 11 rendering engine oriented towards animation. Features: Custom animation model format, SKMA, with a Blender exp

Thibault Coppex 29 Nov 22, 2022
GlslViewer is a flexible console-base OpenGL Sandbox to display 2D/3D GLSL shaders without the need of an UI

GlslViewer is a flexible console-base OpenGL Sandbox to display 2D/3D GLSL shaders without the need of an UI

Patricio Gonzalez Vivo 3.8k Dec 26, 2022
A foobar2000 component which allows you to load and play ncm files directly.

Play NCM files directly with our favourite How to setup and build project Download foobar2000 SDK and extract into vendor/sdk Download WTL from source

null 37 Nov 25, 2022
A faster drop-in replacement for giflib. It uses more RAM, but you get more speed.

GIFLIB-Turbo What is it? A faster drop-in replacement for GIFLIB Why did you write it? Starting in the late 80's, I was fascinated with computer graph

Larry Bank 27 Jun 9, 2022
SampPy is a plugin for SA:MP that allows you to create gamemodes from Python

SampPy is a plugin for SA:MP that allows you to create gamemodes from Python. A fork of PySAMP, which has been abandoned for quite some time.

Yahir Vlatko Kozel 16 Jul 31, 2021
Guess a random number between your selected range within the chances you select to win the game!

Number-Guessing-Game Guess a random number between your selected range within the chances you select to win the game! This project was developed by Sa

Sampreet Roy 4 May 13, 2022
In this repository you'll find the fully reversed source code for GTA III (master branch) and GTA VC (miami branch).

Intro In this repository you'll find the fully reversed source code for GTA III (master branch) and GTA VC (miami branch). It has been tested and work

Zero 1 Nov 11, 2021
A Game Boy game that rewards you for playing it on several console models!

GB Corp. A Game Boy game for the Game Boy Competition 2021 by Dr. Ludos (2021) This is the source code, you can get a precompiled rom from here: https

Dr. Ludos 10 Sep 25, 2022
A fun game where you don't press the red ball!

DarkBall DarkBall is a fun to play game where you can press little balls/button, but never press the red ball(or any of its friends) You can find/play

Catermelon 3 Jun 25, 2022
Do you have what it takes? - 2-bit Dungeon Escape game implemented on the Arduino Platform

This game was created as part of the Introduction to Robotics course I took during my 3rd year of studying Computer Science @ University of Bucharest,

Nicoleta Ciausu 6 Feb 28, 2022
Unreal Engine 4 vulnerability, that allows you to run shellcode directly into the target game process.

Unreal Engine 4 vulnerability, that allows you to run shellcode directly into the target game process, to load any DLL undetected from most game anti cheats, such as Easy Anti Cheat, BattleEye, Ricochet, Vanguard, ATG, and more.

Zebratic 49 Jan 4, 2023
The wordle game, but when you want to use sudo!

pam_wordle OS arch Build Status Ubuntu 20.04 x86_64 They say "practice makes perfect", and that is perhaps true. So, let's practice more on the game,

Cocoa 7 Sep 12, 2022
This project is a small 2D game with minilibx. You'll learn about textures, sprites and tiles.

(੭。╹▿╹。)੭ so_long This project is a small 2D game with minilibx. You'll learn about textures, sprites and tiles. Preview How play the game To play thi

ChloeKim 10 Aug 16, 2022
This tool allow you to create / load / edit models used for create a cinematic in game for World of Warcraft 3.3.5 version

CameraCinematic - Discord Introduction This tool allow you to create / load / edit models used for create a cinematic in game for World of Warcraft 3.

Intemporel 9 Mar 14, 2022