Go to advanced search

by paddyg
Sun Sep 15, 2019 8:35 pm
Forum: Python
Topic: import variables and change and save.
Replies: 3
Views: 103

Re: import variables and change and save.

You can pickle data very easily, or just read/write json to files, or use sqlite. Lots of info online for all these.
by paddyg
Sun Sep 08, 2019 11:24 am
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 203
Views: 34551

Re: Image viewer with transition between images

@sunilammanabrolu it's *so* frustrating not being able to get applications to run simply when the computer boots. There are so many alternatives and even more critical variables! When @saphno and I were ironing out some issues with the RPi4 and getting pi3d to use the new graphics driver, we noticed...
by paddyg
Sat Sep 07, 2019 9:13 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 203
Views: 34551

Re: Image viewer with transition between images

Here's a copy of the PictureFrame.py app using exif rotation. #!/usr/bin/python from __future__ import absolute_import, division, print_function, unicode_literals ''' Simplified slideshow system using ImageSprite and without threading for background loading of images (so may show delay for v large i...
by paddyg
Sat Sep 07, 2019 5:22 pm
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 203
Views: 34551

Re: Image viewer with transition between images

OK @ sunilammanabrolu I'll have a look at it tonight if I get chance. As I say, I don't think it's too hard to do (famous last words eh!) but it should logically go into the Texture class, so maybe I'll look at doing that in the next pi3d release (and stick some of the other exif data in there as we...
by paddyg
Thu Sep 05, 2019 10:10 am
Forum: General discussion
Topic: Image viewer with transition between images
Replies: 203
Views: 34551

Re: Image viewer with transition between images

@SohKahToa, Blurring is possible with shaders, as used in the Blur.py demo but that's a two stage process: render the scene then use the depth info to redraw each Shape with a variable amount of blur. Also it's rather complicated for your application, so what I think I would do is use the PIL blur, ...
by paddyg
Fri Aug 23, 2019 7:38 pm
Forum: Python
Topic: STICKY: [announcement] python 2 end of life
Replies: 14
Views: 1223

Re: python 2 end of life

Sadly I don't think there is a simple solution. And the RPi approach is really "everyone's a command line user", even very basic tutorials start out with "open a terminal and type..." followed by possible misapplication of pip v. pip3 or python-xmodule v. python3-xmodule etc etc. Maybe what's needed...
by paddyg
Fri Aug 23, 2019 11:27 am
Forum: Python
Topic: STICKY: [announcement] python 2 end of life
Replies: 14
Views: 1223

Re: python 2 end of life

I posted on the topic a while ago with a rather hyperbolic title including the word 'emergency'. However I do think that something more proactive is needed beyond warnings. Most people starting to program will just use 'python' without worrying about the finer points. I think the maintainers of rasp...
by paddyg
Sun Aug 18, 2019 9:02 am
Forum: Python
Topic: Pi3D
Replies: 244
Views: 37825

Re: Pi3D

Yes python is quick and forgiving for just checking things out. Errors in GLSL code are quite hard to track down - often there's no error message at all! I've found that the the GL driver on the RPi4 is more of a stickler for the letter of the law than the equivalent on my laptop. So after getting t...
by paddyg
Thu Aug 08, 2019 10:34 am
Forum: Python
Topic: How do i debug my code of python 3.5 ?
Replies: 6
Views: 309

Re: How do i debug my code of python 3.5 ?

Well I'm still not *completely* sure what you mean because I can't see your circuit to determine whether high or low turns the led on, but, assuming that by "condition satisfied" you mean "abs(rbuff[0] - temp) <= 2" I might approach it like this LED_TM = 10 led_state = False last_led_state = False l...
by paddyg
Tue Aug 06, 2019 8:32 am
Forum: Python
Topic: How do i debug my code of python 3.5 ?
Replies: 6
Views: 309

Re: How do i debug my code of python 3.5 ?

Hi, I'm not sure if this helps but here's your code with non-essentials and duplication stripped away. It doesn't make much sense to me as I don't know what you are trying to do! if flag == 4 and count == 28: ser.write(rbuff) lcd_string(str(rbuff), LCD_LINE_2, 2) count = 0 flag = 0 pin18 = GPIO.LOW ...
by paddyg
Sat Jul 27, 2019 1:14 pm
Forum: Python
Topic: seeking 2D graphics engine for Python
Replies: 10
Views: 474

Re: seeking 2D graphics engine for Python

Following from my initial suggestion I tried building https://github.com/mickelson/sfml-pi following the README I don't know if it works as I haven't installed anything that might use it (examples and tests a bit unclear) @aardvarkkrill could try this with their existing projects and see if it works...
by paddyg
Fri Jul 26, 2019 9:21 pm
Forum: Python
Topic: seeking 2D graphics engine for Python
Replies: 10
Views: 474

Re: seeking 2D graphics engine for Python

Just checking that you selected the fake kms graphics driver and ran it with x11 server up? The code in the link you posted won't work if it thinks it's running on the RPi (if it's RPi4 as it loads libbcm.so) but if you can make it think you're running on linux x11 system it probably possibly will (...
by paddyg
Fri Jul 26, 2019 11:20 am
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

I understood that it is possible to not use X see https://www.raspberrypi.org/forums/view ... 8&t=243707 using kmscube but the prospect of making all that C code usable from python or Rust isn't very appealing!
by paddyg
Fri Jul 26, 2019 10:24 am
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

fps_pivot.jpg Here are some comparisons. The RPi4 is always faster (apart from PictureFrame_new from the desktop - TODO check why!?) and generally on the older RPis it's a bit, or much , faster to use the old bcm driver and not run X11 if that's possible. However I've not tried setting up a system ...
by paddyg
Tue Jul 23, 2019 8:15 am
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

I think Tim has. It will probably run as is without recompiling as it hangs off SDL2 and loads the GL drivers at start. Certainly my Rust version "just worked" (there is no point or line rendering in that demo!). I will check out the FPS later. It might make more difference to Tim's version as it ha...
by paddyg
Mon Jul 22, 2019 1:45 pm
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

Gavin, I pushed the revised Rust version to github last night. Seems to whiz along on the RPi4. Also added the missing assets from my version of Tim Skillmans ship_demo. PeterO, I'm not sure about the documentation in the gl crate or how much hasn't been implemented, as I really just took the pi3d c...
by paddyg
Mon Jul 22, 2019 12:58 pm
Forum: Graphics programming
Topic: Documentation for VC6
Replies: 46
Views: 3197

Re: Documentation for VC6

When I posted my plea for help getting RPi4 point and lines drawing working on stackoverflow Eric did reply pretty promptly so that was reassuring. Didn't help me solve the issue though..
by paddyg
Sun Jul 21, 2019 7:14 am
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

Yes that's exactly the reason (CW triangles as opposed to CCW). At some point in the past (I like to think before I was involved) the meshes in pi3d got defined as clockwise => forward but with matching normal vectors so was self consistent. At a later stage, the (probably my) hack to improve render...
by paddyg
Sat Jul 20, 2019 7:34 pm
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

Hi, found the problem. It was the line

Code: Select all

glCullFace(GL_FRONT)
which I set as standard at the start of pi3d but which seems to stop rendering points and lines only on Raspberry Pi 4 - not sure if it's a feature!
Phew.. now I need to update pi3d and push out the next version.

Paddy
by paddyg
Sat Jul 20, 2019 8:01 am
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

Gavin, thanks for that. I've also narrowed the problem down to something I've caused . I've tested using the PyOpenGL module and see that points and lines render fine ( see my github ). I now have to work my way through and see where the fault is :( - probably a type that's wrong, or defaults to som...
by paddyg
Fri Jul 19, 2019 12:32 pm
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

Gavin, thanks for testing this, it narrows the problem down to something to do with the way I'm rendering! glPointSize isn't available in OpenGLES so I glEnable(GL_PROGRAM_POINT_SIZE) to avoid having conditional bits of code depending on the machine it's running on. However If I load the OpenGL driv...
by paddyg
Thu Jul 18, 2019 9:51 pm
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

Update: here's some minimal code to show the problem https://github.com/paddywwoof/test_rpi4 and here's a video of it running on different machines https://youtu.be/eyDMb4VVIgk It's probably something obvious but I can't spot it!
by paddyg
Sun Jul 14, 2019 11:40 am
Forum: OpenGLES
Topic: OpenGL on Buster on both Pi 3 and Pi 4
Replies: 68
Views: 9052

Re: OpenGL on Buster on both Pi 3 and Pi 4

@Brian_Beuken, is the screen shot above from the RPi4? I can't get lines or points to render so I would be keen to see how you are doing it, if the code is available to view somewhere.

Paddy
by paddyg
Sun Jul 14, 2019 11:34 am
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

Thanks. The GL_POINTS drawing works pretty well apart from on the RPi4, though I did have to add a couple of tweaks to get the rust code to draw points (that were bigger than 1px). Basically had to glEnable(GL_PROGRAM_POINT_SIZE) and glEnable(GL_POINT_SPRITE) also I had to specify #version 120 in th...
by paddyg
Sun Jul 14, 2019 8:20 am
Forum: OpenGLES
Topic: RPi4 Problem drawing GL_POINTS anyone?
Replies: 30
Views: 3034

Re: RPi4 Problem drawing GL_POINTS anyone?

gavin, pik, thanks. My code seems to work fine as far as I can see (After switching libbcm to libX11. All tests run, appearance is good and speed is a bit faster) but no points or lines. As I said, the same code works on previous RPis as well as linux and windows x86. I suppose I'm specifically look...

Go to advanced search