Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Make_inactive is called before swap #561

Closed

Description

@ljbade

For some reason I get this pattern from Map into my View callbacks:

  1. make_active - binds a GL context to thread
  2. make_inactive - unbinds a GL context to thread
  3. swap

Which of course causes a GL error as I am swapping without a valid GL context on the thread.

It should really be something like this:

  1. make_active
  2. swap
  3. make_inactive

Activity

  1. ljbade commented on Nov 7, 2014

    @ljbade
    ContributorAuthor

    So far I have got around the bad flow by calling make_active and make_inactive in my View::swap implementation. See it here

  2. ljbade commented on Nov 10, 2014

    @ljbade
    ContributorAuthor

    OK I have now completely stripped all make_actuve/inactive calls in Map except for where strictly needed - on the start and stop of the rendering thread.

    I have probably broken the non-async code paths but for the moment I am not using them.

    I see that this has broken the tests though.

  3. ljbade commented on Nov 21, 2014

    @ljbade
    ContributorAuthor

    I am thinking that we require non-async code to have an already valid GL context when they call render().

    Thoughts?

  4. ljbade commented on Jan 27, 2015

    @ljbade
    ContributorAuthor

    I think this has been fixed now that Android merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions