Go to advanced search

by Gavinmc42
Sun Nov 10, 2019 12:41 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Cool more shader code, thanks :D
Found some Python GLSL Shader YT tuts last night.
But pretty much the same error, EGL_NO_SURFACE

Will try debugging via pi3d/util/DisplayOpenGL.py
VC4 Pi's and VC6 Pi need some GL/ES debug tools, I"m thinking I might need to learn Piglit.
by paddyg
Sat Nov 09, 2019 12:29 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

... using fake KMS and, presumably the desktop (X11) is running as in your screen cap. Could be all sorts of things then, I would work my way through pi3d/util/DisplayOpenGL.py sticking print(x) statements until I found where it went wrong.. looks like I might have to set up a gentoo card - did you ...
by Gavinmc42
Sat Nov 09, 2019 10:02 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

... woke me up to shaders I have been doing a crash course. https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=256132 Did not notice shaders in Pi3D before. Toni Vuoristo's GLSL_Python is simple enough for me to understand, unlike Pi3D which in much bigger. I keep getting surprised how much ...
by paddyg
Sat Nov 09, 2019 8:25 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Gavin, that error is a bit hard to pin down as it just arises at the end of the display surface creation process if it's failed! On the pi4 pi3d checks that fakeKMS has been set by looking for vc4 in /proc/modules and then uses the x11 libraries to create a GL compatible window. So those are ...
by Gavinmc42
Sat Nov 09, 2019 7:57 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

What is the trick to getting Pi3D working on a Pi4. Have tested Python and OpenGL, even shaders on Gentoo64 so it works. I know there is no GLES for Pi4 only OpenGL. Traceback (most recent call last): File "SpriteBalls.py", line 38, in ...
by JeDy111
Fri Nov 08, 2019 4:04 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Very interesting. The Blender offers a wide range of possibilities.
by paddyg
Fri Nov 08, 2019 12:54 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

... things in different windows. Just in case you ever need something more complicated (circular or L-shaped window) then you can make your own pi3d.Shape quite easily. Check out the different class definitions in pi3d/shape/ but here is a demo making a rectangular window like your scissor one. ...
by Gavinmc42
Fri Nov 08, 2019 11:37 am
Forum: Python
Topic: OpenGL errors
Replies: 9
Views: 233

Re: OpenGL errors

Apart from the Pi3D stuff I have not used Python for OpenGL. To check the libs are installed , this works. https://pythonprogramming.net/opengl-rotating-cube-example-pyopengl-tutorial/ Second test https://stackabuse.com/brief-introduction-to-opengl-in-python-with-pyopengl/ ...
by JeDy111
Fri Nov 08, 2019 9:59 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Hi paddyg, Zero alpha Plane objects are interesting to dedicate a surface free of Pi3D shapes. Good to know. In my case, it is really glScissor that makes the trick since I want the Pi3D shapes to disappear when they leave a rectangular surface. Based on the pi3d.sprite.ScissorBall ...
by paddyg
Thu Nov 07, 2019 10:44 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Ah, so you want the shapes you draw to disappear as they move off the edge of the pi3d screen? You could do that by making a single pi3d full screen window then masking off the bits you wanted to appear 'off screen' with zero alpha Plane objects like below. I also ...
by JeDy111
Thu Nov 07, 2019 9:45 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Great! In my use case, some portions of the screen should not be overlayed by the Pi3D shapes. The Pi3D shapes must be limited to a rectangular surface. For a seamless integration, this rectangular surface cannot have visible boundaries. Just like it was with Pi3D ...
by paddyg
Wed Nov 06, 2019 4:06 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

... - being linux there is almost certainly a file you can tweak somewhere. However, just out of curiosity; why can't you just have one full screen pi3d window and draw stuff inside that where you need it? Is there a processing overhead for having un-drawn-on GL surface? Presumably it's just glClear() ...
by JeDy111
Wed Nov 06, 2019 9:14 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Hi paddyg, Opaque background with glx is indeed surprising! Can be fixed by disabling glx if alpha=1. I think it is preferable than activating automatically glx if alpha<1 because there could issues on RPI3 on which xcompmgr is not needed. Thanks for the insights and ideas for composition features. ...
by Gavinmc42
Wed Nov 06, 2019 12:49 am
Forum: Python
Topic: OpenGL errors
Replies: 9
Views: 233

