Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Porting LibAlleg to new Platform

This thread is locked; no one can reply to it. rss feed Print
Porting LibAlleg to new Platform
CodeforEvolution
Member #16,626
January 2017

I wondering though how would one port liballegro5 to a new platform, is there dummy code to start with or any functions that are implemented first? ???

SiegeLord
Member #7,827
October 2006
avatar

There are two basic steps you need to do (aside from the build system support):

1. Define _al_register_system_interfaces function which registers the interfaces your platform supports.

2. Implement ALLEGRO_SYSTEM_INTERFACE with the various functions for display handling etc.

A pretty simple example to follow would be the RaspberryPi interface (although it primarily piggy-backs on the existing Linux functionality), which you can find in src/raspberrypi.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Elias
Member #358
May 2000

If your platform already supports SDL2, there also is an SDL2 driver of Allegro. (It also could serve as example, it entirely piggybacks on SDL2 to do everything.)

--
"Either help out or stop whining" - Evert

CodeforEvolution
Member #16,626
January 2017

Thanks! ;D I will look with both of those ideas.

Felix-The-Ghost
Member #9,729
April 2008
avatar

PS4 port plzkthx ;D

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Rodolfo Lam
Member #16,045
August 2015

That actually might raise awareness of the library!

Are you willing to contact Sony to acquire the development licence to develop Allegro there? Someone needs to start the port ;D

Go to: