SDL

Anything and everything about programming graphics with Ultibo
pjde
Posts: 444
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: SDL

Postby pjde » Thu Oct 12, 2017 2:25 am

I have downloaded and installed CMake version 3.10.0-rc1 and copied a sample ultibo makefile across which I plan to adapt.

What is the actual command line required to start the compilation going?

Regards

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

Re: SDL

Postby Ultibo » Thu Oct 12, 2017 2:38 am

pjde wrote:What is the actual command line required to start the compilation going?

In the root of the SDL sources the file INSTALL.txt says:

Code: Select all

To compile and install SDL:

        Using Cmake:
        * Read docs/README-cmake.md

And in docs/README-cmake.md it says:

Code: Select all

Assuming the source for SDL is located at ~/sdl

    cd ~
    mkdir build
    cd build
    cmake ../sdl

This will build the static and dynamic versions of SDL in the ~/build directory.

You also want to pass to cmake the name of the toolchain file to use and probably a define to allow detecting Ultibo in the cmake configuration, using the buildme.armv?-ultibo files in Userland as a guide then the above would be modified to something like this:

Code: Select all

cmake -DULTIBO=TRUE -DCMAKE_TOOLCHAIN_FILE=../sdl/armv7-ultibo.cmake ../sdl
Ultibo.org | Make something amazing
https://ultibo.org
WTW
Posts: 5
Joined: Fri Apr 26, 2019 9:37 pm

Re: SDL

Postby WTW » Fri Apr 26, 2019 10:01 pm

Hello @ultibo,
can i have a .zip folder with SDL for "Lazarus Ultibo Edition"?
User avatar
Ultibo
Site Admin
Posts: 2280
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: SDL

Postby Ultibo » Sat Apr 27, 2019 12:05 am

WTW wrote:Hello @ultibo,
can i have a .zip folder with SDL for "Lazarus Ultibo Edition"?

Hi WTW, welcome to Ultibo.

We don't actually have a version of SDL for Ultibo yet, the post above was simply to show user pjde how to get started with trying to compile it. Porting of the SDL library to support the Ultibo interfaces (threads, timers, video, filesystems etc) would also need to be done to allow integration of the SDL funtionality with the Ultibo kernel.

This should be something that is achievable since SDL has support OpenGLES rendering but it hasn't been done yet as far as we know.
Ultibo.org | Make something amazing
https://ultibo.org
WTW
Posts: 5
Joined: Fri Apr 26, 2019 9:37 pm

Re: SDL

Postby WTW » Sat Apr 27, 2019 10:02 am

All right, too bad. maybe soon.
pjde
Posts: 444
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: SDL

Postby pjde » Sun Apr 28, 2019 5:35 am

If you want to try to incorporate SDL2 into Ultibo :-

1) Probably the best source repo is https://github.com/maccasoft/raspberry-pi/tree/master/SDL2
2) I found it a lot easier to "make" this on a linux / pi operating system rather than Windows (I used Stretch/Pixel). You also need to install the arm-none-eabi chain onto the pi.
3) You need to add the line typedef unsigned int uint; into most files to stop compile errors. I did managed to compile and run the game (abbaye) demo.
4) You then need to remove / disable / modifiy all the USB references.
5) You need to track down some suitable pascal header files on the net.
6) And have a lot of patience.

Regards

Paul

Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 0 guests