Giter Site home page Giter Site logo

alnitak / flutter_opengl Goto Github PK

View Code? Open in Web Editor NEW
176.0 176.0 20.0 53.13 MB

A Flutter OpenGL ES plugin using a Texture() widget. Supports Android, Linux and Windows. Many shaders from ShaderToy.com can be copy/pasted

License: Other

CMake 1.41% C 3.04% C++ 87.53% Java 0.16% Swift 0.06% Objective-C 0.01% Dart 7.79% Kotlin 0.01% Shell 0.01%
flutter flutter-plugin gles glsl opengl shadertoy

flutter_opengl's Introduction

Hi_there2

  • ๐Ÿ“† Flutter enthusiast since 2018, I've been on an exciting journey of creating innovative solutions using the power of Dart and Flutter.
  • ๐Ÿงฐ Open Source Advocate: I'm all about giving back to the community. You'll find some cool open-source Flutter plugins in my repository.
  • ๐Ÿ’ก Problem Solver: I love tackling complex challenges, and I'm constantly learning to keep my skills sharp.

๐ŸŒŸ My GitHub Highlights:

  • flutter_soloud๐Ÿ‘‡๐Ÿผ: Flutter low level audio plugin using SoLoud C++ library and FFI.
  • flutter_opencv_dlib๐Ÿ‘‡๐Ÿผ: Realtime face detection and face recognition using OpenCV and dlib with Dart:ffi.
  • flutter_opengl๐Ÿ‘‡๐Ÿผ: A Flutter OpenGL ES plugin using a Texture() widget.
  • magnifying_glass๐Ÿ‘‡๐Ÿผ: Flutter real-time magnifying glass lens widget with Barrel/Pincushion distortion.
  • flutter_star_menu๐Ÿ‘‡๐Ÿผ: Attach a popup menu to any widget with any widget as menu entries.
  • finger_painter๐Ÿ‘‡๐Ÿผ: Finger paint with different brushes and different blend modes.
  • flutter_flow_chart๐Ÿ‘‡๐Ÿผ: Draw a flow chart diagram with different kind of customizable elements.

Feel free to explore my repositories, and if you have any questions, suggestions, or collaboration ideas, I'm living on Earth (๐Ÿ‡ฎ๐Ÿ‡น) and I'm just a message away. Let's code something amazing together! ๐Ÿš€

LinkedIn Badge Youtube Badge Twitter Badge

Happy coding! ๐Ÿš€


flutter_soloud

soloud6.mp4
soloud9-waveform-B.mp4
Flutter low level audio plugin using SoLoud C++ library and FFI
  • Player and capture audio from microphone
  • 3D audio with doppler effect
  • Faders, oscillators, audio effects like echo, freeverb, robotizer, equalizer, bassboost
  • retrieval of audio FFT and wave data

flutter_opencv_dlib

flutter_opencv_dlib-linux.mp4
Realtime face detection and face recognition using OpenCV and dlib with Dart:ffi

flutter_opengl

A Flutter OpenGL ES plugin using a Texture() widget. Supports Android, Linux and Windows.
A project born in 2019 to address the absence of native OpenGL.
  • use platform GLSL
  • shaders can be modified and compiled at ruun-time
  • use dart:ffi to bind c/c++ OpenGL calls
  • vertex and fragment shaders
  • Many shaders from ShaderToy.com can be copy/pasted


some packages

magnifying_glass flutter_star_menu finger_painter flutter_flow_chart

Flutter real-time magnifying glass lens widget with Barrel/Pincushion distortion.

A simple way to attach a popup menu to any widget with any widget as menu entries.

Painting package that let you finger paint with different brushes and different blend modes. The result can be read as a bitmap or list of Points to be used ie on a Map.

A package that let you draw a flow chart diagram with different kind of customizable elements. Dashboards can be saved for later use.

flutter_opengl's People

Contributors

alnitak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_opengl's Issues

Execution failed for task ':flutter_opengl:buildCMakeDebug[arm64-v8a]'.

Having this issue while running from Debian 12 both on Emulator & Physical Device.
I have all the necessary packages installed.

  • What went wrong:
    Execution failed for task ':flutter_opengl:buildCMakeDebug[arm64-v8a]'.

com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/samier/.pub-cache/hosted/pub.dev/flutter_opengl-0.9.0/android/.cxx/Debug/4g6m1p24/arm64-v8a'

C++ build system [build] failed while executing:
/home/samier/Android/Sdk/cmake/3.18.1/bin/ninja
-v
-C
/home/samier/.pub-cache/hosted/pub.dev/flutter_opengl-0.9.0/android/.cxx/Debug/4g6m1p24/arm64-v8a
flutter_opengl_plugin
from /home/samier/.pub-cache/hosted/pub.dev/flutter_opengl-0.9.0/android
ninja: error: '../../../../src/opencv/arm64-v8a/libopencv_java4.so', needed by '/home/samier/flutterP/opengl_flutter_test/build/flutter_opengl/intermediates/cxx/Debug/4g6m1p24/obj/arm64-v8a/libflutter_opengl_plugin.so', missing and no known rule to make it

