{"action":"created","issue":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/307","labels_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/307/comments","events_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/307/events","html_url":"https://github.com/bkaradzic/bgfx/issues/307","id":64070058,"number":307,"title":"\"BadMatch\" error when using with glfw3 under Linux","user":{"login":"Rouslan","id":266116,"avatar_url":"https://avatars.githubusercontent.com/u/266116?v=3","gravatar_id":"","url":"https://api.github.com/users/Rouslan","html_url":"https://github.com/Rouslan","followers_url":"https://api.github.com/users/Rouslan/followers","following_url":"https://api.github.com/users/Rouslan/following{/other_user}","gists_url":"https://api.github.com/users/Rouslan/gists{/gist_id}","starred_url":"https://api.github.com/users/Rouslan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rouslan/subscriptions","organizations_url":"https://api.github.com/users/Rouslan/orgs","repos_url":"https://api.github.com/users/Rouslan/repos","events_url":"https://api.github.com/users/Rouslan/events{/privacy}","received_events_url":"https://api.github.com/users/Rouslan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-24T18:42:44Z","updated_at":"2015-03-26T04:40:29Z","closed_at":"2015-03-26T04:40:29Z","body":"I'm not sure if I'm doing something wrong, but when I try to use bgfx with glfw3, `bgfx::init()` fails with the following output:\r\n```\r\nX Error of failed request:  BadMatch (invalid parameter attributes)\r\n  Major opcode of failed request:  152 (GLX)\r\n  Minor opcode of failed request:  5 (X_GLXMakeCurrent)\r\n  Serial number of failed request:  136\r\n  Current serial number in output stream:  136\r\n```\r\n\r\nI'm running Linux. A minimal example demonstrating the problem is:\r\n```c++\r\n#include <GLFW/glfw3.h>\r\n#include <X11/extensions/Xrandr.h>\r\n#include <bgfxplatform.h>\r\n#include <bgfx.h>\r\n\r\nint main(int argc,char *argv[]) {\r\n    if(!glfwInit()) return -1;\r\n    \r\n    GLFWwindow *window = glfwCreateWindow(800,600,\"thing\",NULL,NULL);\r\n    if(!window) return -1;\r\n\r\n    bgfx::glfwSetWindow(window);\r\n\r\n    bgfx::init();\r\n    \r\n    return 0;\r\n}\r\n```\r\n\r\nAll I can tell is the error is triggered by `glXMakeCurrent` inside glcontext_glx.cpp at line 177."},"comment":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/comments/86339410","html_url":"https://github.com/bkaradzic/bgfx/issues/307#issuecomment-86339410","issue_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/307","id":86339410,"user":{"login":"Rouslan","id":266116,"avatar_url":"https://avatars.githubusercontent.com/u/266116?v=3","gravatar_id":"","url":"https://api.github.com/users/Rouslan","html_url":"https://github.com/Rouslan","followers_url":"https://api.github.com/users/Rouslan/followers","following_url":"https://api.github.com/users/Rouslan/following{/other_user}","gists_url":"https://api.github.com/users/Rouslan/gists{/gist_id}","starred_url":"https://api.github.com/users/Rouslan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rouslan/subscriptions","organizations_url":"https://api.github.com/users/Rouslan/orgs","repos_url":"https://api.github.com/users/Rouslan/repos","events_url":"https://api.github.com/users/Rouslan/events{/privacy}","received_events_url":"https://api.github.com/users/Rouslan/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T04:40:29Z","updated_at":"2015-03-26T04:40:29Z","body":"Awesome, thanks a lot."}}