{"action":"created","comment":{"url":"https://api.github.com/repos/opentk/opentk/pulls/comments/64899776","id":64899776,"diff_hunk":"@@ -107,24 +107,95 @@ object SyncRoot\n \n         IntPtr GetAddress(string function_string)\n         {\n-            IntPtr address = Wgl.GetProcAddress(function_string);\n-            if (!IsValid(address))\n+            if (IsGL11(function_string))\n             {\n-                address = Functions.GetProcAddress(WinFactory.OpenGLHandle, function_string);\n+                return Functions.GetProcAddress(WinFactory.OpenGLHandle, function_string);\n+            }\n+            else\n+            {\n+                return Wgl.GetProcAddress(function_string);\n             }\n-            return address;\n         }\n \n         #endregion\n \n         #region Private Members\n \n-        static bool IsValid(IntPtr address)\n+        static bool IsGL11(string function_string)\n         {\n-            // See https://www.opengl.org/wiki/Load_OpenGL_Functions\n-            long a = address.ToInt64();\n-            bool is_valid = (a < -1) || (a > 3);","path":"Source/OpenTK/Platform/Windows/WglHelper.cs","position":42,"original_position":42,"commit_id":"63f9763d40eee5be94880a23a925e99a9c597bff","original_commit_id":"63f9763d40eee5be94880a23a925e99a9c597bff","user":{"login":"Frassle","id":1398274,"avatar_url":"https://avatars.githubusercontent.com/u/1398274?v=3","gravatar_id":"","url":"https://api.github.com/users/Frassle","html_url":"https://github.com/Frassle","followers_url":"https://api.github.com/users/Frassle/followers","following_url":"https://api.github.com/users/Frassle/following{/other_user}","gists_url":"https://api.github.com/users/Frassle/gists{/gist_id}","starred_url":"https://api.github.com/users/Frassle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frassle/subscriptions","organizations_url":"https://api.github.com/users/Frassle/orgs","repos_url":"https://api.github.com/users/Frassle/repos","events_url":"https://api.github.com/users/Frassle/events{/privacy}","received_events_url":"https://api.github.com/users/Frassle/received_events","type":"User","site_admin":false},"body":"> So what happens for non gl11 functions, if the pointer is returned invalid? Is that something that can happen?\r\n\r\nIt shouldn't.","created_at":"2016-05-27T12:54:31Z","updated_at":"2016-05-27T12:54:31Z","html_url":"https://github.com/opentk/opentk/pull/291#discussion_r64899776","pull_request_url":"https://api.github.com/repos/opentk/opentk/pulls/291","_links":{"self":{"href":"https://api.github.com/repos/opentk/opentk/pulls/comments/64899776"},"html":{"href":"https://github.com/opentk/opentk/pull/291#discussion_r64899776"},"pull_request":{"href":"https://api.github.com/repos/opentk/opentk/pulls/291"}}},"pull_request":{"url":"https://api.github.com/repos/opentk/opentk/pulls/291","id":42958562,"html_url":"https://github.com/opentk/opentk/pull/291","diff_url":"https://github.com/opentk/opentk/pull/291.diff","patch_url":"https://github.com/opentk/opentk/pull/291.patch","issue_url":"https://api.github.com/repos/opentk/opentk/issues/291","number":291,"state":"open","locked":false,"title":"[wgl] Change win32/wgl GetProc check","user":{"login":"Frassle","id":1398274,"avatar_url":"https://avatars.githubusercontent.com/u/1398274?v=3","gravatar_id":"","url":"https://api.github.com/users/Frassle","html_url":"https://github.com/Frassle","followers_url":"https://api.github.com/users/Frassle/followers","following_url":"https://api.github.com/users/Frassle/following{/other_user}","gists_url":"https://api.github.com/users/Frassle/gists{/gist_id}","starred_url":"https://api.github.com/users/Frassle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frassle/subscriptions","organizations_url":"https://api.github.com/users/Frassle/orgs","repos_url":"https://api.github.com/users/Frassle/repos","events_url":"https://api.github.com/users/Frassle/events{/privacy}","received_events_url":"https://api.github.com/users/Frassle/received_events","type":"User","site_admin":false},"body":"Checks function name to decided whether to use wglGetProc or win32\r\nGetProc.\r\n\r\nFixes #282.","created_at":"2015-08-20T17:56:26Z","updated_at":"2016-05-27T12:54:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04a47c1a5504b696bf1a844824307a29ae439557","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opentk/opentk/pulls/291/commits","review_comments_url":"https://api.github.com/repos/opentk/opentk/pulls/291/comments","review_comment_url":"https://api.github.com/repos/opentk/opentk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opentk/opentk/issues/291/comments","statuses_url":"https://api.github.com/repos/opentk/opentk/statuses/63f9763d40eee5be94880a23a925e99a9c597bff","head":{"label":"Frassle:wglproc","ref":"wglproc","sha":"63f9763d40eee5be94880a23a925e99a9c597bff","user":{"login":"Frassle","id":1398274,"avatar_url":"https://avatars.githubusercontent.com/u/1398274?v=3","gravatar_id":"","url":"https://api.github.com/users/Frassle","html_url":"https://github.com/Frassle","followers_url":"https://api.github.com/users/Frassle/followers","following_url":"https://api.github.com/users/Frassle/following{/other_user}","gists_url":"https://api.github.com/users/Frassle/gists{/gist_id}","starred_url":"https://api.github.com/users/Frassle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frassle/subscriptions","organizations_url":"https://api.github.com/users/Frassle/orgs","repos_url":"https://api.github.com/users/Frassle/repos","events_url":"https://api.github.com/users/Frassle/events{/privacy}","received_events_url":"https://api.github.com/users/Frassle/received_events","type":"User","site_admin":false},"repo":{"id":15408805,"name":"opentk","full_name":"Frassle/opentk","owner":{"login":"Frassle","id":1398274,"avatar_url":"https://avatars.githubusercontent.com/u/1398274?v=3","gravatar_id":"","url":"https://api.github.com/users/Frassle","html_url":"https://github.com/Frassle","followers_url":"https://api.github.com/users/Frassle/followers","following_url":"https://api.github.com/users/Frassle/following{/other_user}","gists_url":"https://api.github.com/users/Frassle/gists{/gist_id}","starred_url":"https://api.github.com/users/Frassle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frassle/subscriptions","organizations_url":"https://api.github.com/users/Frassle/orgs","repos_url":"https://api.github.com/users/Frassle/repos","events_url":"https://api.github.com/users/Frassle/events{/privacy}","received_events_url":"https://api.github.com/users/Frassle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Frassle/opentk","description":"This Open Toolkit library is a fast, low-level C# wrapper for OpenGL and OpenAL. It can be used standalone or inside a GUI on Windows, Linux, Mac, Android and iOS.","fork":true,"url":"https://api.github.com/repos/Frassle/opentk","forks_url":"https://api.github.com/repos/Frassle/opentk/forks","keys_url":"https://api.github.com/repos/Frassle/opentk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Frassle/opentk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Frassle/opentk/teams","hooks_url":"https://api.github.com/repos/Frassle/opentk/hooks","issue_events_url":"https://api.github.com/repos/Frassle/opentk/issues/events{/number}","events_url":"https://api.github.com/repos/Frassle/opentk/events","assignees_url":"https://api.github.com/repos/Frassle/opentk/assignees{/user}","branches_url":"https://api.github.com/repos/Frassle/opentk/branches{/branch}","tags_url":"https://api.github.com/repos/Frassle/opentk/tags","blobs_url":"https://api.github.com/repos/Frassle/opentk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Frassle/opentk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Frassle/opentk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Frassle/opentk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Frassle/opentk/statuses/{sha}","languages_url":"https://api.github.com/repos/Frassle/opentk/languages","stargazers_url":"https://api.github.com/repos/Frassle/opentk/stargazers","contributors_url":"https://api.github.com/repos/Frassle/opentk/contributors","subscribers_url":"https://api.github.com/repos/Frassle/opentk/subscribers","subscription_url":"https://api.github.com/repos/Frassle/opentk/subscription","commits_url":"https://api.github.com/repos/Frassle/opentk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Frassle/opentk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Frassle/opentk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Frassle/opentk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Frassle/opentk/contents/{+path}","compare_url":"https://api.github.com/repos/Frassle/opentk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Frassle/opentk/merges","archive_url":"https://api.github.com/repos/Frassle/opentk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Frassle/opentk/downloads","issues_url":"https://api.github.com/repos/Frassle/opentk/issues{/number}","pulls_url":"https://api.github.com/repos/Frassle/opentk/pulls{/number}","milestones_url":"https://api.github.com/repos/Frassle/opentk/milestones{/number}","notifications_url":"https://api.github.com/repos/Frassle/opentk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Frassle/opentk/labels{/name}","releases_url":"https://api.github.com/repos/Frassle/opentk/releases{/id}","deployments_url":"https://api.github.com/repos/Frassle/opentk/deployments","created_at":"2013-12-24T01:42:37Z","updated_at":"2016-05-27T06:09:12Z","pushed_at":"2016-02-16T16:57:09Z","git_url":"git://github.com/Frassle/opentk.git","ssh_url":"git@github.com:Frassle/opentk.git","clone_url":"https://github.com/Frassle/opentk.git","svn_url":"https://github.com/Frassle/opentk","homepage":"http://www.opentk.com","size":63406,"stargazers_count":4,"watchers_count":4,"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":4,"default_branch":"develop"}},"base":{"label":"opentk:develop","ref":"develop","sha":"3d58a0b50a3b9c32cf97abc1e345b1b51c0384ad","user":{"login":"opentk","id":5914736,"avatar_url":"https://avatars.githubusercontent.com/u/5914736?v=3","gravatar_id":"","url":"https://api.github.com/users/opentk","html_url":"https://github.com/opentk","followers_url":"https://api.github.com/users/opentk/followers","following_url":"https://api.github.com/users/opentk/following{/other_user}","gists_url":"https://api.github.com/users/opentk/gists{/gist_id}","starred_url":"https://api.github.com/users/opentk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentk/subscriptions","organizations_url":"https://api.github.com/users/opentk/orgs","repos_url":"https://api.github.com/users/opentk/repos","events_url":"https://api.github.com/users/opentk/events{/privacy}","received_events_url":"https://api.github.com/users/opentk/received_events","type":"Organization","site_admin":false},"repo":{"id":14318990,"name":"opentk","full_name":"opentk/opentk","owner":{"login":"opentk","id":5914736,"avatar_url":"https://avatars.githubusercontent.com/u/5914736?v=3","gravatar_id":"","url":"https://api.github.com/users/opentk","html_url":"https://github.com/opentk","followers_url":"https://api.github.com/users/opentk/followers","following_url":"https://api.github.com/users/opentk/following{/other_user}","gists_url":"https://api.github.com/users/opentk/gists{/gist_id}","starred_url":"https://api.github.com/users/opentk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentk/subscriptions","organizations_url":"https://api.github.com/users/opentk/orgs","repos_url":"https://api.github.com/users/opentk/repos","events_url":"https://api.github.com/users/opentk/events{/privacy}","received_events_url":"https://api.github.com/users/opentk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentk/opentk","description":"This Open Toolkit library is a fast, low-level C# wrapper for OpenGL and OpenAL. It can be used standalone or inside a GUI on Windows, Linux, Mac, Android and iOS.","fork":true,"url":"https://api.github.com/repos/opentk/opentk","forks_url":"https://api.github.com/repos/opentk/opentk/forks","keys_url":"https://api.github.com/repos/opentk/opentk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentk/opentk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentk/opentk/teams","hooks_url":"https://api.github.com/repos/opentk/opentk/hooks","issue_events_url":"https://api.github.com/repos/opentk/opentk/issues/events{/number}","events_url":"https://api.github.com/repos/opentk/opentk/events","assignees_url":"https://api.github.com/repos/opentk/opentk/assignees{/user}","branches_url":"https://api.github.com/repos/opentk/opentk/branches{/branch}","tags_url":"https://api.github.com/repos/opentk/opentk/tags","blobs_url":"https://api.github.com/repos/opentk/opentk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentk/opentk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentk/opentk/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentk/opentk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentk/opentk/statuses/{sha}","languages_url":"https://api.github.com/repos/opentk/opentk/languages","stargazers_url":"https://api.github.com/repos/opentk/opentk/stargazers","contributors_url":"https://api.github.com/repos/opentk/opentk/contributors","subscribers_url":"https://api.github.com/repos/opentk/opentk/subscribers","subscription_url":"https://api.github.com/repos/opentk/opentk/subscription","commits_url":"https://api.github.com/repos/opentk/opentk/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentk/opentk/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentk/opentk/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentk/opentk/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentk/opentk/contents/{+path}","compare_url":"https://api.github.com/repos/opentk/opentk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentk/opentk/merges","archive_url":"https://api.github.com/repos/opentk/opentk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentk/opentk/downloads","issues_url":"https://api.github.com/repos/opentk/opentk/issues{/number}","pulls_url":"https://api.github.com/repos/opentk/opentk/pulls{/number}","milestones_url":"https://api.github.com/repos/opentk/opentk/milestones{/number}","notifications_url":"https://api.github.com/repos/opentk/opentk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentk/opentk/labels{/name}","releases_url":"https://api.github.com/repos/opentk/opentk/releases{/id}","deployments_url":"https://api.github.com/repos/opentk/opentk/deployments","created_at":"2013-11-12T01:34:24Z","updated_at":"2016-05-26T18:13:37Z","pushed_at":"2016-05-26T04:06:24Z","git_url":"git://github.com/opentk/opentk.git","ssh_url":"git@github.com:opentk/opentk.git","clone_url":"https://github.com/opentk/opentk.git","svn_url":"https://github.com/opentk/opentk","homepage":"http://www.opentk.com","size":76062,"stargazers_count":480,"watchers_count":480,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":202,"mirror_url":null,"open_issues_count":108,"forks":202,"open_issues":108,"watchers":480,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/opentk/opentk/pulls/291"},"html":{"href":"https://github.com/opentk/opentk/pull/291"},"issue":{"href":"https://api.github.com/repos/opentk/opentk/issues/291"},"comments":{"href":"https://api.github.com/repos/opentk/opentk/issues/291/comments"},"review_comments":{"href":"https://api.github.com/repos/opentk/opentk/pulls/291/comments"},"review_comment":{"href":"https://api.github.com/repos/opentk/opentk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opentk/opentk/pulls/291/commits"},"statuses":{"href":"https://api.github.com/repos/opentk/opentk/statuses/63f9763d40eee5be94880a23a925e99a9c597bff"}}}}
{"actor":{"display_login":"Frassle"}}