How to render OpenGL in linux?

251 views
Skip to first unread message

worm...@gmail.com

unread,
Jul 24, 2019, 12:17:20 AM7/24/19
to Desktop Embedding for Flutter
I'm on a quest to create a flutter component (don't know how its called) that renders OpenGL video. I see that the linux version uses a GLFW placeholder, so I guess my component should render things using GLFW library.

However I have no idea on how to integrate it with Flutter Desktop.

Could anyone give me some hints? Any help is appreciated!

Stuart Morgan

unread,
Jul 24, 2019, 1:33:28 AM7/24/19
to worm...@gmail.com, Desktop Embedding for Flutter
On Tue, Jul 23, 2019 at 9:17 PM <worm...@gmail.com> wrote:
I'm on a quest to create a flutter component (don't know how its called) that renders OpenGL video.

You'd want the Texture widget for that. It's not supported yet for Linux, but there's an open PR for it (https://github.com/flutter/engine/pull/9822) so hopefully it will be available soon.
 
so I guess my component should render things using GLFW library.

You would not want to use GLFW for your code, both because GLFW is primarily window-based, and because using GLFW in multiple libraries is not supported by GLFW so you actually can't safely use it in anything linking with the GLFW Flutter embedding.
 
However I have no idea on how to integrate it with Flutter Desktop.

Could anyone give me some hints? Any help is appreciated!

Once the PR above lands, you would write a plugin that uses the new texture registrar APIs to vend your OpenGL content to the engine.

-Stuart 
Reply all
Reply to author
Forward
0 new messages