{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1668","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1668/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1668/comments","events_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1668/events","html_url":"https://github.com/HaxeFlixel/flixel/pull/1668","id":120084283,"number":1668,"title":"Render path set at runtime","user":{"login":"larsiusprime","id":739064,"avatar_url":"https://avatars.githubusercontent.com/u/739064?v=3","gravatar_id":"","url":"https://api.github.com/users/larsiusprime","html_url":"https://github.com/larsiusprime","followers_url":"https://api.github.com/users/larsiusprime/followers","following_url":"https://api.github.com/users/larsiusprime/following{/other_user}","gists_url":"https://api.github.com/users/larsiusprime/gists{/gist_id}","starred_url":"https://api.github.com/users/larsiusprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsiusprime/subscriptions","organizations_url":"https://api.github.com/users/larsiusprime/orgs","repos_url":"https://api.github.com/users/larsiusprime/repos","events_url":"https://api.github.com/users/larsiusprime/events{/privacy}","received_events_url":"https://api.github.com/users/larsiusprime/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HaxeFlixel/flixel/labels/Rendering","name":"Rendering","color":"fef2c0"},{"url":"https://api.github.com/repos/HaxeFlixel/flixel/labels/Structure","name":"Structure","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-12-03T02:57:41Z","updated_at":"2015-12-11T14:45:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/pulls/1668","html_url":"https://github.com/HaxeFlixel/flixel/pull/1668","diff_url":"https://github.com/HaxeFlixel/flixel/pull/1668.diff","patch_url":"https://github.com/HaxeFlixel/flixel/pull/1668.patch"},"body":"This changes the FLX_RENDER_BLIT and FLX_RENDER_TILE into runtime flags (FlxG.renderTile and FlxG.renderBlit).\r\n\r\nI think this change is necessary because there are situations in which you can't know ahead of time whether the user's system will need software rendering (for which BLIT is optimized) or hardware rendering (for which TILE is optimized).\r\n\r\nI've identified two such scenarios already:\r\n\r\n**1. Windows  -- ANGLE on Vista/7/8/10, SOFTWARE on XP**\r\n\r\nIn a recent bit of refactoring for OpenFL, we were able to get ANGLE up and running, and it's now going to be the default rendering system for Windows, this increases compatibility across the board and virtually eliminates issues with bad OpenGL drivers. However, ANGLE does now work with Windows XP. Doing some testing, the *only* way I could get reliable, works close to 100% of the time results with XP was to force software rendering -- this hasn't been pushed through quite yet, but I believe Joshua agrees with me. However, the system cannot know at compile time which version of windows the user will use, so it has to be able to switch between hardware and software at runtime.\r\n\r\n**2. HTML5 -- WebGL with CANVAS fallback**\r\n\r\nThis one's more important IMHO. If we want a really good web compatibility experience, we need to target WebGL with an automatic Canvas fallback. For best results this would require us to detect WebGL compatibility at runtime and then pick the right render method then.\r\n\r\nThis is a big refactor so it deserves a lot of scrutiny, I've been using it myself and it seems stable but I definitely need input and feedback on this.\r\n\r\nHope this is useful.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/comments/163952402","html_url":"https://github.com/HaxeFlixel/flixel/pull/1668#issuecomment-163952402","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1668","id":163952402,"user":{"login":"larsiusprime","id":739064,"avatar_url":"https://avatars.githubusercontent.com/u/739064?v=3","gravatar_id":"","url":"https://api.github.com/users/larsiusprime","html_url":"https://github.com/larsiusprime","followers_url":"https://api.github.com/users/larsiusprime/followers","following_url":"https://api.github.com/users/larsiusprime/following{/other_user}","gists_url":"https://api.github.com/users/larsiusprime/gists{/gist_id}","starred_url":"https://api.github.com/users/larsiusprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsiusprime/subscriptions","organizations_url":"https://api.github.com/users/larsiusprime/orgs","repos_url":"https://api.github.com/users/larsiusprime/repos","events_url":"https://api.github.com/users/larsiusprime/events{/privacy}","received_events_url":"https://api.github.com/users/larsiusprime/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T14:45:30Z","updated_at":"2015-12-11T14:45:30Z","body":"I went ahead and merged my fix for the flixel-addons demos since it was a very small change and I tested it locally as well (and travis was green).\r\n\r\nNow I've restarted the Travis build here -- if I did everything right, this one should become green, too."}}