{"action":"created","issue":{"url":"https://api.github.com/repos/ocornut/imgui/issues/1116","repository_url":"https://api.github.com/repos/ocornut/imgui","labels_url":"https://api.github.com/repos/ocornut/imgui/issues/1116/labels{/name}","comments_url":"https://api.github.com/repos/ocornut/imgui/issues/1116/comments","events_url":"https://api.github.com/repos/ocornut/imgui/issues/1116/events","html_url":"https://github.com/ocornut/imgui/issues/1116","id":224497390,"number":1116,"title":"SDL2 Render methods destroy ui","user":{"login":"maluramichael","id":1489383,"avatar_url":"https://avatars1.githubusercontent.com/u/1489383?v=3","gravatar_id":"","url":"https://api.github.com/users/maluramichael","html_url":"https://github.com/maluramichael","followers_url":"https://api.github.com/users/maluramichael/followers","following_url":"https://api.github.com/users/maluramichael/following{/other_user}","gists_url":"https://api.github.com/users/maluramichael/gists{/gist_id}","starred_url":"https://api.github.com/users/maluramichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maluramichael/subscriptions","organizations_url":"https://api.github.com/users/maluramichael/orgs","repos_url":"https://api.github.com/users/maluramichael/repos","events_url":"https://api.github.com/users/maluramichael/events{/privacy}","received_events_url":"https://api.github.com/users/maluramichael/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-26T14:55:45Z","updated_at":"2017-04-26T15:54:57Z","closed_at":null,"body":"Environment: sdl2, sdlgfx and glew\r\n\r\nI almost integrated imgui in my project but got one little problem. I use the 2 source file out of the examples/sdl_opengl2_example directory As long as i only use imgui methods everything works fine.\r\n\r\n![mosaic capture 2017-04-26 at 16 45 40](https://cloud.githubusercontent.com/assets/1489383/25440533/075208cc-2aa0-11e7-876d-82fcc2d39088.png)\r\n\r\nWithout imgui my project works too.\r\n\r\n![mosaic capture 2017-04-26 at 16 48 43](https://cloud.githubusercontent.com/assets/1489383/25440615/450cac80-2aa0-11e7-8081-3f71d636f882.png)\r\n\r\nWhen i call SDL_RenderCopyEx or something else from sdl_gfx to draw rectangles my ui looks like this.\r\n\r\n![mosaic capture 2017-04-26 at 16 45 26](https://cloud.githubusercontent.com/assets/1489383/25440589/2d2bcda8-2aa0-11e7-8099-24eba7919ee9.png)\r\n\r\nThe code for my rendering looks like this\r\n\r\n```cpp\r\n // the painter just wraps the sdl functions\r\nvoid render() override {\r\n    painter->clear(100, 100, 100, 255);  // SDL_RenderClear(renderer);\r\n//        player->render(*painter); // SDL_RenderCopyEx(this->renderer, texture...);\r\n    renderUI();\r\n}\r\n\r\nvoid renderUI() {\r\n    ImGui_ImplSdl_NewFrame(window);\r\n\r\n    ImGui::Begin(\"My window\");\r\n    ImGui::Text(\"Hello, world!\");\r\n    ImGui::Text(\"Hello, world!\");\r\n\r\n    static float f = 0.0f;\r\n    ImGui::Text(\"Hello, world!\");\r\n    ImGui::SliderFloat(\"float\", &f, 0.0f, 1.0f);\r\n\r\n    ImGui::End();\r\n    ImGui::Render();\r\n}\r\n\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ocornut/imgui/issues/comments/297456704","html_url":"https://github.com/ocornut/imgui/issues/1116#issuecomment-297456704","issue_url":"https://api.github.com/repos/ocornut/imgui/issues/1116","id":297456704,"user":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars1.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"created_at":"2017-04-26T15:54:57Z","updated_at":"2017-04-26T15:54:57Z","body":"Perhaps something about current active, aka `glActiveTexture()`. Will investigate.\r\n\r\nMaybe related to this PR:\r\nhttps://github.com/ocornut/imgui/pull/1087\r\n(which was an incorrect fix, but linking for reference)"}}
{"actor":{"display_login":"ocornut"}}