{"action":"created","issue":{"url":"https://api.github.com/repos/memononen/nanovg/issues/285","repository_url":"https://api.github.com/repos/memononen/nanovg","labels_url":"https://api.github.com/repos/memononen/nanovg/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/memononen/nanovg/issues/285/comments","events_url":"https://api.github.com/repos/memononen/nanovg/issues/285/events","html_url":"https://github.com/memononen/nanovg/issues/285","id":157554848,"number":285,"title":"NanoVG changes states, disrupts rendering","user":{"login":"SubiyaCryolite","id":16505156,"avatar_url":"https://avatars.githubusercontent.com/u/16505156?v=3","gravatar_id":"","url":"https://api.github.com/users/SubiyaCryolite","html_url":"https://github.com/SubiyaCryolite","followers_url":"https://api.github.com/users/SubiyaCryolite/followers","following_url":"https://api.github.com/users/SubiyaCryolite/following{/other_user}","gists_url":"https://api.github.com/users/SubiyaCryolite/gists{/gist_id}","starred_url":"https://api.github.com/users/SubiyaCryolite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubiyaCryolite/subscriptions","organizations_url":"https://api.github.com/users/SubiyaCryolite/orgs","repos_url":"https://api.github.com/users/SubiyaCryolite/repos","events_url":"https://api.github.com/users/SubiyaCryolite/events{/privacy}","received_events_url":"https://api.github.com/users/SubiyaCryolite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-30T20:46:51Z","updated_at":"2016-05-30T21:13:47Z","closed_at":null,"body":"Hello.\r\n\r\nI want to replace my current HUD with NanoVG. However, whenever I render directly (nvgBeginFrame) or with a nanovgFrameBuffer the rest of my scene does not display. \r\n\r\nIt seems to be an issue with state. if I make a single NanoVG call just once (after a 3 second delay for example) my scene remains blank indefinitely. Im now trying to determine what exactly nvgBeginFrame does to my environment. \r\n\r\nRegardless of where I place the NanoVG code in my display function the rest of the scene simply doesn’t render at all. All I get is a white screen with the NanoVG elements. If I get rid of NanoVG calls within the begin/end frame functions my scene renders just fine. I've taken a look at the glnvg__renderFlush function and cant figure out which of the calls is causing this problem.\r\n\r\nFurthermore I haven't been able to find any tutorial combining NanoVG and OpenGL render calls (i.e overlaying a 3D mesh). So its hard for me to determine what I’m doing wrong. Below is an example of my NanoVG call.\r\n\r\nnvgBeginFrame(je.vg, je.gameWidth(), je.gameHeight(), 1.0f);\r\nnvgSave(je.vg);\r\n\r\ncolorA.r(1).g(0).b(0).a(1);\r\nnvgBeginPath(je.vg);\r\nnvgRect(je.vg, 0, 0, 340, 30);\r\nnvgFillColor(je.vg, colorA);\r\nnvgFill(je.vg);\r\n\r\nnvgRestore(je.vg);\r\nnvgEndFrame(je.vg);\r\n\r\n\r\nThis is my current HUD. http://media.indiedb.com/images/downloads/1/82/81436/scndgen_legacy_2015-1-28-57903-s.png"},"comment":{"url":"https://api.github.com/repos/memononen/nanovg/issues/comments/222555271","html_url":"https://github.com/memononen/nanovg/issues/285#issuecomment-222555271","issue_url":"https://api.github.com/repos/memononen/nanovg/issues/285","id":222555271,"user":{"login":"memononen","id":5249992,"avatar_url":"https://avatars.githubusercontent.com/u/5249992?v=3","gravatar_id":"","url":"https://api.github.com/users/memononen","html_url":"https://github.com/memononen","followers_url":"https://api.github.com/users/memononen/followers","following_url":"https://api.github.com/users/memononen/following{/other_user}","gists_url":"https://api.github.com/users/memononen/gists{/gist_id}","starred_url":"https://api.github.com/users/memononen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memononen/subscriptions","organizations_url":"https://api.github.com/users/memononen/orgs","repos_url":"https://api.github.com/users/memononen/repos","events_url":"https://api.github.com/users/memononen/events{/privacy}","received_events_url":"https://api.github.com/users/memononen/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T21:13:47Z","updated_at":"2016-05-30T21:13:47Z","body":"The readme describes the state that is changed by nanovg. Are you restoring those after nanovg has rendered?"}}
{"actor":{"display_login":"memononen"}}