Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Releases, updates and announcements from the Ultibo team.
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby Ultibo » Mon Oct 24, 2016 1:54 am

The initial working port of Asphyre / PXL (Platform eXtended Library) is now available on GitHub at https://github.com/ultibohub/Asphyre

Even though this is the initial port it is very complete and almost all features are working already, the source also includes a number of example projects which have been converted to work in Ultibo core and demonstrate some of the features and capabilities available.

What is Asphyre / PXL?
Asphyre / PXL also known as the Platform eXtended Library is a cross-platform framework for developing 2D/3D video games, interactive and scientific applications. The library includes a sophisticated set of classes and functions for drawing and manipulating graphics including shapes, images and fonts, in addition the library includes support for embedded devices like the Raspberry Pi and provides classes to represent UART, SPI, I2C and GPIO devices as well as several types of displays and a range of sensors.

You can find more information about Asphyre / PXL from the website at http://asphyre.net/platformextendedlibrary

Extensive documentation of all of the available classes and functions is also available from http://asphyre.net/pxl/help/

What is supported in the Ultibo port?
Almost everything is supported by the Ultibo port, you can use all of the drawing functions to render and manipulate shapes and images as well as displaying text using the native bitmap fonts and handling a range of standard image file formats. All rendering is done via the software rendering engine in Asphyre / PXL and the output can be sent to any Ultibo framebuffer device so information can be seen on the primary HDMI display or any other supported display like the recently released TFT drivers.

The library also includes a number of display drivers of its own and these can be used in Ultibo as well since the port includes additional classes to support the Ultibo UART, SPI, I2C and GPIO devices.

What is not supported by the Ultibo port?
The most important item that is not yet supported by the Ultibo port of Asphyre / PXL is hardware accelerated graphics using OpenGL or OpenGLES, because of this all rendering is done in software and a small number of functions are currently not implemented by the software rendering such as certain texture objects and some blending effects. Other than those items the entire functionality of the library is available for use in Ultibo and provides a powerful set of drawing capabilities.

It is important to note that without hardware acceleration it will not be possible to render complex images at high frame rates and so games and real time animation will be restricted, however the ability to render high quality graphics on screen including images, fonts and many other effects offers enormous possibilities in creating displays for embedded devices such as graphing and logging, control panel information and visual feedback.

How do I install Asphyre / PXL for use with Ultibo?
Installation of the Asphyre / PXL library is very simple, download the Ultibo version from GitHub at https://github.com/ultibohub/Asphyre and unzip the contents to a folder somewhere on your computer.

There are a number of examples included in the source under \Samples\FreePascal\Ultibo and you can open any one of these directly from the Ultibo version of Lazarus and compile it by selecting Run, Build from the menu. The examples are all created for a Raspberry Pi 2 and will run without change on a Raspberry Pi 3, to convert them to an A/B/A+/B+ or Zero simply create a new project, copy the contents of the example and adjust the appropriate units.

In order to create your own projects using Asphyre / PXL simply add the full path of the \Source folder to the "Other unit files" path under Project options.

What is the future of the Ultibo port of Asphyre / PXL?
We see Asphyre / PXL as one of several quality open source projects that is well suited to using with Ultibo and so we hope this initial port will become part of the official product in future, we are in contact with Yuriy Kotsarenko who is the developer of Asphyre / PXL and he is very positive about supporting Ultibo as part of the library.

How will the Ultibo port of Asphyre / PXL be supported?
If you have questions specific to the Ultibo port then please post them in the the Ultibo forum, if your question relates more specifically to Asphyre / PXL itself then see the Asphyre website for more information on how to obtain answers to your questions.
Ultibo.org | Make something amazing
https://ultibo.org
pjde
Posts: 252
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby pjde » Mon Oct 24, 2016 6:23 am

Looks great. Will definitely be trying it out.

How difficult would it be to include vectored fonts. (i.e. use *.ttf files)

Would be prepared to assist if required.

Regards

Paul
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby Ultibo » Mon Oct 24, 2016 6:30 am

pjde wrote:How difficult would it be to include vectored fonts. (i.e. use *.ttf files)

