{"action":"created","comment":{"url":"https://api.github.com/repos/vispy/vispy/pulls/comments/39626443","id":39626443,"diff_hunk":"@@ -0,0 +1,94 @@\n+# -*- coding: utf-8 -*-\n+# vispy: testskip\n+# Copyright (c) 2015, Vispy Development Team.\n+# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n+\n+\"\"\"A ctypes-based API to OSMesa\n+\"\"\"\n+from __future__ import print_function\n+import os\n+import ctypes\n+from ctypes import c_int as _c_int, c_uint as _c_uint, c_void_p\n+from vispy.gloo import gl","path":"vispy/ext/osmesa.py","position":12,"original_position":12,"commit_id":"1d0a22bb468b4d9e860ce2ed6edf186cee8f9f2e","original_commit_id":"1d0a22bb468b4d9e860ce2ed6edf186cee8f9f2e","user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"body":"things in `ext` should be independent of `vispy`, so you should just sub in the constants here like:\r\n```\r\nGL_RGBA = 6408\r\nGL_UNSIGNED_BYTE = 5121\r\n```","created_at":"2015-09-16T13:07:49Z","updated_at":"2015-09-16T13:07:49Z","html_url":"https://github.com/vispy/vispy/pull/1077#discussion_r39626443","pull_request_url":"https://api.github.com/repos/vispy/vispy/pulls/1077","_links":{"self":{"href":"https://api.github.com/repos/vispy/vispy/pulls/comments/39626443"},"html":{"href":"https://github.com/vispy/vispy/pull/1077#discussion_r39626443"},"pull_request":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1077"}}},"pull_request":{"url":"https://api.github.com/repos/vispy/vispy/pulls/1077","id":43886678,"html_url":"https://github.com/vispy/vispy/pull/1077","diff_url":"https://github.com/vispy/vispy/pull/1077.diff","patch_url":"https://github.com/vispy/vispy/pull/1077.patch","issue_url":"https://api.github.com/repos/vispy/vispy/issues/1077","number":1077,"state":"open","locked":false,"title":"Offscreen rendering with OSMesa","user":{"login":"julienr","id":506602,"avatar_url":"https://avatars.githubusercontent.com/u/506602?v=3","gravatar_id":"","url":"https://api.github.com/users/julienr","html_url":"https://github.com/julienr","followers_url":"https://api.github.com/users/julienr/followers","following_url":"https://api.github.com/users/julienr/following{/other_user}","gists_url":"https://api.github.com/users/julienr/gists{/gist_id}","starred_url":"https://api.github.com/users/julienr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienr/subscriptions","organizations_url":"https://api.github.com/users/julienr/orgs","repos_url":"https://api.github.com/users/julienr/repos","events_url":"https://api.github.com/users/julienr/events{/privacy}","received_events_url":"https://api.github.com/users/julienr/received_events","type":"User","site_admin":false},"body":"This adds a new backend for OSMesa [1], which allows vispy to do offscreen rendering on Linux (and other platform that support mesa/llvmpipe) without a X server nor a graphic card. This is a (partial?) fix to #78 .\r\n\r\nI created a docker image which you can use to test the backend. See here for instructions :\r\nhttps://github.com/julienr/vispy_osmesa_docker\r\n\r\nI am not sure the code is production ready but I am opening this PR so we can discuss this implementation.\r\n\r\n[1] http://www.mesa3d.org/osmesa.html","created_at":"2015-09-01T15:04:41Z","updated_at":"2015-09-16T13:07:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7259b0db2478f1fe95ca6d1249384df36bb6512","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vispy/vispy/pulls/1077/commits","review_comments_url":"https://api.github.com/repos/vispy/vispy/pulls/1077/comments","review_comment_url":"https://api.github.com/repos/vispy/vispy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vispy/vispy/issues/1077/comments","statuses_url":"https://api.github.com/repos/vispy/vispy/statuses/1d0a22bb468b4d9e860ce2ed6edf186cee8f9f2e","head":{"label":"julienr:osmesa","ref":"osmesa","sha":"1d0a22bb468b4d9e860ce2ed6edf186cee8f9f2e","user":{"login":"julienr","id":506602,"avatar_url":"https://avatars.githubusercontent.com/u/506602?v=3","gravatar_id":"","url":"https://api.github.com/users/julienr","html_url":"https://github.com/julienr","followers_url":"https://api.github.com/users/julienr/followers","following_url":"https://api.github.com/users/julienr/following{/other_user}","gists_url":"https://api.github.com/users/julienr/gists{/gist_id}","starred_url":"https://api.github.com/users/julienr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienr/subscriptions","organizations_url":"https://api.github.com/users/julienr/orgs","repos_url":"https://api.github.com/users/julienr/repos","events_url":"https://api.github.com/users/julienr/events{/privacy}","received_events_url":"https://api.github.com/users/julienr/received_events","type":"User","site_admin":false},"repo":{"id":41497369,"name":"vispy","full_name":"julienr/vispy","owner":{"login":"julienr","id":506602,"avatar_url":"https://avatars.githubusercontent.com/u/506602?v=3","gravatar_id":"","url":"https://api.github.com/users/julienr","html_url":"https://github.com/julienr","followers_url":"https://api.github.com/users/julienr/followers","following_url":"https://api.github.com/users/julienr/following{/other_user}","gists_url":"https://api.github.com/users/julienr/gists{/gist_id}","starred_url":"https://api.github.com/users/julienr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienr/subscriptions","organizations_url":"https://api.github.com/users/julienr/orgs","repos_url":"https://api.github.com/users/julienr/repos","events_url":"https://api.github.com/users/julienr/events{/privacy}","received_events_url":"https://api.github.com/users/julienr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/julienr/vispy","description":"Main repository for Vispy","fork":true,"url":"https://api.github.com/repos/julienr/vispy","forks_url":"https://api.github.com/repos/julienr/vispy/forks","keys_url":"https://api.github.com/repos/julienr/vispy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/julienr/vispy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/julienr/vispy/teams","hooks_url":"https://api.github.com/repos/julienr/vispy/hooks","issue_events_url":"https://api.github.com/repos/julienr/vispy/issues/events{/number}","events_url":"https://api.github.com/repos/julienr/vispy/events","assignees_url":"https://api.github.com/repos/julienr/vispy/assignees{/user}","branches_url":"https://api.github.com/repos/julienr/vispy/branches{/branch}","tags_url":"https://api.github.com/repos/julienr/vispy/tags","blobs_url":"https://api.github.com/repos/julienr/vispy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/julienr/vispy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/julienr/vispy/git/refs{/sha}","trees_url":"https://api.github.com/repos/julienr/vispy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/julienr/vispy/statuses/{sha}","languages_url":"https://api.github.com/repos/julienr/vispy/languages","stargazers_url":"https://api.github.com/repos/julienr/vispy/stargazers","contributors_url":"https://api.github.com/repos/julienr/vispy/contributors","subscribers_url":"https://api.github.com/repos/julienr/vispy/subscribers","subscription_url":"https://api.github.com/repos/julienr/vispy/subscription","commits_url":"https://api.github.com/repos/julienr/vispy/commits{/sha}","git_commits_url":"https://api.github.com/repos/julienr/vispy/git/commits{/sha}","comments_url":"https://api.github.com/repos/julienr/vispy/comments{/number}","issue_comment_url":"https://api.github.com/repos/julienr/vispy/issues/comments{/number}","contents_url":"https://api.github.com/repos/julienr/vispy/contents/{+path}","compare_url":"https://api.github.com/repos/julienr/vispy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/julienr/vispy/merges","archive_url":"https://api.github.com/repos/julienr/vispy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/julienr/vispy/downloads","issues_url":"https://api.github.com/repos/julienr/vispy/issues{/number}","pulls_url":"https://api.github.com/repos/julienr/vispy/pulls{/number}","milestones_url":"https://api.github.com/repos/julienr/vispy/milestones{/number}","notifications_url":"https://api.github.com/repos/julienr/vispy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/julienr/vispy/labels{/name}","releases_url":"https://api.github.com/repos/julienr/vispy/releases{/id}","created_at":"2015-08-27T16:11:25Z","updated_at":"2015-09-03T11:37:42Z","pushed_at":"2015-09-15T13:29:47Z","git_url":"git://github.com/julienr/vispy.git","ssh_url":"git@github.com:julienr/vispy.git","clone_url":"https://github.com/julienr/vispy.git","svn_url":"https://github.com/julienr/vispy","homepage":"http://vispy.org","size":9707,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"vispy:master","ref":"master","sha":"b48e4d3cf410b853a74b666c475c603e46725e55","user":{"login":"vispy","id":3934254,"avatar_url":"https://avatars.githubusercontent.com/u/3934254?v=3","gravatar_id":"","url":"https://api.github.com/users/vispy","html_url":"https://github.com/vispy","followers_url":"https://api.github.com/users/vispy/followers","following_url":"https://api.github.com/users/vispy/following{/other_user}","gists_url":"https://api.github.com/users/vispy/gists{/gist_id}","starred_url":"https://api.github.com/users/vispy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vispy/subscriptions","organizations_url":"https://api.github.com/users/vispy/orgs","repos_url":"https://api.github.com/users/vispy/repos","events_url":"https://api.github.com/users/vispy/events{/privacy}","received_events_url":"https://api.github.com/users/vispy/received_events","type":"Organization","site_admin":false},"repo":{"id":8935948,"name":"vispy","full_name":"vispy/vispy","owner":{"login":"vispy","id":3934254,"avatar_url":"https://avatars.githubusercontent.com/u/3934254?v=3","gravatar_id":"","url":"https://api.github.com/users/vispy","html_url":"https://github.com/vispy","followers_url":"https://api.github.com/users/vispy/followers","following_url":"https://api.github.com/users/vispy/following{/other_user}","gists_url":"https://api.github.com/users/vispy/gists{/gist_id}","starred_url":"https://api.github.com/users/vispy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vispy/subscriptions","organizations_url":"https://api.github.com/users/vispy/orgs","repos_url":"https://api.github.com/users/vispy/repos","events_url":"https://api.github.com/users/vispy/events{/privacy}","received_events_url":"https://api.github.com/users/vispy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vispy/vispy","description":"Main repository for Vispy","fork":false,"url":"https://api.github.com/repos/vispy/vispy","forks_url":"https://api.github.com/repos/vispy/vispy/forks","keys_url":"https://api.github.com/repos/vispy/vispy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vispy/vispy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vispy/vispy/teams","hooks_url":"https://api.github.com/repos/vispy/vispy/hooks","issue_events_url":"https://api.github.com/repos/vispy/vispy/issues/events{/number}","events_url":"https://api.github.com/repos/vispy/vispy/events","assignees_url":"https://api.github.com/repos/vispy/vispy/assignees{/user}","branches_url":"https://api.github.com/repos/vispy/vispy/branches{/branch}","tags_url":"https://api.github.com/repos/vispy/vispy/tags","blobs_url":"https://api.github.com/repos/vispy/vispy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vispy/vispy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vispy/vispy/git/refs{/sha}","trees_url":"https://api.github.com/repos/vispy/vispy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vispy/vispy/statuses/{sha}","languages_url":"https://api.github.com/repos/vispy/vispy/languages","stargazers_url":"https://api.github.com/repos/vispy/vispy/stargazers","contributors_url":"https://api.github.com/repos/vispy/vispy/contributors","subscribers_url":"https://api.github.com/repos/vispy/vispy/subscribers","subscription_url":"https://api.github.com/repos/vispy/vispy/subscription","commits_url":"https://api.github.com/repos/vispy/vispy/commits{/sha}","git_commits_url":"https://api.github.com/repos/vispy/vispy/git/commits{/sha}","comments_url":"https://api.github.com/repos/vispy/vispy/comments{/number}","issue_comment_url":"https://api.github.com/repos/vispy/vispy/issues/comments{/number}","contents_url":"https://api.github.com/repos/vispy/vispy/contents/{+path}","compare_url":"https://api.github.com/repos/vispy/vispy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vispy/vispy/merges","archive_url":"https://api.github.com/repos/vispy/vispy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vispy/vispy/downloads","issues_url":"https://api.github.com/repos/vispy/vispy/issues{/number}","pulls_url":"https://api.github.com/repos/vispy/vispy/pulls{/number}","milestones_url":"https://api.github.com/repos/vispy/vispy/milestones{/number}","notifications_url":"https://api.github.com/repos/vispy/vispy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vispy/vispy/labels{/name}","releases_url":"https://api.github.com/repos/vispy/vispy/releases{/id}","created_at":"2013-03-21T18:43:22Z","updated_at":"2015-09-15T08:48:34Z","pushed_at":"2015-09-16T00:48:06Z","git_url":"git://github.com/vispy/vispy.git","ssh_url":"git@github.com:vispy/vispy.git","clone_url":"https://github.com/vispy/vispy.git","svn_url":"https://github.com/vispy/vispy","homepage":"http://vispy.org","size":19080,"stargazers_count":733,"watchers_count":733,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":138,"mirror_url":null,"open_issues_count":175,"forks":138,"open_issues":175,"watchers":733,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1077"},"html":{"href":"https://github.com/vispy/vispy/pull/1077"},"issue":{"href":"https://api.github.com/repos/vispy/vispy/issues/1077"},"comments":{"href":"https://api.github.com/repos/vispy/vispy/issues/1077/comments"},"review_comments":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1077/comments"},"review_comment":{"href":"https://api.github.com/repos/vispy/vispy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1077/commits"},"statuses":{"href":"https://api.github.com/repos/vispy/vispy/statuses/1d0a22bb468b4d9e860ce2ed6edf186cee8f9f2e"}}}}