Skip to content

Commit

Permalink
Call setCurrentContext before initGL
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Apr 27, 2021
1 parent 234f232 commit 1514e3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MobileCelestia/Celestia/CelestiaDisplayController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ extension CelestiaDisplayController {

private func setupCelestia(statusUpdater: @escaping (String) -> Void, errorHandler: @escaping () -> Bool, completionHandler: @escaping (Bool) -> Void) {

#if !USE_MGL
let context = glView.context
#if USE_MGL
MGLContext.setCurrent(context)
#else
EAGLContext.setCurrent(context)
#endif

Expand Down

0 comments on commit 1514e3d

Please sign in to comment.