Giter VIP home page Giter VIP logo

aminogfx-gl's People

Contributors

cbratschi avatar joshmarinacci avatar

Stargazers

 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

aminogfx-gl's Issues

When using 3d mode you lose 8-bit transparency

I've been experimenting with 3d mode. Whenever I use a PNG file with an 8-bit alpha channel (so a 32 bit png) I lose some of the transparency. Only the fully transparent pixels remain transparent.

Result:
amino-render-3d

Expectation:
amino-render-2d

I've made a simple repository with some of my tests (https://github.com/fu-raz/amino-performance-tests). Nothing fancy, just a few simple tests that show different ways to accomplish the same thing. I run these tests on a raspberry Pi3 (overclocked just a tad). If you compare the 'layers-render-3d.js' to the 'layers-render-timeout-visibility.js', you can see what I mean. The 3d one performs a lot better, except for the transparency.

Is this done for performance reasons? Or is this something we can fix?

failed to add service - already in use if OpenGL driver installed

Hello,

I am trying to use aminogfx-gl on a Raspberry Pi Model B.
I have been able to npm install without problem (the code has been compiled with no error).
I can run the demos if I don't active the OpenGL driver.

Now, when I activate the driver
rapsi-conf -> Avdanced Options -> GL Driver
G1 GL (Full KMS) OpenGL desktop driver with full KMSMS
G2 GL (Fake KMS) OpenGL desktop driver with fake KMSMS
G3 Legacy Original non-GL desktop driver
And I choose G1 or G2, i get the following error:

pi@rastapi:~/workspace/aminogfx-gl$ node demos/circle.js

  • failed to add service - already in use?

What does that mean ?
If I choose G3, it works; but does that mean that aminogfx, in this case, uses a software emulation ?

Thanks

White screen on second launch

On Raspberry Pi the app can only be started once. After exiting (Ctrl+Break) and restating the app, just a white screen appears. The console output statements are the same as during the first run.

OS: Raspbian with overscanning disabled (Full HD resolution). Boots to console.

Video Crossfade

Hi

So i have two questions. What i would love to do is crossfade between two videos smoothly.
Ideally the videos are 1080. but maybe thats too much for a Rpi3.
The playback of one video is pretty stable at 25fps but during the crossfade it goes down to 5fps.
Have you any suggestions as to how to do this. im currently using two groups and an animation effect to fade one in and one out.

the second question is i have a problem releasing the resources from the video layer once its faded out.
i try video.destroy() but can you suggest the correct way to delete a video layer.

Thanks

Opacity does not work anymore

First of all, I want to say thanks for this great repo. Some months ago I wrote a little program with some transparency on the stage object. Today I updated the module and noticed that some methods changed. Finally I got it working again.

Unfortunately the opacity() method seems to not work as expected. Background color remains solid.

gfx.start(function(err){
    if (err) {
        console.log('Start failed: ' + err.message);
        return;
    }
    this.fill("#FF0000");
    this.opacity(0.1);
    //...
}

Rpi3 Buster

Hi i am trying to get a setup working currently on a Pi3 but with the though to upgrade to a Pi4 soon.

Ive managed to make this compile using the following.
Buster Lite
Node v10.18.1
NPM v6.13.4
sudo apt-get install libegl1-mesa-dev libdrm-dev libgbm-dev libfreetype6-dev libjpeg-dev libavformat-dev libswscale-dev libavcodec-dev
Git Clone https://github.com/cbratschi/aminogfx-gl.git
cd into aminogfx-gl
npm install

That works fine. it gives a High Vulnerability security error of package "sshpk"
But fixing that doesn't help.

I get an error of:

node: ../src/rpi.cpp:93: virtual void AminoGfxRPi::setup(): Assertion `driDevice > 0' failed.
Aborted

Line 91-93 of that file is:

driDevice = open("/dev/dri/card1", O_RDWR | O_CLOEXEC);

assert(driDevice > 0);

Any help would be greatly appreciated. Especially moving forward with any tips i may need to move this onto a Rpi4 taking full advantage of the speed.

Thanks you all for fantastic work developing this

Ben

Building on other platform: getTime was not declared in this scope

I know, this is probably a really noob question. I'm trying to build AminoGfx on a Pine64 in Ubuntu. Just trying to see if things work. Apparently they don't.

I've solved most of the issues by installing missing libraries. The problem I'm facing now is a little different it seems. These are the errors:
../src/base.cpp: In member function ‘void AminoGfx::measureRenderingStart()’: ../src/base.cpp:432:27: error: ‘getTime’ was not declared in this scope double time = getTime(); ^ ../src/base.cpp: In member function ‘void AminoGfx::measureRenderingEnd()’: ../src/base.cpp:449:27: error: ‘getTime’ was not declared in this scope double time = getTime(); ^ ../src/base.cpp: In member function ‘virtual void AminoGfx::render()’: ../src/base.cpp:620:27: error: ‘getTime’ was not declared in this scope fpsCycleEnd = getTime(); ^ ../src/base.cpp: In member function ‘void AminoGfx::processAnimations()’: ../src/base.cpp:655:34: error: ‘getTime’ was not declared in this scope double currentTime = getTime(); ^ ../src/base.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE AminoGfx::GetTime(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/base.cpp:686:39: error: ‘getTime’ was not declared in this scope info.GetReturnValue().Set(getTime());

Am I missing something. Do I need to include a library?

Dependencies missing and compiling problems

Hi,

I just found a problem trying to use this. it appears that there are more dependencies than the ones listed:

  • g++-4.7
  • cmake
  • libfreetype6-dev
  • libraspberrypi-dev

It also seems that Raspbian Stretch renamed a few libraries:

in the file:
aminogfx-gl/binding.gyp

Change:
-lGLESv2
-lEGL \

to:
-lbrcmGLESv2
-lbrcmEGL \

Cannot start application on Raspbian Stretch

My application does not work anymore on a newly installed Raspbian Stretch. I get this error:
module.js:664

return process.dlopen(module, path._makeLong(filename));
^

Error: /home/pi/movieplayer/node_modules/aminogfx-gl/build/binding/aminonative.node: file too short
at Object.Module._extensions..node (module.js:664:18)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/home/pi/movieplayer/node_modules/aminogfx-gl/main.js:14:16)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)

BTW: I had to install libgles2-mesa-dev manually. Else npm install throws an error.

Layers test performance when using an actual image ~20 FPS

I've tried the layers.js test and I see the same performance on my pi as described in the file. When using 5 layers on 1080p I get 60 fps.

Unfortunately this is only when using a rect. If I use an actual 1920x1080 jpeg image, using 5 layers the frame rate drops to ~20 FPS. You can see my test 'layers-image.js' in my test repo (https://github.com/fu-raz/amino-performance-tests.git)

I'm rendering 5 of the same full hd images on top of each other. Obviously this is not a 'real-world' scenario. In a real case scenario I would make sure only the top layer gets rendered. Using the z-buffer or just common sense.

What's the bottleneck here? Is this just the max performance of the Raspberry? Or does it have to do with the file/filetype. Would caching the image help? Or are there other tricks I could try? Doesn't the Pi have 2 GPU cores? would it be possible to use the second core as an offscreen buffer? I'm just spitballing here.

Transparent app

How can I make the app background transparent. I tried with this.opacity(0) but on the RaspberryPI the app is not transparent. I want to show OMXPlayer behind it.

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.