Re: OpenGL errors

Are you using a Pi4?
That old code won't work.

Try something newer?
https://github.com/tipam/pi3d
by paddyg
Tue Nov 05, 2019 11:32 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

... couple of fixes I've needed to make while testing on non-fakeKMS Raspberry Pis and I might slightly automate the specification of use_glx (i.e. if pi3d is going to use X11 for the window and the background has been specified in Display.create() with alpha less than 1.0 -> use_glx is True). Also ...
by JeDy111
Tue Nov 05, 2019 10:18 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Test ok on my side on RPI4. Thanks again. For compositing purposes of Pi3D along with others applications such as a video player on the screen, is there a simple way to create the Pi3D Display without the window borders and title which now appears when specifying ...
by paddyg
Tue Nov 05, 2019 5:38 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

scrcap.jpg
scrcap.jpg (73.97 KiB) Viewed 533 times
Working version now on pi3d develop branch. Also revised shaders and examples on pi3d_demos develop branch. Tests ok on laptop and RPi4, will check out on other machines.

Thanks JeDy111 for pointing this out and 6by9 and Paeryn for pointing me in the right direction.
by paddyg
Tue Nov 05, 2019 8:54 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Ah, extra confusion of GL v. GLES. My (why?) was really a note to myself to do some more investigation. In order to get rust_pi3d running (essentially the same shaders using the same GL drivers) I had to translate more things than just commenting out the precision in order to be able ...
by Paeryn
Tue Nov 05, 2019 3:24 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

Commenting out the precision lines in pi3d/shaders/std_head_vs.inc and std_head_fs.inc seems sufficient (why?) Because on the RPi4 the highest supported version of GLSL is 1.20 (GL 2.1) and the precision qualifiers weren't added until GLSL ...
by paddyg
Tue Nov 05, 2019 12:37 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

... get the glXCreateContextAttribsARB() to work. But if I fix the shaders it works on the RPi4 (at last!). Commenting out the precision lines in pi3d/shaders/std_head_vs.inc and std_head_fs.inc seems sufficient (why?) but I might as well make it do 'version', 'Texture2D', 'gl_FragColor' and 'varying' ...
by paddyg
Mon Nov 04, 2019 10:03 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

@paeryn yes. I started down that route trying to get the c code (that 6by9 pointed me at) to work with the shader pipeline. On laptop then pi4 and finally hack it to ctypes python. Gratifying that your code snippet matches mine... Apart from it still not rendering... But it will do with further hack...
by Paeryn
Mon Nov 04, 2019 9:34 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

However... pushing the modified code to github.com/tipam/pi3d develop branch I find that it doesn't 'just work' on the RPi. I can get the transparent window but nothing rendered in it! So I will make a non-fixed pipeline version of the C example and ...
by JeDy111
Mon Nov 04, 2019 9:09 pm
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

I have not succeeded in getting it to work. In order to replace the pi3d and the pyxlib python3 modules, I have renamed their folders in /usr/local/lib/python3.x/dist-packages and copied the pi3d and pyxlib folders from https://github.com/tipam/pi3d/archive/develop.zip ...
by paddyg
Mon Nov 04, 2019 10:54 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

... it's not guaranteed to actually put it where you want it! Will do some tests on that. However... pushing the modified code to github.com/tipam/pi3d develop branch I find that it doesn't 'just work' on the RPi. I can get the transparent window but nothing rendered in it! So I will make a non-fixed ...
by JeDy111
Mon Nov 04, 2019 7:52 am
Forum: Graphics programming
Topic: Pi3D transparent background on Pi4
Replies: 72
Views: 3050

Re: Pi3D transparent background on Pi4

\o/ Great! Thanks a bunch paddyg, and also 6by9

Does it use libliftoff?
is it possible to create the display with dimensions and position on the screen? If so, is it in a window?

Looking forward playing with it on a PI4 :D

Go to advanced search