| 563 | } |
| 564 | |
| 565 | NVGcontext* Director::markNVGDirty() { |
| 566 | if (!_nvgContext) { |
| 567 | _nvgContext = nvgCreate(1, 0); |
| 568 | AssertUnless(_nvgContext, "failed to init NanoVG context!"); |
| 569 | } |
| 570 | if (!_nvgDirty) { |
| 571 | _nvgDirty = true; |
| 572 | Size visualSize = SharedApplication.getVisualSize(); |
| 573 | float devicePixelRatio = SharedApplication.getDevicePixelRatio(); |
| 574 | nvgBeginFrame(_nvgContext, visualSize.width, visualSize.height, devicePixelRatio); |
| 575 | } |
| 576 | return _nvgContext; |
| 577 | } |
| 578 | |
| 579 | void Director::handleSDLEvent(const SDL_Event& event) { |
| 580 | switch (event.type) { |
no test coverage detected