Problem running with libepoxy and MESA, whereas GLEW works fine

Title may be bit misleading, but I wasn’t sure how to phrase it properly.

I am trying to compile a game engine that uses libepoxy to load GL functions. The program compiles fine but crashes on init with error “Couldn’t find current GLX or EGL context.
First thing I did was to step through the code, and gdb stops and exits at first gl function it encounters (after the context has been created successfully with SDL) so that wasn’t much help.
Then I traced with apitrace and found the following:

Here’s the trace of both programs (code in red box is common to both programs):

1 : Program that crashes at glXSwapInterval using libepoxy:

2 : Program that runs fine using GLEW :

libepoxy seems to be calling MESA specific function whereas GLEW doesn’t do so during whole execution and works with bare glX* calls. How can I resolve this error?

My other personal GL projects that use GLEW compile and run just fine. I am running Archlinux with latest drivers/packages for intel HD4600 on i7 4th gen laptop CPU. I also have discrete nvidia card (GT750m) but I am not using that.

Please let me know if you need more of info/program traces.

Update : It seems there is a problem within libepoxy so I’ll try GLAD instead.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.