I'm not sure exactly, the classes are quite well structured and fairly cleanly separated so it might be reasonable to implement a new class or class hierarchy that encapsulates the vector fonts instead.

The person to know for sure would be Yuriy, so far I've only dug deep enough to get the relevant parts connected into Ultibo and provide some additional supporting classes.

All in all it sounds feasible, especially since you've made great progress on getting *.ttf support working already.
Ultibo.org | Make something amazing
https://ultibo.org
dedraks
Posts: 2
Joined: Tue Oct 25, 2016 12:28 am

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby dedraks » Tue Oct 25, 2016 12:29 am

Great news.

When I try to compile the examples, I got "Unit not found" errors.
How can I fix it?
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby Ultibo » Tue Oct 25, 2016 12:52 am

Hi,

dedraks wrote:When I try to compile the examples, I got "Unit not found" errors.

Which unit does it say is not found?

I just did another test and I noticed that adding the path to the \Source folder to the Libraries path doesn't work in Lazarus, you have to add it to Other unit files path under Project options instead.
Ultibo.org | Make something amazing
https://ultibo.org
dedraks
Posts: 2
Joined: Tue Oct 25, 2016 12:28 am

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby dedraks » Tue Oct 25, 2016 12:57 am

Ultibo wrote:Hi,

dedraks wrote:When I try to compile the examples, I got "Unit not found" errors.

Which unit does it say is not found?

I just did another test and I noticed that adding the path to the \Source folder to the Libraries path doesn't work in Lazarus, you have to add it to Other unit files path under Project options instead.

Solved. Thank you.
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby Ultibo » Tue Oct 25, 2016 4:53 am

For anyone trying out the Asphyre / PXL examples for Ultibo you may noticed an "Access Violation" error occurring in Lazarus when you try to save any changes to the Project options, for example after adding the \Source path to the "Other unit files" path.

We have updated the .lpi files for the Ultibo examples and pushed the changes to GitHub so downloading the latest copy of Asphyre / PXL from https://github.com/ultibohub/Asphyre will eliminate the problem.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1003
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby Gavinmc42 » Tue Oct 25, 2016 6:07 am

Much better, compiles but lots of hints and warnings.
Testing on a 3.
Weird HDMI console output, scattered horizontal orange lines.
But images and fonts working.
640x480 of full screen and 1FPS, so not exactly fast ;)

Tested Basic example with rotating Lenna.png, Plasma with Scanline.png.
Interesting, the alpha channel works, 0 - invisible, 255 for Lenna as we remember her ;)
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby Ultibo » Tue Oct 25, 2016 9:57 am

Gavinmc42 wrote:Weird HDMI console output, scattered horizontal orange lines.

That sounds a lot like this one viewtopic.php?f=4&t=331

Gavinmc42 wrote:640x480 of full screen and 1FPS, so not exactly fast ;)

True it's not fast, but very powerful. Stretch, shrink, rotate and otherwise manipulate images, I'm sure there must be uses other than animations.

Gavinmc42 wrote:Interesting, the alpha channel works, 0 - invisible, 255 for Lenna as we remember her ;)

Yes it does, it is of course done in software not hardware but it does work.
Ultibo.org | Make something amazing
https://ultibo.org
captbill
Posts: 48
Joined: Tue Aug 16, 2016 5:47 am

Re: Ultibo port of Asphyre / Platform eXtended Library now on GitHub

Postby captbill » Tue Oct 25, 2016 5:19 pm

All seem to work fine here. The GPIO support looks excellent. Nicely abstracted. Looks like an excellent library choice to start any hardware interfacing, graphics or not.

Seems like all that's needed for implementing a window manager/widgetset too. I know it was designed for a gaming system. Are all the facilities needed for doing static stuff like gui's in place? Is the OpenGl/GPU functionality in the works for Ultibo?

Cross-platform/cross-architecture LCL? Fascinating the possibilities.

All the pieces seem to be coming together nicely.
Last edited by captbill on Wed Oct 26, 2016 2:49 am, edited 1 time in total.

Return to “Ultibo”

Who is online

Users browsing this forum: No registered users and 1 guest