{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/2","id":183226040,"html_url":"https://github.com/BennyQBD/CGFX5/pull/2","diff_url":"https://github.com/BennyQBD/CGFX5/pull/2.diff","patch_url":"https://github.com/BennyQBD/CGFX5/pull/2.patch","issue_url":"https://api.github.com/repos/BennyQBD/CGFX5/issues/2","number":2,"state":"closed","locked":false,"title":"Make several tweaks to get the project to compile and run on windows (Visual Studio 15)","user":{"login":"Thundzz","id":6213717,"avatar_url":"https://avatars2.githubusercontent.com/u/6213717?v=4","gravatar_id":"","url":"https://api.github.com/users/Thundzz","html_url":"https://github.com/Thundzz","followers_url":"https://api.github.com/users/Thundzz/followers","following_url":"https://api.github.com/users/Thundzz/following{/other_user}","gists_url":"https://api.github.com/users/Thundzz/gists{/gist_id}","starred_url":"https://api.github.com/users/Thundzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thundzz/subscriptions","organizations_url":"https://api.github.com/users/Thundzz/orgs","repos_url":"https://api.github.com/users/Thundzz/repos","events_url":"https://api.github.com/users/Thundzz/events{/privacy}","received_events_url":"https://api.github.com/users/Thundzz/received_events","type":"User","site_admin":false},"body":"Hello Benny,\r\n\r\nI have tried to compile and run this new project on my windows system and have encountered a few problems, so I figured I might as well volunteer to solve the problems, so I went ahead and did that, and here is the detailed explanation of every change in this contribution:\r\n\r\n- I had a problem related to the default directory structure of SDL2: When I installed SDL2 on my systemn, the default structure  was something like `%SDL2_ROOT_DIR%/include/*.h`. I need to move everything under `%SDL2_ROOT_DIR%/include/SDL2/*.h` for everything to work smoothly. I thought it may help someone so I went ahead and added a warning about that in the README.\r\n\r\n- I moved the initialisation of static const floats in `genericMath.cpp` file rather than having them in the hpp file, which would not let me compile. (https://stackoverflow.com/a/2454082/3909725)\r\n\r\n- Under `indexedModel.cpp` in the `createVertexArray` method, some element of the elements Array was empty, which made the program crash at runtime. I added an if statement to eliminate those empty elements. I don't know if that was the right solution to the problem, but hey, at least it made it work.\r\n\r\n- `__attribute__ ((always_inline))` does not work and results in horrible unreadable compilation errors under **MSVC**, I added a small test to only set FORCEINLINE to this macro on GNU based systems, and just default to simple inline on all other cases.\r\n\r\n- I could not get the program to compile with the \"normal\" `main` prototype on my windows machine; seemed like the only way to get it to work was by replacing `main` with `wmain`. I added a snippet of preprocessor code to choose the proper declaration at compile time. I know it's kind of a hack, but I couldn't find a better way to get it to work, and at least it's generic.\r\n\r\n- In genericMemory.hpp, the memswap function used  to declare a  char `temp_data[size]` which would not compile on my system because the `size` argument is dynamic and only known at runtime. I replaced the `temp_data` array with a dynamic array which is destroyed at the end of the function call.\r\n\r\n- The swizzle method in `sseVecmath.hpp` would not compile on my system, with the compiler raising a \"C20557: expected constant expression\" error. Since the method is not used for the moment and since I could not figure out the reason for this error, **I just commented it for the moment, hoping that you would know how to solve the issue :)**\r\n\r\nWith these few tweaks, I was able to run the project using MSVC and Visual Studio Community 15 2017.\r\nI hope I have not broken anything for the other environments/platforms, and I hope you'll be able to integrate my fixes to the project.\r\n\r\nPlease feel free to tell me if anything looks off or needs to be changed around a bit before integrating to the project.\r\n\r\nSincerely,\r\n","created_at":"2018-04-21T14:35:57Z","updated_at":"2018-04-23T16:28:39Z","closed_at":"2018-04-23T16:28:38Z","merged_at":null,"merge_commit_sha":"0561e00f229ef565f4c84450c23ad98f3a260b5f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/2/commits","review_comments_url":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/2/comments","review_comment_url":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BennyQBD/CGFX5/issues/2/comments","statuses_url":"https://api.github.com/repos/BennyQBD/CGFX5/statuses/f20cfefc330968ccc9cfffbd0a07e19119239cfb","head":{"label":"Thundzz:makeProjectRunnableOnWindows","ref":"makeProjectRunnableOnWindows","sha":"f20cfefc330968ccc9cfffbd0a07e19119239cfb","user":{"login":"Thundzz","id":6213717,"avatar_url":"https://avatars2.githubusercontent.com/u/6213717?v=4","gravatar_id":"","url":"https://api.github.com/users/Thundzz","html_url":"https://github.com/Thundzz","followers_url":"https://api.github.com/users/Thundzz/followers","following_url":"https://api.github.com/users/Thundzz/following{/other_user}","gists_url":"https://api.github.com/users/Thundzz/gists{/gist_id}","starred_url":"https://api.github.com/users/Thundzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thundzz/subscriptions","organizations_url":"https://api.github.com/users/Thundzz/orgs","repos_url":"https://api.github.com/users/Thundzz/repos","events_url":"https://api.github.com/users/Thundzz/events{/privacy}","received_events_url":"https://api.github.com/users/Thundzz/received_events","type":"User","site_admin":false},"repo":{"id":130480350,"name":"CGFX5","full_name":"Thundzz/CGFX5","owner":{"login":"Thundzz","id":6213717,"avatar_url":"https://avatars2.githubusercontent.com/u/6213717?v=4","gravatar_id":"","url":"https://api.github.com/users/Thundzz","html_url":"https://github.com/Thundzz","followers_url":"https://api.github.com/users/Thundzz/followers","following_url":"https://api.github.com/users/Thundzz/following{/other_user}","gists_url":"https://api.github.com/users/Thundzz/gists{/gist_id}","starred_url":"https://api.github.com/users/Thundzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thundzz/subscriptions","organizations_url":"https://api.github.com/users/Thundzz/orgs","repos_url":"https://api.github.com/users/Thundzz/repos","events_url":"https://api.github.com/users/Thundzz/events{/privacy}","received_events_url":"https://api.github.com/users/Thundzz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Thundzz/CGFX5","description":null,"fork":true,"url":"https://api.github.com/repos/Thundzz/CGFX5","forks_url":"https://api.github.com/repos/Thundzz/CGFX5/forks","keys_url":"https://api.github.com/repos/Thundzz/CGFX5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Thundzz/CGFX5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Thundzz/CGFX5/teams","hooks_url":"https://api.github.com/repos/Thundzz/CGFX5/hooks","issue_events_url":"https://api.github.com/repos/Thundzz/CGFX5/issues/events{/number}","events_url":"https://api.github.com/repos/Thundzz/CGFX5/events","assignees_url":"https://api.github.com/repos/Thundzz/CGFX5/assignees{/user}","branches_url":"https://api.github.com/repos/Thundzz/CGFX5/branches{/branch}","tags_url":"https://api.github.com/repos/Thundzz/CGFX5/tags","blobs_url":"https://api.github.com/repos/Thundzz/CGFX5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Thundzz/CGFX5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Thundzz/CGFX5/git/refs{/sha}","trees_url":"https://api.github.com/repos/Thundzz/CGFX5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Thundzz/CGFX5/statuses/{sha}","languages_url":"https://api.github.com/repos/Thundzz/CGFX5/languages","stargazers_url":"https://api.github.com/repos/Thundzz/CGFX5/stargazers","contributors_url":"https://api.github.com/repos/Thundzz/CGFX5/contributors","subscribers_url":"https://api.github.com/repos/Thundzz/CGFX5/subscribers","subscription_url":"https://api.github.com/repos/Thundzz/CGFX5/subscription","commits_url":"https://api.github.com/repos/Thundzz/CGFX5/commits{/sha}","git_commits_url":"https://api.github.com/repos/Thundzz/CGFX5/git/commits{/sha}","comments_url":"https://api.github.com/repos/Thundzz/CGFX5/comments{/number}","issue_comment_url":"https://api.github.com/repos/Thundzz/CGFX5/issues/comments{/number}","contents_url":"https://api.github.com/repos/Thundzz/CGFX5/contents/{+path}","compare_url":"https://api.github.com/repos/Thundzz/CGFX5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Thundzz/CGFX5/merges","archive_url":"https://api.github.com/repos/Thundzz/CGFX5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Thundzz/CGFX5/downloads","issues_url":"https://api.github.com/repos/Thundzz/CGFX5/issues{/number}","pulls_url":"https://api.github.com/repos/Thundzz/CGFX5/pulls{/number}","milestones_url":"https://api.github.com/repos/Thundzz/CGFX5/milestones{/number}","notifications_url":"https://api.github.com/repos/Thundzz/CGFX5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Thundzz/CGFX5/labels{/name}","releases_url":"https://api.github.com/repos/Thundzz/CGFX5/releases{/id}","deployments_url":"https://api.github.com/repos/Thundzz/CGFX5/deployments","created_at":"2018-04-21T14:16:52Z","updated_at":"2018-04-21T14:16:55Z","pushed_at":"2018-04-21T22:13:07Z","git_url":"git://github.com/Thundzz/CGFX5.git","ssh_url":"git@github.com:Thundzz/CGFX5.git","clone_url":"https://github.com/Thundzz/CGFX5.git","svn_url":"https://github.com/Thundzz/CGFX5","homepage":null,"size":6465,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BennyQBD:master","ref":"master","sha":"81b25c7fc765b1acdb02ca0c960926a791c9f8e3","user":{"login":"BennyQBD","id":1908681,"avatar_url":"https://avatars3.githubusercontent.com/u/1908681?v=4","gravatar_id":"","url":"https://api.github.com/users/BennyQBD","html_url":"https://github.com/BennyQBD","followers_url":"https://api.github.com/users/BennyQBD/followers","following_url":"https://api.github.com/users/BennyQBD/following{/other_user}","gists_url":"https://api.github.com/users/BennyQBD/gists{/gist_id}","starred_url":"https://api.github.com/users/BennyQBD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BennyQBD/subscriptions","organizations_url":"https://api.github.com/users/BennyQBD/orgs","repos_url":"https://api.github.com/users/BennyQBD/repos","events_url":"https://api.github.com/users/BennyQBD/events{/privacy}","received_events_url":"https://api.github.com/users/BennyQBD/received_events","type":"User","site_admin":false},"repo":{"id":127215557,"name":"CGFX5","full_name":"BennyQBD/CGFX5","owner":{"login":"BennyQBD","id":1908681,"avatar_url":"https://avatars3.githubusercontent.com/u/1908681?v=4","gravatar_id":"","url":"https://api.github.com/users/BennyQBD","html_url":"https://github.com/BennyQBD","followers_url":"https://api.github.com/users/BennyQBD/followers","following_url":"https://api.github.com/users/BennyQBD/following{/other_user}","gists_url":"https://api.github.com/users/BennyQBD/gists{/gist_id}","starred_url":"https://api.github.com/users/BennyQBD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BennyQBD/subscriptions","organizations_url":"https://api.github.com/users/BennyQBD/orgs","repos_url":"https://api.github.com/users/BennyQBD/repos","events_url":"https://api.github.com/users/BennyQBD/events{/privacy}","received_events_url":"https://api.github.com/users/BennyQBD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BennyQBD/CGFX5","description":null,"fork":false,"url":"https://api.github.com/repos/BennyQBD/CGFX5","forks_url":"https://api.github.com/repos/BennyQBD/CGFX5/forks","keys_url":"https://api.github.com/repos/BennyQBD/CGFX5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BennyQBD/CGFX5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BennyQBD/CGFX5/teams","hooks_url":"https://api.github.com/repos/BennyQBD/CGFX5/hooks","issue_events_url":"https://api.github.com/repos/BennyQBD/CGFX5/issues/events{/number}","events_url":"https://api.github.com/repos/BennyQBD/CGFX5/events","assignees_url":"https://api.github.com/repos/BennyQBD/CGFX5/assignees{/user}","branches_url":"https://api.github.com/repos/BennyQBD/CGFX5/branches{/branch}","tags_url":"https://api.github.com/repos/BennyQBD/CGFX5/tags","blobs_url":"https://api.github.com/repos/BennyQBD/CGFX5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BennyQBD/CGFX5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BennyQBD/CGFX5/git/refs{/sha}","trees_url":"https://api.github.com/repos/BennyQBD/CGFX5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BennyQBD/CGFX5/statuses/{sha}","languages_url":"https://api.github.com/repos/BennyQBD/CGFX5/languages","stargazers_url":"https://api.github.com/repos/BennyQBD/CGFX5/stargazers","contributors_url":"https://api.github.com/repos/BennyQBD/CGFX5/contributors","subscribers_url":"https://api.github.com/repos/BennyQBD/CGFX5/subscribers","subscription_url":"https://api.github.com/repos/BennyQBD/CGFX5/subscription","commits_url":"https://api.github.com/repos/BennyQBD/CGFX5/commits{/sha}","git_commits_url":"https://api.github.com/repos/BennyQBD/CGFX5/git/commits{/sha}","comments_url":"https://api.github.com/repos/BennyQBD/CGFX5/comments{/number}","issue_comment_url":"https://api.github.com/repos/BennyQBD/CGFX5/issues/comments{/number}","contents_url":"https://api.github.com/repos/BennyQBD/CGFX5/contents/{+path}","compare_url":"https://api.github.com/repos/BennyQBD/CGFX5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BennyQBD/CGFX5/merges","archive_url":"https://api.github.com/repos/BennyQBD/CGFX5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BennyQBD/CGFX5/downloads","issues_url":"https://api.github.com/repos/BennyQBD/CGFX5/issues{/number}","pulls_url":"https://api.github.com/repos/BennyQBD/CGFX5/pulls{/number}","milestones_url":"https://api.github.com/repos/BennyQBD/CGFX5/milestones{/number}","notifications_url":"https://api.github.com/repos/BennyQBD/CGFX5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BennyQBD/CGFX5/labels{/name}","releases_url":"https://api.github.com/repos/BennyQBD/CGFX5/releases{/id}","deployments_url":"https://api.github.com/repos/BennyQBD/CGFX5/deployments","created_at":"2018-03-29T00:43:28Z","updated_at":"2018-04-23T15:52:42Z","pushed_at":"2018-04-23T15:52:41Z","git_url":"git://github.com/BennyQBD/CGFX5.git","ssh_url":"git@github.com:BennyQBD/CGFX5.git","clone_url":"https://github.com/BennyQBD/CGFX5.git","svn_url":"https://github.com/BennyQBD/CGFX5","homepage":null,"size":6472,"stargazers_count":13,"watchers_count":13,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":0,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/2"},"html":{"href":"https://github.com/BennyQBD/CGFX5/pull/2"},"issue":{"href":"https://api.github.com/repos/BennyQBD/CGFX5/issues/2"},"comments":{"href":"https://api.github.com/repos/BennyQBD/CGFX5/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BennyQBD/CGFX5/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/BennyQBD/CGFX5/statuses/f20cfefc330968ccc9cfffbd0a07e19119239cfb"}},"author_association":"NONE","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":5,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":48,"deletions":35,"changed_files":8}}
{"actor":{"display_login":"Thundzz"}}