{"action":"created","issue":{"url":"https://api.github.com/repos/mono/MonoGame/issues/3436","labels_url":"https://api.github.com/repos/mono/MonoGame/issues/3436/labels{/name}","comments_url":"https://api.github.com/repos/mono/MonoGame/issues/3436/comments","events_url":"https://api.github.com/repos/mono/MonoGame/issues/3436/events","html_url":"https://github.com/mono/MonoGame/pull/3436","id":54848230,"number":3436,"title":"Multi Game/GraphicsDevice within single process feature","user":{"login":"christallire","id":1384630,"avatar_url":"https://avatars.githubusercontent.com/u/1384630?v=3","gravatar_id":"","url":"https://api.github.com/users/christallire","html_url":"https://github.com/christallire","followers_url":"https://api.github.com/users/christallire/followers","following_url":"https://api.github.com/users/christallire/following{/other_user}","gists_url":"https://api.github.com/users/christallire/gists{/gist_id}","starred_url":"https://api.github.com/users/christallire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christallire/subscriptions","organizations_url":"https://api.github.com/users/christallire/orgs","repos_url":"https://api.github.com/users/christallire/repos","events_url":"https://api.github.com/users/christallire/events{/privacy}","received_events_url":"https://api.github.com/users/christallire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-20T06:25:17Z","updated_at":"2015-01-20T10:04:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mono/MonoGame/pulls/3436","html_url":"https://github.com/mono/MonoGame/pull/3436","diff_url":"https://github.com/mono/MonoGame/pull/3436.diff","patch_url":"https://github.com/mono/MonoGame/pull/3436.patch"},"body":"this commit resolves #1823\r\n\r\n- FEATURE: GraphicsDeviceContext added for backward compatibility with XNA framework\r\n(Squashed)\r\n- REFACTOR: EffectCache moved from Effect to GraphicsDeviceContext\r\n- REFACTOR: Moved ResetStates in GraphicsDevice to GraphicsDeviceContext\r\n- REFACTOR: Default BlendState are moved to GraphicsDeviceContext\r\n- TASK: Defensive code against usage of GraphicsResource.Current\r\n- FIX: (Windows) Closing game window shouldn't close whole application\r\n- TASK: Build definitions update for GraphicsDeviceContext\r\n- WORKAROUND: Hacks to workaround usage of static member _allWindows in WinFormsGameWindow\r\n- TASK: DebugAssertion for GraphicsDeviceContext added to GraphicsResource\r\n- REFACTOR: Proper disposal of GraphicsResource"},"comment":{"url":"https://api.github.com/repos/mono/MonoGame/issues/comments/70630662","html_url":"https://github.com/mono/MonoGame/pull/3436#issuecomment-70630662","issue_url":"https://api.github.com/repos/mono/MonoGame/issues/3436","id":70630662,"user":{"login":"christallire","id":1384630,"avatar_url":"https://avatars.githubusercontent.com/u/1384630?v=3","gravatar_id":"","url":"https://api.github.com/users/christallire","html_url":"https://github.com/christallire","followers_url":"https://api.github.com/users/christallire/followers","following_url":"https://api.github.com/users/christallire/following{/other_user}","gists_url":"https://api.github.com/users/christallire/gists{/gist_id}","starred_url":"https://api.github.com/users/christallire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christallire/subscriptions","organizations_url":"https://api.github.com/users/christallire/orgs","repos_url":"https://api.github.com/users/christallire/repos","events_url":"https://api.github.com/users/christallire/events{/privacy}","received_events_url":"https://api.github.com/users/christallire/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T10:04:33Z","updated_at":"2015-01-20T10:04:33Z","body":"Yes, Indeed. I should've communicate with you guys.\r\nMy bad, I hate to making excuses but I'm middle of something and it's requirement is rapidly expanding and I'm running out of time.\r\n\r\nAlthough previous decisions I made (which is using MonoGame instead of Unity) is forcing me to implement such features yet no one requires,\r\nBut I'm still thinking it's good decision because I can contribute.\r\n\r\nI'm going to tell little bit explanation about why i'm using GraphicsDeviceContext and .Current thread static member.\r\nI got general idea from OperationContext.Current from WCF (windows communication foundation)\r\nI needed to change as least as possible to keep source unchanged safe and make sure get this working with XNA compatibility.\r\n\r\nUnless thread is not executing another Game's RunLoop, it's guaranteed to not interfere with another Game.\r\n\r\nPreviously i used AppDomain to run multiple games but it was bad choice since I had only one connection to connect to server and it's making everything difficult.\r\n\r\nI'm looking forward to your comments."}}