OpenVG- baremetal VG

Anything and everything about programming graphics with Ultibo
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Mon Jul 09, 2018 7:25 am

Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Mon Feb 25, 2019 6:57 am

Found some tutorials, yippee
https://www.amanithvg.com/

When you want to use something like this.

Code: Select all

procedure VGShapesFillRadialGradient(cx,cy,fx,fy,radius:VGfloat;stops:PVGfloat;ns:Integer);     

it helps if you know what those variables refer to.

I won't tell you how long i looked for a FPC GUI/UI library :oops:
Turns out OpenVG UI's is simple enough with the VGshapes stuff we already have.
PDA UI has been started ;)
Need to wrap the buttons up into scaling objects.
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Sat Mar 02, 2019 11:55 am

Broke my Wine version on Linux and my Linux version I think.

Having path issues but found something interesting, not sure if it is a bug or feature.
Going to make a Pi install version to confirm.
OpenVG coding does not need the Raspberrypi/2/3 unit, I get no console but the VC4 stuff still works.
Console is Arm based, OpenVG is VC4 based?

Get an LCD for console and OpenVG HDMI.
A SPI screen could be used for debug or second screen under Arm control?

Can I use the OpenVG as a boot console instead of the Arm based framebuffer?
This code is normally used to write stuff to the console screen

Code: Select all

ConsoleWindowWriteLn(WindowHandle,'Starting Hello VG');   

Is there a similar way to write it via accelerated VC4 OpenVG?

Linux X11 has the feature of multiple desktop screen and ctrl/alt/F1 and ctrl/alt/F7 switch between console and gui
User avatar
Ultibo
Site Admin
Posts: 2185
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: OpenVG- baremetal VG

Postby Ultibo » Sat Mar 02, 2019 10:54 pm

Gavinmc42 wrote:OpenVG coding does not need the Raspberrypi/2/3 unit, I get no console but the VC4 stuff still works.

That's by design, the VC4 and VCHIQ drivers don't require anything from the BCM270X unit so they work even if no framebuffer or console device is available.

Gavinmc42 wrote:Console is Arm based, OpenVG is VC4 based?

Yes that's correct.

Gavinmc42 wrote:Can I use the OpenVG as a boot console instead of the Arm based framebuffer?

In theory there would be nothing stopping anyone from creating an OpenVG console device driver for Ultibo which would make the standard console API (ConsoleWindowWriteLn etc) from outputting to OpenVG instead of the framebuffer.

As long as the underlying device can accept text, colors, shapes etc then it should be possible, even the 16x2 LCD driver is actually a console device.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Sun Mar 03, 2019 1:12 am

In theory there would be nothing stopping anyone from creating an OpenVG console device driver for Ultibo which would make the standard console API (ConsoleWindowWriteLn etc) from outputting to OpenVG instead of the framebuffer.


Cool, make a Command Line Interface with accelerated font support.
I have a Klingon font pack somewhere :lol:

Anyway my Ultibo Pi is up and running.
Does the UltiboInstaller.sh get the latest core, rtl, units and examples etc?
I don't see a 3A+ config option.
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Sun Mar 03, 2019 1:47 am

Found the bug fix
viewtopic.php?f=14&t=524&p=3128&hilit=globaldefines#p3128
This happened on all three of my Ultibo installs so I suspected I had not broken the include paths.
A search found the fix.
Then I got this error
lan78xx.pas(1414,88) Error: Identifier not found "ETHERNET_MIN_PACKET_SIZE"
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Sun Mar 03, 2019 2:25 am

Just ignore this until I figure out a repeatable fault.
I went back to my industrial clock code and it gives me console on boot and then the OpenVG clock.
At the moment I am now just getting the 4 colour big pixel with my Steampunk code.
I will slowly add the SP code to the clock code and see if it breaks.
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Sun Mar 03, 2019 3:09 am

I now suspect it is SD card related, dragged out old rocksolid 2GB card, the Shapesdemo worked fine.
The 16GB card has issues when I tried to use a jpg wallpaper, just sat there not reading the card, but it has two partitions
Time for lunch, will confirm with other cards.
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: OpenVG- baremetal VG

Postby Gavinmc42 » Sun Mar 03, 2019 5:54 am

Broken wine version of Ultibo and a dying SD card.

As long as this is first, one line of code makes for a desktop wallpaper ;)

Code: Select all

 VGShapesImage(0,0,1280,1024,'Nautalis.jpg');

Probably a way to make it autoscale to any screen size?
User avatar
Ultibo
Site Admin
Posts: 2185
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: OpenVG- baremetal VG

Postby Ultibo » Sun Mar 03, 2019 11:23 pm

Gavinmc42 wrote:Does the UltiboInstaller.sh get the latest core, rtl, units and examples etc?

Yes, the installer script always downloads the latest source from GitHub.

Gavinmc42 wrote:I don't see a 3A+ config option.

We haven't added an RPI3A target controller option to FPC yet but we will on the next release, it will just be an alias for RPI3B anyway so if you choose that it will always work.

We did update the new project descriptions etc to include the 3A+ but we missed one file (now updated).
Ultibo.org | Make something amazing
https://ultibo.org

Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 0 guests