{"action":"created","issue":{"url":"https://api.github.com/repos/slide-rs/specs/issues/82","repository_url":"https://api.github.com/repos/slide-rs/specs","labels_url":"https://api.github.com/repos/slide-rs/specs/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/slide-rs/specs/issues/82/comments","events_url":"https://api.github.com/repos/slide-rs/specs/issues/82/events","html_url":"https://github.com/slide-rs/specs/issues/82","id":191892549,"number":82,"title":"Make it possible to single-thread portions that need it","user":{"login":"icefoxen","id":1335133,"avatar_url":"https://avatars.githubusercontent.com/u/1335133?v=3","gravatar_id":"","url":"https://api.github.com/users/icefoxen","html_url":"https://github.com/icefoxen","followers_url":"https://api.github.com/users/icefoxen/followers","following_url":"https://api.github.com/users/icefoxen/following{/other_user}","gists_url":"https://api.github.com/users/icefoxen/gists{/gist_id}","starred_url":"https://api.github.com/users/icefoxen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icefoxen/subscriptions","organizations_url":"https://api.github.com/users/icefoxen/orgs","repos_url":"https://api.github.com/users/icefoxen/repos","events_url":"https://api.github.com/users/icefoxen/events{/privacy}","received_events_url":"https://api.github.com/users/icefoxen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-27T23:07:37Z","updated_at":"2016-11-28T18:38:20Z","closed_at":null,"body":"In particular, pretty much any part of SDL2 that interacts with the hardware (so, most of it) is defined to only work properly from the program's main thread.  So, for example, drawing can't be made into a system that consumes components containing an SDL2 Texture.\r\n\r\nBecause of this, it would be nice to be able to \"pin\" components to a particular thread or some such, so they will only get run by that thread.  The world is an imperfect place.\r\n\r\n...though upon consideration, when doing drawing with SDL2 the order you draw things matters and specs can't really specify that anyway, so maybe trying to do drawing with an ECS is misguided in the first place."},"comment":{"url":"https://api.github.com/repos/slide-rs/specs/issues/comments/263354845","html_url":"https://github.com/slide-rs/specs/issues/82#issuecomment-263354845","issue_url":"https://api.github.com/repos/slide-rs/specs/issues/82","id":263354845,"user":{"login":"kvark","id":107301,"avatar_url":"https://avatars.githubusercontent.com/u/107301?v=3","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T18:38:20Z","updated_at":"2016-11-28T18:38:20Z","body":"@icefoxen `specs` by itself doesn't provide any facilities for command buffers, it's vastly out of scope. However, if you are using something like `gfx-rs`, the symbiosis should be effective. You'd have one or more systems, each constructing their own command buffers and sending them to the paint thread. That one would get all the command buffers and execute them in a proper order. A simple example (with just one rendering system) can be found in https://github.com/kvark/yasteroids."}}
{"actor":{"display_login":"kvark"}}