{"action":"opened","number":66,"pull_request":{"url":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/66","id":41849840,"html_url":"https://github.com/aras-p/hlsl2glslfork/pull/66","diff_url":"https://github.com/aras-p/hlsl2glslfork/pull/66.diff","patch_url":"https://github.com/aras-p/hlsl2glslfork/pull/66.patch","issue_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/issues/66","number":66,"state":"open","locked":false,"title":"Explicitly request a context version.","user":{"login":"computerquip","id":624819,"avatar_url":"https://avatars.githubusercontent.com/u/624819?v=3","gravatar_id":"","url":"https://api.github.com/users/computerquip","html_url":"https://github.com/computerquip","followers_url":"https://api.github.com/users/computerquip/followers","following_url":"https://api.github.com/users/computerquip/following{/other_user}","gists_url":"https://api.github.com/users/computerquip/gists{/gist_id}","starred_url":"https://api.github.com/users/computerquip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/computerquip/subscriptions","organizations_url":"https://api.github.com/users/computerquip/orgs","repos_url":"https://api.github.com/users/computerquip/repos","events_url":"https://api.github.com/users/computerquip/events{/privacy}","received_events_url":"https://api.github.com/users/computerquip/received_events","type":"User","site_admin":false},"body":"Mesa doesn't support ARB_compatibility. It also doesn't default to the latest context. We can either make a context, test GL_VERSION, and parse the result... or just use GLEW and test versions until we get a minimum of each level we need for a given GLSL version.\r\n\r\nAlternatively, we can get rid of freeglut and create a GLX/Xlib context with pixmap. I don't really think it's worth the trouble though... \r\n\r\nThe code looks odd but it's easy to explain. glew is ahead of freeglut window initialization because glew requires a context to work. This context isn't created in glutInit but glutCreateWindow. We also have no way to create a context with the desired settings... so we create a dummy context to fetch capabilities, set the capabilities, destroy the dummy context/window, and create a new context/window with desired settings.  A core profile is required because Mesa does not support ARB_compatibility. ","created_at":"2015-08-07T00:35:53Z","updated_at":"2015-08-07T00:35:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/66/commits","review_comments_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/66/comments","review_comment_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/issues/66/comments","statuses_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/statuses/f0bf34fceed93398a69fd11b8c61bc80e3d7d6ab","head":{"label":"computerquip:mesa-tests","ref":"mesa-tests","sha":"f0bf34fceed93398a69fd11b8c61bc80e3d7d6ab","user":{"login":"computerquip","id":624819,"avatar_url":"https://avatars.githubusercontent.com/u/624819?v=3","gravatar_id":"","url":"https://api.github.com/users/computerquip","html_url":"https://github.com/computerquip","followers_url":"https://api.github.com/users/computerquip/followers","following_url":"https://api.github.com/users/computerquip/following{/other_user}","gists_url":"https://api.github.com/users/computerquip/gists{/gist_id}","starred_url":"https://api.github.com/users/computerquip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/computerquip/subscriptions","organizations_url":"https://api.github.com/users/computerquip/orgs","repos_url":"https://api.github.com/users/computerquip/repos","events_url":"https://api.github.com/users/computerquip/events{/privacy}","received_events_url":"https://api.github.com/users/computerquip/received_events","type":"User","site_admin":false},"repo":{"id":40157674,"name":"hlsl2glslfork","full_name":"computerquip/hlsl2glslfork","owner":{"login":"computerquip","id":624819,"avatar_url":"https://avatars.githubusercontent.com/u/624819?v=3","gravatar_id":"","url":"https://api.github.com/users/computerquip","html_url":"https://github.com/computerquip","followers_url":"https://api.github.com/users/computerquip/followers","following_url":"https://api.github.com/users/computerquip/following{/other_user}","gists_url":"https://api.github.com/users/computerquip/gists{/gist_id}","starred_url":"https://api.github.com/users/computerquip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/computerquip/subscriptions","organizations_url":"https://api.github.com/users/computerquip/orgs","repos_url":"https://api.github.com/users/computerquip/repos","events_url":"https://api.github.com/users/computerquip/events{/privacy}","received_events_url":"https://api.github.com/users/computerquip/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/computerquip/hlsl2glslfork","description":"HLSL to GLSL language translator based on ATI's HLSL2GLSL. Used in Unity.","fork":true,"url":"https://api.github.com/repos/computerquip/hlsl2glslfork","forks_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/forks","keys_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/teams","hooks_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/hooks","issue_events_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/issues/events{/number}","events_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/events","assignees_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/assignees{/user}","branches_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/branches{/branch}","tags_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/tags","blobs_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/git/refs{/sha}","trees_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/statuses/{sha}","languages_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/languages","stargazers_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/stargazers","contributors_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/contributors","subscribers_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/subscribers","subscription_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/subscription","commits_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/commits{/sha}","git_commits_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/git/commits{/sha}","comments_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/comments{/number}","issue_comment_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/issues/comments{/number}","contents_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/contents/{+path}","compare_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/merges","archive_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/downloads","issues_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/issues{/number}","pulls_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/pulls{/number}","milestones_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/milestones{/number}","notifications_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/labels{/name}","releases_url":"https://api.github.com/repos/computerquip/hlsl2glslfork/releases{/id}","created_at":"2015-08-04T01:57:39Z","updated_at":"2015-08-04T01:57:42Z","pushed_at":"2015-08-07T00:27:49Z","git_url":"git://github.com/computerquip/hlsl2glslfork.git","ssh_url":"git@github.com:computerquip/hlsl2glslfork.git","clone_url":"https://github.com/computerquip/hlsl2glslfork.git","svn_url":"https://github.com/computerquip/hlsl2glslfork","homepage":"","size":5651,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aras-p:master","ref":"master","sha":"d8f33ccc2708ec3e7b14030336b263629db89186","user":{"login":"aras-p","id":348087,"avatar_url":"https://avatars.githubusercontent.com/u/348087?v=3","gravatar_id":"","url":"https://api.github.com/users/aras-p","html_url":"https://github.com/aras-p","followers_url":"https://api.github.com/users/aras-p/followers","following_url":"https://api.github.com/users/aras-p/following{/other_user}","gists_url":"https://api.github.com/users/aras-p/gists{/gist_id}","starred_url":"https://api.github.com/users/aras-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aras-p/subscriptions","organizations_url":"https://api.github.com/users/aras-p/orgs","repos_url":"https://api.github.com/users/aras-p/repos","events_url":"https://api.github.com/users/aras-p/events{/privacy}","received_events_url":"https://api.github.com/users/aras-p/received_events","type":"User","site_admin":false},"repo":{"id":1760351,"name":"hlsl2glslfork","full_name":"aras-p/hlsl2glslfork","owner":{"login":"aras-p","id":348087,"avatar_url":"https://avatars.githubusercontent.com/u/348087?v=3","gravatar_id":"","url":"https://api.github.com/users/aras-p","html_url":"https://github.com/aras-p","followers_url":"https://api.github.com/users/aras-p/followers","following_url":"https://api.github.com/users/aras-p/following{/other_user}","gists_url":"https://api.github.com/users/aras-p/gists{/gist_id}","starred_url":"https://api.github.com/users/aras-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aras-p/subscriptions","organizations_url":"https://api.github.com/users/aras-p/orgs","repos_url":"https://api.github.com/users/aras-p/repos","events_url":"https://api.github.com/users/aras-p/events{/privacy}","received_events_url":"https://api.github.com/users/aras-p/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aras-p/hlsl2glslfork","description":"HLSL to GLSL language translator based on ATI's HLSL2GLSL. Used in Unity.","fork":false,"url":"https://api.github.com/repos/aras-p/hlsl2glslfork","forks_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/forks","keys_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/teams","hooks_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/hooks","issue_events_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/issues/events{/number}","events_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/events","assignees_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/assignees{/user}","branches_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/branches{/branch}","tags_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/tags","blobs_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/git/refs{/sha}","trees_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/statuses/{sha}","languages_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/languages","stargazers_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/stargazers","contributors_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/contributors","subscribers_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/subscribers","subscription_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/subscription","commits_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/commits{/sha}","git_commits_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/git/commits{/sha}","comments_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/comments{/number}","issue_comment_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/issues/comments{/number}","contents_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/contents/{+path}","compare_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/merges","archive_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/downloads","issues_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/issues{/number}","pulls_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls{/number}","milestones_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/milestones{/number}","notifications_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/labels{/name}","releases_url":"https://api.github.com/repos/aras-p/hlsl2glslfork/releases{/id}","created_at":"2011-05-17T11:10:43Z","updated_at":"2015-08-05T16:45:48Z","pushed_at":"2015-08-06T08:20:37Z","git_url":"git://github.com/aras-p/hlsl2glslfork.git","ssh_url":"git@github.com:aras-p/hlsl2glslfork.git","clone_url":"https://github.com/aras-p/hlsl2glslfork.git","svn_url":"https://github.com/aras-p/hlsl2glslfork","homepage":"","size":6512,"stargazers_count":216,"watchers_count":216,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":31,"forks":69,"open_issues":31,"watchers":216,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/66"},"html":{"href":"https://github.com/aras-p/hlsl2glslfork/pull/66"},"issue":{"href":"https://api.github.com/repos/aras-p/hlsl2glslfork/issues/66"},"comments":{"href":"https://api.github.com/repos/aras-p/hlsl2glslfork/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aras-p/hlsl2glslfork/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/aras-p/hlsl2glslfork/statuses/f0bf34fceed93398a69fd11b8c61bc80e3d7d6ab"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":18,"deletions":2,"changed_files":1}}