I present to you the first version of the multimedia library developed by me Little DirectMedia Layer, abbreviated as LDL.
The library is written in C++98 standard, allowing it to be compiled starting from Visual C++ 6.0. The code is distributed under the terms of the Boost Software License 1.0. However, the library does not limit programmers in their choice of C++ language standard; they can use any modern standard. I adhere to the philosophy of downgradeāthis is the use of old devices and software in everyday life, when companies no longer support their own āobsoleteā operating systems or devices, increasing system requirements with every new version of their products, or stopping support for the device altogether. Billions of devices around the world process billions of instructions of unoptimized code every second.
This year, I presented at the C++ 2023 conference with a talk āBack to the Future, or Developing a Framework for Windows 95 in 2023ā.
With my project, I want to prove that old hardware can still be useful and that it's too early to discard it. Thereās something enchanting about old technologies, approaches, and devices, and itās also a challenge to new libraries and programs.
At the very beginning of the development process, I didnāt even imagine that this library was possible at all. But in the practical implementation of the prototype, adding line by line to the foundation of the future library, I became convinced of its feasibility and practical application.
In summary, it is possible to write fast programs; you just need to leverage the knowledge of the ancients.
Library capabilities:
- support for Linux Debian 3 and above (native build provided);
- support for Windows 95 to Windows 11;
- simple API for working with 2D graphics;
- loading multiple graphic formats (bmp, png, tga, jpg);
- cross-platform API over OS windows and events;
- for hardware acceleration of graphics, OpenGL 1.2 and
- OpenGL 3.3 are used, with support for CPU-only graphics processing if hardware acceleration is absent;
- the renderer can be dynamically selected when loading the application;
- a unified API for all systemsāwrite once and compile everywhere!
- audio playback;
- dynamic and static linking.
Future plans:
- streaming audio playback;
- text output with support for the freetype library;
- additional Direct3D 9, 10, 11 renderers;
- API for stream processing;
- built-in API support for network operations;
- porting the framework to other platforms: Android, iOS, MacOS.
Links:
- Project repository with build instructions
- Program examples
- Presentation of the report
- Previous discussion on LOR
Source: linux.org.ru
