FPL - a single header file platform abstraction library

Started by
36 comments, last by Finalspace 6 years ago

It seems that this library is mostly useless for most people here, but for me its very useful and educational.

Advertisement

A change of mind:

i will drop C support and change it to a more C++ ish api, but it will not be full blown object oriented. Also C runtime support will be dropped as well.

I will definitely have a look at it but as most other people might, I have those platform specific stuff already build into my game engine from the beginning. Platform detection for PC and propably Console, Threads, Locking, Atomics, Extensions (via LoadLibrary and similar) and even a Window class as same as some graphics API dependent startup code

New version:

 

- Dropped C support

- Dropped No-C-Runtime support

- Removed all FPL prefixes from functions and types

- Moved to a more c++ ish api (Namespaces, const reference, enum class, constexpr, nullptr)

- Nested namespaces to categorize certain things (window, memory, strings, atomics, threading, etc.)

You need a reference doc :D

If you add something like this https://github.com/ferreiradaselva/cgdfw/blob/master/REFERENCE.md  it will make things much easier.

On 6.10.2017 at 9:04 PM, ferreiradaselva said:

You need a reference doc

If you add something like this https://github.com/ferreiradaselva/cgdfw/blob/master/REFERENCE.md  it will make things much easier.

Thanks i will do that - good idea!

Is there a way to export all my api structs and functions into that automatically?

Never mind, i will write a command line tool which does that.

Update:

  • Added XInput Support through event structures
  • Changed a lot of pointer arguments to reference or const reference

Monster Update:

  • Added memory::CopyMemory
  • Added fpl::GetLastError and fpl::GetLastErrorCount for proper error handling
  • Added files::CreateBinaryFile and files::OpenBinaryFile for wide file paths
  • Added basic support for creating a modern opengl rendering context, see VideoCompabilityProfile in VideoSettings
  • Added support for enabling opengl vsync through WGL
  • Returns char * for all paths:: get like functions
  • Returns char/wchar_t * for all strings:: functions
  • Fixed files::CreateBinaryFile was never able to overwrite the file.
  • Fixed #include was in some namespaces defined
  • Fixed files::ClearMemory was wrong
  • Replaced all const constants with constexpr
  • Removed template code / Replaced it with macros
     

Update:

  • All types/structs/fields/functions documented
  • [Win32] Fixed legacy opengl (GL_INVALID_OPERATION)
  • [Win32] Support for WGL opengl profile selection

 

Todo:

  • Create full reference.md documentation / upload doxygen documentation.
  • Win32 audio output + api
  • Win32 threading + api
  • Win32 clipboard get/set

Update:

  • Renamed: All memory/library/threading functions
  • Renamed: CopyFile/DeleteFile renamed (Stupid win32!)
  • Renamed: All internal opengl defines renamed, so that it wont conflict with other libraries
  • Fixed: [Win32] strings::All Wide conversions was not working properly
  • Removed: [Win32] All undefs removed
  • Changed: [Win32/OpenGL] Check for already included gl.h
  • Added: Basic threading creation and handling

Todo:

  • Create full reference.md documentation / upload doxygen documentation.
  • Win32 audio output + api
  • Win32 mutex / condition + api
  • Win32 clipboard get/set
  • Linux platform support

This topic is closed to new replies.

Advertisement