-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hi @Knightro63 ~
First of all, thank you for creating and maintaining this library! It has been very helpful for my 3D rendering needs in Flutter.
Description
I encountered an issue when running the library on Linux using a project created with a newer version of Flutter. The application fails to initialize the OpenGL renderer, throwing a Framebuffer (color) check failed: 36055 error.
However, I noticed that projects created with older versions of Flutter work perfectly fine on the same machine.
Error Log:
.... initOpenGL
.... OpenglRenderer create
EGL createTexture
Window Size:800,600
Create Texture
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ ⚠️ Framebuffer (color) check failed: 36055
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ #0 AngleConsole.error (package:flutter_angle/shared/console_logger/console_platform.dart:33:42)
│ #1 FlutterAngle._createFBOTexture (package:flutter_angle/desktop/angle.dart:417:20)
│ #2 FlutterAngle.createTexture (package:flutter_angle/desktop/angle.dart:557:21)
│ #3 <asynchronous suspension>
│ #4 ThreeJS.initPlatformState (package:three_js_core/others/three_viewer.dart:364:17)
...
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[ERROR:flutter/shell/platform/embedder/embedder_external_texture_gl.cc(122)] Could not create external texture->Investigation & Fix
After some debugging, I found that the issue is caused by changes in the default Linux runner code generated by Flutter.
If I replace the linux/runner/my_application.cc file in my new project with the version from an older Flutter project, the issue is resolved and everything works as expected.
Here is the difference between the code that fails (new template) and the code that works (old template):
It seems that the initialization sequence or the way the application window is set up in the newer Flutter Linux template conflicts with how the GL context is created in this library.
Environment:
OS: Linux
Flutter Version: 3.35.7
three_js version: 0.2.7
Hope this helps fix the issue for future versions! Thanks again.