FlutterGL / flutter_web_gl

WebGL Texture plugin for Flutter
Other
109 stars 15 forks source link

Update lib_egl.dart #10

Closed clocksmith closed 3 years ago

clocksmith commented 3 years ago

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

escamoteur commented 3 years ago

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

clocksmith commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

currently Windows and MacOs is working

Mrzy commented 3 years ago

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 commented 3 years ago

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