Recent

Author Topic: Dynamically loading SDL2 library  (Read 6885 times)

Imants

  • Full Member
  • ***
  • Posts: 198
Dynamically loading SDL2 library
« on: January 05, 2016, 08:47:23 am »
I created for my own purpose SDL2 library implementation witch can be dynamically loaded at any time. I made it for better or for worse more object oriented. It is most likely Delphi incompatible main reason is because I quit my job and I am not Delphi programmer any more so I do not have access to Delphi. Delphi licence is to expensive for me and I think Lazarus is more than enough :). I only tested this with latest stable Lazarus 1.6RC1 and FPC 3.0.0. It is possible that this project will not compile with previous Lazarus and FPC versions.

If you want to try it out you can find it in
SVN source:
https://xp-dev.com/svn/sdl2.lib/trunk/

direct download:
http://files.inbox.lv/ticket/e023ca5980aef1b65f9cdfc5bba9245ba48fea3e/sdl2-1.0.0.7z

I based my work on this project

  -Delpli implementation of SDL2 header: https://github.com/ev1313/Pascal-SDL-2-Headers
  -SDL2 2.0.3 source code - https://www.libsdl.org/download-2.0.php

What will slit to fallow:
  -SDL_Mixer, SDL_Image, SDL_Net and SDL_ttf implementations
  -Some code examples for those witch are new to SDL2
  -Add new featuures from SDL2-2.0.4
  -bug fixing

It is possible to report bugs here:
https://xp-dev.com/tracking/232197
« Last Edit: January 05, 2016, 10:01:20 am by Imants »

avra

  • Hero Member
  • *****
  • Posts: 2532
    • Additional info
Re: Dynamically loading SDL2 library
« Reply #1 on: January 06, 2016, 10:33:46 am »
I created for my own purpose SDL2 library implementation witch can be dynamically loaded at any time. I made it for better or for worse more object oriented.
Nice work. Using record helpers and operators brings fresh air to C libs ;)
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Imants

  • Full Member
  • ***
  • Posts: 198
Re: Dynamically loading SDL2 library
« Reply #2 on: January 06, 2016, 03:09:11 pm »

I was little surprised but SDL2-2.0.4 was released one or two days before I finished my translations for SDL2-2.0.3.

So now I have translated new featurs and documentation changes for SDL2-2.0.4. Here you can download latest source:

Direct download:
http://files.inbox.lv/ticket/ee7f7b9582969fbb4998e5e757bf2306441f99a8/sdl2-1.1.1.7z

SVN repozitory:
https://xp-dev.com/svn/sdl2.lib/branches/sdl2-1.1

avra

  • Hero Member
  • *****
  • Posts: 2532
    • Additional info
Re: Dynamically loading SDL2 library
« Reply #3 on: January 07, 2016, 08:35:19 pm »
Maybe you could contact site owner to mention your lib/headers next to the others:
http://www.freepascal-meets-sdl.net/chapter-1-introduction/
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Carver413

  • Full Member
  • ***
  • Posts: 119
Re: Dynamically loading SDL2 library
« Reply #4 on: January 08, 2016, 01:01:29 am »
I was wondering if your version contains some of the missing functions like SDL_Free ?

Imants

  • Full Member
  • ***
  • Posts: 198
Re: Dynamically loading SDL2 library
« Reply #5 on: January 08, 2016, 07:10:09 am »
Yes it contains SDL_Free in SDL.StdInc object. If you find some missing functionality then report please here https://xp-dev.com/tracking/232197 and I will take a look

Imants

  • Full Member
  • ***
  • Posts: 198
Re: Dynamically loading SDL2 library
« Reply #6 on: January 13, 2016, 02:03:34 pm »
Today I released new version to mu SDL2Lib.

I added two now packages:
  - SDL2Extended.lpk - where I will put all objects warped around SDL for now it consists of
           * TSDLWindow (wraper around PSDL_Window)
           * TSDL2Application (wraper arround SDL_Events works with TSDLWindow)
           * TSDLStream (wraper arround PSDL_RWops)
  - SDL2lib_Design - where I registered two items to Lazarus "SDL Application" and "SDL Window". This project would serve for new people to SDL easier create they're applications

Also I added support to SDL_Image
And there is some bug fixes and some new type definitions

Direct download:
http://files.inbox.lv/ticket/ee7f7b9582969fbb4998e5e757bf2306441f99a8/sdl2-1.1.1.7z

SVN repozitory:
https://xp-dev.com/svn/sdl2.lib/tags/sdl2-1.1.2

 

TinyPortal © 2005-2018