Giter VIP home page Giter VIP logo

Comments (11)

incanus avatar incanus commented on May 16, 2024

Assuming that on iOS, this means a move to a dirty flag which necessitates a call to render()?

from mapbox-gl-native.

incanus avatar incanus commented on May 16, 2024

We should be able to solve this on OS X by posting an NSNotification upon tile load success which calls render().

I will work on iOS first -- this should move to a CADisplayLink for UITouch tracking + the above notification approach for tile loads.

from mapbox-gl-native.

kkaefer avatar kkaefer commented on May 16, 2024

@incanus I've had got success setting paused = true on the GLKViewController on iOS.

from mapbox-gl-native.

incanus avatar incanus commented on May 16, 2024

I was experimenting with pausing the CADisplayLink directly, but pausing the VC is my next bet.

from mapbox-gl-native.

kkaefer avatar kkaefer commented on May 16, 2024

[self performSelector:@selector(stopRender) withObject:nil afterDelay:3.0];

why do do this?

from mapbox-gl-native.

incanus avatar incanus commented on May 16, 2024

Yeah I've been thinking about this, that it's somewhat unconventional, and how to best start/stop rendering. This buys a few seconds of render passes after significant actions (gestures, tile loads, etc.) which had caused an update. We may be able to just stopRender directly, or possibly with afterDelay:0, which means the next pass of the run loop.

I will reopen this to flag that I should take another look -- was just on my mental todo before.

from mapbox-gl-native.

incanus avatar incanus commented on May 16, 2024

Nah, this is a good way to do this. Actions which require render updates (gestures, tile loads, etc.) un-pause the display link passes, as well as cancel previous requests to re-pause the passes. Once things die down, a (three second) future re-pause call kicks in and stops renders until the next significant action.

from mapbox-gl-native.

kkaefer avatar kkaefer commented on May 16, 2024

I'm concerned that 3 seconds is an arbitrary value. Instead, we should algorithmically determine if we need a rerender (like on WebGL).

from mapbox-gl-native.

incanus avatar incanus commented on May 16, 2024

Ok. Lower priority, but I'll take another pass at this. We might be fighting GLKView's own benefits.

from mapbox-gl-native.

incanus avatar incanus commented on May 16, 2024

This is superseded by #161.

from mapbox-gl-native.

kkaefer avatar kkaefer commented on May 16, 2024

This is also done by moving to libuv, so not related to GLKit (which is iOS specific anyway).

from mapbox-gl-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.