Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lib_egl.dart #10

Closed
wants to merge 1 commit into from
Closed

Conversation

clocksmith
Copy link

Drop prefix for EGL path, it is included automatically except for windows where it is not needed.

Drop prefix for EGL path, it is included automatically except for windows where it is not needed.
@escamoteur
Copy link
Contributor

What do you mean by it's not needed on windows?
On which platform didn't it work?

@clocksmith
Copy link
Author

For me, Android. The call to resolveDylibPath takes care of the prefix, platform dependent:

https://github.com/jpnurmi/dylib.dart/blob/master/lib/dylib.dart#L54-L66

@escamoteur
Copy link
Contributor

uhm but why does it work on windows then witht the currentl solution.
Unfortuantely Android isn't working yet or did you make progress there?

@clocksmith
Copy link
Author

clocksmith commented May 17, 2021

I did not, but on Android I got "Could not find "liblibEGL.so", so that is when I found that it auto added the prefix. Once I changed this locally I got another error but did not have time to debug it.

Good question on windows, maybe on windows the file name actually is libEGL.dll?

@escamoteur
Copy link
Contributor

yep on windows it is indeed named like this. I will get back to android soon but I ran into some other problems that last time.

@escamoteur
Copy link
Contributor

currently Windows and MacOs is working

@Mrzy
Copy link

Mrzy commented Jun 30, 2021

same problem on android.
it will throw another ERROR when I fixed the "Could not find liblibEGL.so" issue, trace is:
I/flutter (28762): EGL version: 1.4
E/flutter (28762): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Failed to create context for display [Pointer: address=0x1], config [Pointer: address=0x7d08ac0de0], context client version 3, share context [null]. EGL error EglError.badAttribute (12292)
E/flutter (28762): #0 eglCreateContext (package:flutter_web_gl/lib_egl.dart:253:5)
E/flutter (28762): #1 FlutterWebGL.initOpenGL (package:flutter_web_gl/flutter_web_gl.dart:127:22)
E/flutter (28762): #2 _MyAppState.initPlatformState (package:flutter_web_gl_example/main.dart:33:24)
E/flutter (28762): #3 _MyAppState.initState (package:flutter_web_gl_example/main.dart:28:5)
E/flutter (28762): #4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4711:57)
E/flutter (28762): #5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4548:5)
E/flutter (28762): #6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3611:14)
E/flutter (28762): #7 Element.updateChild (package:flutter/src/widgets/framework.dart:3363:18)
E/flutter (28762): #8 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1189:16)
E/flutter (28762): #9 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1159:5)
E/flutter (28762): #10 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:1104:18)
E/flutter (28762): #11 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2535:19)
E/flutter (28762): #12 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1103:13)
E/flutter (28762): #13 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:937:7)
E/flutter (28762): #14 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:917:7)
E/flutter (28762): #15 _rootRun (dart:async/zone.dart:1346:47)
E/flutter (28762): #16 _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (28762): #17 _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (28762): #18 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1202:23)
E/flutter (28762): #19 _rootRun (dart:async/zone.dart:1354:13)
E/flutter (28762): #20 _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (28762): #21 _CustomZone.bindCallback. (dart:async/zone.dart:1186:23)
E/flutter (28762): #22 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15)
E/flutter (28762): #23 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:395:19)
E/flutter (28762): #24 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:426:5)
E/flutter (28762): #25 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

@escamoteur
Copy link
Contributor

this is fixed now in the latest master that now also runs on Android

@escamoteur escamoteur closed this Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants