GLBasic forum

Main forum => GLBasic - en => Topic started by: WPShadow on 2017-Jul-10

Title: GLBasic and RaspberryPi
Post by: WPShadow on 2017-Jul-10
Hi,

I'm working on a little program for my girlfriend, so I built up a Raspberry PI with a 3.5" TFT.

Now I tried to start the software but I only get a yellow display (the background should be white) on the Raspberry.

Pictures are not working, text is working.

Do you have any experience with something like this?

W.
Title: Re: GLBasic and RaspberryPi
Post by: Ian Price on 2017-Jul-10
IIRC Matchy got stuff working on the Pi. I'm not sure if anyone else has tried.
Title: Re: GLBasic and RaspberryPi
Post by: WPShadow on 2017-Jul-10
I fixed the problem.

There was an driver issue and also a problem with the media path. Now it works.

I try to make an mobile tamagotchi for my girlfriend. Battery pack, a raspberry pi 3 b and a 3.5" tft and it works now.

Title: Re: GLBasic and RaspberryPi
Post by: Ian Price on 2017-Jul-10
Sounds cool. Don't forget to post your progress :)
Title: Re: GLBasic and RaspberryPi
Post by: WPShadow on 2017-Jul-10
Here is the first screenshot

It will take a few days to make more, but at the moment this works fine
Title: Re: GLBasic and RaspberryPi
Post by: erico on 2017-Jul-11
nice!
Title: Re: GLBasic and RaspberryPi
Post by: r0ber7 on 2017-Jul-11
Quote from: WPShadow on 2017-Jul-10I try to make an mobile tamagotchi for my girlfriend.

Awww!  <3
Title: Re: GLBasic and RaspberryPi
Post by: matchy on 2017-Jul-12
Great!  8) I haven't tested GLBasic on my second Raspberry Pi Zero W with 2.5"tft yet.
Title: Re: GLBasic and RaspberryPi
Post by: WPShadow on 2017-Jul-16
I've got big troubles with GLBasic on Raspbian.

The fullscreen window is losing focus, so the input is running in the background, it isn't possible to us the PRINT - command, because the positioning isn't working, so every single text is in the upper left corner, the texts are yellow and changing their colors, drawrect isn't working and if it works (50% chance) the colors are inverted...

I'm not sure if I'm possible to finish a bigger project with all this troubles.
Title: Re: GLBasic and RaspberryPi
Post by: Ian Price on 2017-Jul-17
Have you tried using a bitmap font function for text and POLYVECTORs instead of DRAWRECT?

Both are simple routines. If they work on the Pi, then problem solved.
Title: Re: GLBasic and RaspberryPi
Post by: WPShadow on 2017-Jul-17
atm I use POLYVECTOR.

That isn't my biggest issue.

The bigger problem is, that I try to fix the focus. I start the program on the linux desktop (raspbian). Now I can see the program running, but the input is still on the desktop. So I try to move the mouse but I'm starting things in the background. The program is fullscreen but the input isn't there.

And atm I'm not able to start it via console because I've troubles with the touchscreen input in the console.  :D
Title: Re: GLBasic and RaspberryPi
Post by: Ian Price on 2017-Jul-17
Have you looked at 'GLB_ON_PAUSE' and 'GLB_ON_RESUME'?
Title: Re: GLBasic and RaspberryPi
Post by: WPShadow on 2017-Jul-17
not really. I guess you are right.

I should set "AUTOPAUSE FALSE", perhaps that could fix the problem.

I also will test an other thing I found in an other forum:

QuoteSet the "Lines" mode to "full" (screen) and the video mode to "full" or "refresh" to play video full screen and not inside the window. These settings can be pre-configured. The window covers the whole screen and contact to keyboard commands cannot be lost.

With this two changes it should work
Title: Re: GLBasic and RaspberryPi
Post by: dreamerman on 2017-Jul-17
For drawrect You are using polyvector with custom texture or this trick? (check both)
Code (glbasic) Select
STARTPOLY -1, 2