{"action":"created","issue":{"url":"https://api.github.com/repos/gtk-rs/examples/issues/44","labels_url":"https://api.github.com/repos/gtk-rs/examples/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/gtk-rs/examples/issues/44/comments","events_url":"https://api.github.com/repos/gtk-rs/examples/issues/44/events","html_url":"https://github.com/gtk-rs/examples/pull/44","id":114548238,"number":44,"title":"Add simple opengl example","user":{"login":"mjkoo","id":30420,"avatar_url":"https://avatars.githubusercontent.com/u/30420?v=3","gravatar_id":"","url":"https://api.github.com/users/mjkoo","html_url":"https://github.com/mjkoo","followers_url":"https://api.github.com/users/mjkoo/followers","following_url":"https://api.github.com/users/mjkoo/following{/other_user}","gists_url":"https://api.github.com/users/mjkoo/gists{/gist_id}","starred_url":"https://api.github.com/users/mjkoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjkoo/subscriptions","organizations_url":"https://api.github.com/users/mjkoo/orgs","repos_url":"https://api.github.com/users/mjkoo/repos","events_url":"https://api.github.com/users/mjkoo/events{/privacy}","received_events_url":"https://api.github.com/users/mjkoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-02T08:33:40Z","updated_at":"2015-11-02T22:08:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gtk-rs/examples/pulls/44","html_url":"https://github.com/gtk-rs/examples/pull/44","diff_url":"https://github.com/gtk-rs/examples/pull/44.diff","patch_url":"https://github.com/gtk-rs/examples/pull/44.patch"},"body":"Added example of using a GtkGLArea from gtk-rs, currently the method of loading the required OpenGL functions is somewhat hacky (create an invisible window with glutin and use it's get_proc_address function to do the required name resolution). C examples tend to use a library called epoxy which does platform-independent GL function loading itself, having a similar functionality from within glutin would probably be better so you can still use the platform detection and library loading stuff without needing to actually construct a context/window. Unsure if this is possible with glutin as it stands currently, but after briefly perusing the code it does not seem to be."},"comment":{"url":"https://api.github.com/repos/gtk-rs/examples/issues/comments/153172934","html_url":"https://github.com/gtk-rs/examples/pull/44#issuecomment-153172934","issue_url":"https://api.github.com/repos/gtk-rs/examples/issues/44","id":153172934,"user":{"login":"GuillaumeGomez","id":3050060,"avatar_url":"https://avatars.githubusercontent.com/u/3050060?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeGomez","html_url":"https://github.com/GuillaumeGomez","followers_url":"https://api.github.com/users/GuillaumeGomez/followers","following_url":"https://api.github.com/users/GuillaumeGomez/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeGomez/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeGomez/orgs","repos_url":"https://api.github.com/users/GuillaumeGomez/repos","events_url":"https://api.github.com/users/GuillaumeGomez/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeGomez/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T22:08:41Z","updated_at":"2015-11-02T22:08:41Z","body":"So here's the explanation from @tomaka:\r\n\r\n> it crashes because loaded functions depend of the context\r\n> the glClear function from context 1 might be not the same glClear function in context 2\r\n> if you're lucky and it's the same one, it will work\r\n> otherwise, it crashes\r\n>\r\n> however, it's not \"likely to break\"\r\n> there is 98% chances that it'll work\r\n> but it's not clean"}}