Go to advanced search

by paddyg
Sat Dec 07, 2019 7:37 pm
Forum: Python
Topic: Threading problems
Replies: 18
Views: 1516

Re: Threading problems

Hi, Yes I just tested the idea of not putting the functions in Threads (pi3d_demos has an example using PyQt4 so I could add a time-wasting function very easily). The result is that the functions started by QTimer do block the execution of the main thread so that means that if you don't put the func...
by paddyg
Sat Dec 07, 2019 9:15 am
Forum: General discussion
Topic: RPI 4B 1GB Xinit keeps stopping; running out of options...
Replies: 7
Views: 806

Re: RPI 4B 1GB Xinit keeps stopping; running out of options...

@basm does it only crash when running pi3d? Also what form does the crash take? You say X stops which sounds like you drop back to command line. PS what happens if you take out the hdmi_cvt out or only specify w,h,fps and not aspect ratio or ...
by paddyg
Sat Dec 07, 2019 8:38 am
Forum: Python
Topic: Threading problems
Replies: 18
Views: 1516

Re: Threading problems

Some modules have functionality that has to run in the main thread of the process that started the program. For instance in pi3d the calls to external OpenGL DLLs can't be offloaded into spawned threads. So when it needs to be run at the same time as Qt or Flask etc it either has to ...
by basm
Thu Dec 05, 2019 7:21 pm
Forum: General discussion
Topic: RPI 4B 1GB Xinit keeps stopping; running out of options...
Replies: 7
Views: 806

RPI 4B 1GB Xinit keeps stopping; running out of options...

... members, I've bought a RPI 4B 1Gb installed Raspian and configured it. It runs good for a while and then crashes. Some context: I'm running Pi3D within Xinit and the process starts, works ok and then after a random amount of time it keeps on exiting without apparent reason in the logs. As ...
by Gavinmc42
Mon Dec 02, 2019 2:11 am
Forum: Python
Topic: Help with 3D graphics programming
Replies: 3
Views: 618

Re: Help with 3D graphics programming

Pygame, Pyglet, Pyopengl, SDL2 have been my starting points.
Pi3D is getting tweaked for Pi4's.

Even shaders can be done now, I started here.
https://github.com/Blakkis/GLSL_Python

OpenGL is easier on the Pi4, it mostly just works.
It is not perfect and mesa3D 19.2.6 just got some more Pi commits.
by Gavinmc42
Fri Nov 29, 2019 1:06 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

With the compositor running (it's turned off by default in raspbian buster but you can start it with ``xcompmgr``, already on in ubuntu or gentoo64) I never even noticed it was on in Gentoo64.. I can remember when compositors first came out on Linux, slowed things down, I used to turn them off. Too...
by paddyg
Thu Nov 28, 2019 12:31 pm
Forum: OpenGLES
Topic: OpenGLES and Raspberry PI 3
Replies: 8
Views: 2022

Re: OpenGLES and Raspberry PI 3

... what caused those compile errors. Are you using stable as opposed to nightly, and latest version? What do you get with pi@raspberrypi:~/rust/rust_pi3d/pi3d $ rustup show Default host: armv7-unknown-linux-gnueabihf rustup home: /home/pi/.rustup stable-armv7-unknown-linux-gnueabihf (default) rustc ...
by paddyg
Thu Nov 28, 2019 12:11 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

Yes (and no, it's X11 window related rather than OpenGL). With the compositor running (it's turned off by default in raspbian buster but you can start it with ``xcompmgr``, already on in ubuntu or gentoo64) you can adjust the opacity of the X11 window. See the discussion on the first page of this th...
by Gavinmc42
Thu Nov 28, 2019 11:10 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

Finally got my Gentoo64 OS's up and running with the new 1.5.2 release.
While playing with the python shader code I just grabbed a window to move it and noticed it went a bit transparent.

What is happening with the window compositing that does that?
Is it usable in the OpenGL shader code.
by vaxon
Wed Nov 27, 2019 11:20 pm
Forum: OpenGLES
Topic: OpenGLES and Raspberry PI 3
Replies: 8
Views: 2022

Re: OpenGLES and Raspberry PI 3

... with vsync enabled. Not sure why it's not working for you. Probably it's not implemented correctly in ruby/python. Unfortunately, I couldn't build pi3d. It shows a number of "Use of unstable feature/library" errors, and eventually stops with "error: Could not compile `arrayvec`". Would be interesting ...
by paddyg
Wed Nov 27, 2019 8:16 pm
Forum: OpenGLES
Topic: OpenGLES and Raspberry PI 3
Replies: 8
Views: 2022

Re: OpenGLES and Raspberry PI 3

Yes it is a bit odd. Just read your other thread and seen the eglSwapInterval(0) tip. The SDL2 route doesn't use EGL (unless SDL2 does something behind the scenes) but there is an SDL function (also exposed in the rust crate) to set SwapInterval. I tried it on one of the rust_pi3d demos and the fps ...
by vaxon
Wed Nov 27, 2019 7:04 pm
Forum: OpenGLES
Topic: OpenGLES and Raspberry PI 3
Replies: 8
Views: 2022

Re: OpenGLES and Raspberry PI 3

... actually initialize the display with brcm code, using SDL2 + X11 instead, which doesn't support h/w acceleration at all. Thank you, I'll try your pi3d later. I've tried simple tests with the legacy non-GL drivers and proprietary libs in /opt/vc/lib, and fake/full KMS with mesa OpenGL libs. I can't ...
by paddyg
Wed Nov 27, 2019 6:25 pm
Forum: OpenGLES
Topic: OpenGLES and Raspberry PI 3
Replies: 8
Views: 2022

Re: OpenGLES and Raspberry PI 3

... code but not yet made it public. It looks to be a GLX error and I'm not sure exactly where that crops up in that code - but the last version of pi3d (v2.34) uses GLX to render transparent X11 windows and it runs ok on raspbian buster. for CPP I think Tim's code works fine on RPi4 just using ...
by paddyg
Wed Nov 27, 2019 9:46 am
Forum: Python
Topic: Display full screen image using Python?
Replies: 5
Views: 1623

Re: Display full screen image using Python?

I can't see a ref to this in that example code, but you can get tk to use fullscreen (rather than maximized which I think the geometry(wxh+0+0) does) using something like import tkinter tk = tkinter.Tk() tk.attributes("-fullscreen", True) and here's some slightly complicated code to fill the screen ...
by Gavinmc42
Tue Nov 26, 2019 8:18 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

Tried the raymarch shader code on Windows, same result, black background. Pygame does not do transparency? It could just be a simple mode setting? Now have a PC to test the Pi code against. Wish I knew what I was doing :lol: Blakkis's minimal.py GLSL does 2000fps, that's a bit faster than the Pi4. T...
by paddyg
Sun Nov 24, 2019 12:37 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

The transparent background uses libGLX and an X extension libXrender. Which seems to be already available on raspbian and ubuntu but may be harder to find elsewhere.
by Gavinmc42
Sun Nov 24, 2019 8:47 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

Have not looked at how to use extensions yet. Got my free Pascal OpenGL up and running on Buster now. GL, GLX, GLU, GLEXT, GLUT are options for that. Google time- It looks like I need to use glext for Pascal to access the extensions. https://wiki.lazarus.freepascal.org/OpenGL There is also a web pag...
by paddyg
Sun Nov 24, 2019 8:14 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

Gavinmc42 wrote:
Sun Nov 24, 2019 12:58 am
Does glClearColor(0.0, 0.0, 1.0, 0.0) work on PC's?
Yes, but only using the mechanism discussed at the start of this thread (glx and X extension) I've not got it working with the sdl2 branch or on Windows (can't get the sdl2 window to work at all on Windows yet)
by Gavinmc42
Sun Nov 24, 2019 12:58 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

