handmade.network » Forums » Work-in-Progress » FPL - a single header platform abstraction c++ library
Finalspace
26 posts

I am finalspace and do programming since about 25 years, started on the C64 and got serious with borland delphi.

#13642 FPL - a single header platform abstraction c++ library
2 weeks, 3 days ago Edited by on Nov. 30, 2017, 5:31 a.m.

Update
Finally i removed the requirement to link against user32.lib and shell32.lib - all the functions are dynamically loaded properly.
But you still have to link against kernel32.lib thou for calling LoadLibrary.

Also i changed the command line parsing to use "CommandLineToArgvW" instead of my implementation and fixed some critical bugs in other parts.

Including to that i added a working ffmpeg demo which i plan to make a simple player out of it - for testing all functions of the library ;)

v0.4.7 alpha:
  • Changed: [Win32] Load all user32 and shell32 functions dynamically
  • Changed: FPL_ENUM_AS_FLAGS_OPERATORS_INTERNAL requires a int type as well
  • Fixed: MemoryAlignedAllocate and MemoryAlignedFree was broken
  • Added: FPL_IS_ALIGNED macro

v0.4.6 alpha:
  • Fixed: [Win32] Crash when window is not set in the InitFlags but FPL_USE_WINDOW is set.

v0.4.5 alpha:
  • Changed: [Win32] Use CommandLineToArgvW for command line parsing
Finalspace
26 posts

I am finalspace and do programming since about 25 years, started on the C64 and got serious with borland delphi.

#13716 FPL - a single header platform abstraction c++ library
6 days, 19 hours ago Edited by on Dec. 10, 2017, 11:48 a.m.

Milestone Update!

I finally finished a huge milestone -> Audio playback! Hurray!
Also i extended the api a little bit and fixed some major bugs.
Now i can really start to focus on the next platform -> Linux X11/GLX/ALSA.

Last important note:

The asyncronous audio playback system is a stripped port from "mini_al.h" -> A awesome single header file library written by David Reid. So if you need more audio features than fpl provides, i recommend using "mini_al.h" directly.

Here is the full changelists:

## v0.5.0 beta:
- Added: [Win32] DirectSound playback support
- Added: Asyncronous audio playback

## v0.4.11 alpha:
- Fixed: [Win32] For now, load all user32 functions always, even when window is not used (This is to prepare for audio playback)
- Fixed: [Win32] ThreadStop was not releasing the thread handle
- Added: [Win32] ThreadWaitForAny
- Added: [Win32] SignalWaitForAll
- Added: [Win32] SignalWaitForAny
- Added: [Win32] SignalReset
- Added: FPL_NO_VIDEO
- Changed: ThreadWaitForSingle renamed to ThreadWaitForOne
- Changed: ThreadWaitForMultiple renamed to ThreadWaitForAll
- Changed: SignalWait renamed to SignalWaitForOne

## v0.4.10 alpha:
- Removed: Removed all _internal _INTERNAL postfixes from types, functions and macros
- Changed: Proper identitation for compiler directives based on context
- Added: [Win32] Dynamically loading ole32 functions (CoCreateInstance, CoInitializeEx, etc.)
- Fixed: [Win32] GetCursor was not using the dynamic loaded function
- Fixed: [Win32] Missing *Clipboard* dynamic functions

## v0.4.9 alpha:
- Removed: Removed all audio code for now
- Changed: A total cleanup of all internal stuff, so its much easier to add in new features

## v0.4.8 alpha:
- New: AtomicLoadU32, AtomicLoadU64, AtomicLoadS32, AtomicLoadS64, AtomicLoadPtr
- New: AtomicStoreU32, AtomicStoreU64, AtomicStoreS32, AtomicStoreS64, AtomicStorePtr
- New: AtomicExchangePtr, AtomicCompareAndExchangePtr, IsAtomicCompareAndExchangePtr
- New: [Win32] Implementation for AtomicLoadU32, AtomicLoadU64, AtomicLoadS32, AtomicLoadS64, AtomicLoadPtr
- New: [Win32] Implementation for AtomicStoreU32, AtomicStoreU64, AtomicStoreS32, AtomicStoreS64, AtomicStorePtr
- New: [Linux] Implementation for AtomicLoadU32, AtomicLoadU64, AtomicLoadS32, AtomicLoadS64, AtomicLoadPtr
- New: [Linux] Implementation for AtomicStoreU32, AtomicStoreU64, AtomicStoreS32, AtomicStoreS64, AtomicStorePtr
- New: [Win32] Loading of DirectSound (Prepare for audio output support)
- Draft: Added first audio output api
- Fixed: Threading context determination
- Fixed: [Win32] Fixed all thread implementations
- Fixed: [Win32] SetWindowLongPtrA does not exists on X86
- Fixed: [Win32] Missing call convention in SHGetFolderPathA and SHGetFolderPathW
- Changed: Improved header documentation (More examples, better descriptions, proper markdown syntax, etc.)
- Changed: All threading functions uses pointer instead of reference
- Changed: [Linux] Atomic* uses __sync instead of __atomic
- Changed: A bit of internal cleanup