Question: Does flutter_opengl support playing video from AVFrame or YUV format buffer data

Hi everyone,
I am building a Flutter application that can liveview IPCAM. Currently my application is using native lib (libc++.so) to receive data stream from IPCAM.
I used ffi and was able to get buffer data on Dart, the current buffer is in AVFrame format because I used ffmpeg_mobile decode from h265 (in libc++.so).
I want to ask if flutter_opengl has an api that supports playing video from buffer with avframe format? Or is there another plugin that supports this, hope everyone can support.
Thanks a lot

Sincerely seeking advice, How to replace the flutter default program & shaders on linux?

TextureGL *
texture_gl_new(VideoRenderer *renderer, guint32 width, guint32 height) {
    TextureGL *self = TEXTURE_GL(g_object_new(texture_gl_get_type(), NULL));
    self->renderer = renderer;
    self->width = width;
    self->height = height;

    auto vertexShader = loadShader(GL_VERTEX_SHADER, vertShaderSource);
    auto fragmentShader = loadShader(GL_FRAGMENT_SHADER, fragShaderSource);
    self->program = linkProgram(vertexShader, fragmentShader);

    glUseProgram(self->program);
    glDeleteShader(vertexShader);
    glDeleteShader(fragmentShader);

    self->attrBuffer = bindFullViewportAttrBuffer();

    self->textureId = generateEmptyTexture2D();
    self->framebufferId = generateFrameBufferTexture2D(self->textureId);

    return self;
}

This is my code, but not invalid...

Unable to run on android because of ffmpeg

Hello,
First of all, thanks for developing this package! I think it could be useful for my personal project but I can't get it to work. I tried a simple OpenGLController().initializeGL(); before the runApp call by having the package imported with :

flutter_opengl:
git:
url: https://github.com/alnitak/flutter_opengl.git
ref: master

I don't get any error when building for Linux but on android I got the following error:

Execution failed for task ':flutter_opengl:buildCMakeDebug[arm64-v8a]'.
> Build command failed.
Error while executing process /home/user/Android/Sdk/cmake/3.18.1/bin/ninja with arguments {-v -C /home/user/.pub-cache/git/flutter_opengl-c385fadea39c5174af57c0e379f866319b6a41fa/android/.cxx/Debug/47u1i66b/arm64-v8a flutter_opengl_plugin}
ninja: Entering directory '/home/user/.pub-cache/git/flutter_opengl-c385fadea39c5174af57c0e379f866319b6a41fa/android/.cxx/Debug/47u1i66b/arm64-v8a

ninja: error: '../../../../src/ffmpeg/arm64-v8a/libavcodec.so', needed by '/home/user/project/build/flutter_opengl/intermediates/cxx/Debug/47u1i66b/obj/arm64-v8a/libflutter_opengl_plugin.so', missing and no known rule to make it

So I understood that I had to build ffmpeg for android and place it in the android/src folder of the package, which I did. This time the build goes well but during the execution, there seems to be an error when executing the instruction ffi.DynamicLibrary.open("libflutter_opengl_plugin.so") (line 21 of opengl_controller.dart)

I get the following error :

ArgumentError (Invalid argument(s): Failed to load dynamic library 'libflutter_opengl_plugin.so': dlopen failed: library "libavcodec.so" not found)

It seems that it always concerns ffmpeg but I can't understand how to correct it. Could you please help me?

Failed to load dynamic library 'libflutter_opengl_plugin.so'

Hello brother, I Fork the source code, according to the tutorial to run the example code after the prompt 'Failed to load dynamic library 'libflutter_opengl_plugin.so', I tried for a long time, still can not solve, Did I miss some steps? It's still the same problem when I introduced flutter_opengl from pub to new projects, I think I missed something, but I didn't find another way in the tutorial, can you help me solve it

Seems broke

[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method stopNDK on channel flutteropengl)
#0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:319:7)

Tested on IOS and MacOs (desktop-embedding). Same error in both.

Motivation for using FFI?

Really cool library! I love that it supports runtime compilation.

I was curious, why did you use FFI & FFI gen?

It seems more complicated than platform channels + Java & C, especially by requiring a ffigen build step, ndk, CMake, glw, and a c++ compiler. That's very significant complexity!

Not trying to critique, just want to understand the motivation.

You are amazing

This project is really great. It allows independent implementation of OpenGL in Flutter, eliminating the need to use native Java/Objective-C to handle OpenGL logic. You are amazing! But when will the iOS version be released? Looking forward to it!

Any way to avoid openCV?

The ~800MB opencv library is a lot to require be default.

Is it really needed? It adds a lot of complexity to the build process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.