Made another Buster OS, has the new DVFS. So used to 55C temps 43C is making me think something is wrong. Just in time for summer downunder. Trying to get transparency to work while my Gentoo64 is genuping(update/upgrade). `My OpenGl testing has been on Gentoo64, so I am installing most of those too...
by Gavinmc42
Sat Nov 23, 2019 8:52 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

glClearColor( 0.7, 0.7, 0.7, 0.7) ; // light gray bg Interesting, I have the same line in my cloud shader code trying to do a blue sky. I only get black. Tested on mesa 19.1.0 and 19.2.3 It might not be SDL issue, probably OpenGL? Perhaps a mesa issue? New versions are out, time to update. Gentoo m...
by paddyg
Sat Nov 23, 2019 8:36 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

... tricky http://forums.libsdl.org/viewtopic.php?p=44939 is only explicit ref I can find. PS I've tried testing for availability of pysdl2 on init of pi3d and defaulting to that unless explicitly set use_sdl2=False That might be a nicer approach but will see how it works on all the different platforms.
by Gavinmc42
Sat Nov 23, 2019 1:59 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

... Anyway I have Raspberry Rain working on a Raspbian Buster Pi4. But it is not transparent, was it supposed to be? Have not test everything but most Pi3D demos seem to work. Edit My Python shader examples run fine too on Buster. Which makes sense, the GPU does not care if it is talking to arm32 or ...
by Gavinmc42
Sat Nov 23, 2019 1:04 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

segfault is pretty common for me these days.
sudo pip install --user pysdl2
Collecting pysdl2
Segmentation fault
There will be a new 1.5.2 release of Gentoo64 any day.
I have broken two 1.5.1 Gentoo64's this week ;)
Will see if I can make/find a working one to test this on.
by sapnho
Fri Nov 22, 2019 8:10 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 265
Views: 51444

Re: Image viewer with transition between images

Paddy's latest Pi3D update is another great improvement. I have explained the various settings and functionalities here: https://www.thedigitalpictureframe.com/ ... -nov-2019/

Thanks so much, Paddy!
by paddyg
Fri Nov 22, 2019 7:24 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 88
Views: 14056

Re: Pi3D transparent background on Pi4

@Gavinmc42, Just pushed a generally working (on gentoo64) pi3d using sdl2 to https://github.com/tipam/pi3d/tree/sdl2 If you've cloned the repo you can git checkout sdl2 then in the pi3d_demos folder you need to have demo.py pointing to the local pi3d ...

Go to advanced search