SimpleGraphic.dll
is the host environment for Lua.
It contains the API used by the application's Lua logic, as well as a
2D OpenGL ES 2.0 renderer, window management, input handling, and a
debug console.
It exports one symbol, RunLuaFileAsWin
, which is passed a
C-style argc/argv argument list, with the script path as argv[0]
.
The Windows-specific code is contained in 5 files:
win\entry.cpp
: Contains the DLL export It just creates the system main module, and runs itengine\system\win\sys_main.cpp
: The system main module. It initialises the application, and contains generic OS interface functions, such as input and clipboard handlingengine\system\win\sys_console.cpp
: Manages the debug console window that appears during the program's initialisationengine\system\win\sys_video.cpp
: Creates and manages the main program windowengine\system\win\sys_opengl.cpp
: Initialises OpenGL
SimpleGraphic.dll
is currently built using Visual Studio 2022 for 64-bit.
The DLL depends on a number of 3rd-party libraries, all provided either as
direct submodules and built by the main CMakeLists.txt
file or built from
ports in the vcpkg
submodule as part of the build process.
The build process will also build the lcurl
and lzip
Lua extensions
against the same LuaJIT version as the DLL is built with.
A short guide on building and debugging the DLL is available in CONTRIBUTING.md.
The INSTALL
target will deploy the DLL, its dependencies and the VC++
runtime to the installation directory.
Since SimpleGraphic.dll is dynamically loaded by PathOfBuilding.exe
,
to debug it, run PathOfBuilding.exe
and then attach to that process using the
"Debug" > "Attach to Process..." menu option in Visual Studio.
Visual Studio can also be configured to start the Path of Building executable when debugging a target which troubleshooting of early startup.
Runtime and utilities:
- LuaJIT - fast Lua fork with JIT compilation that has diverged from upstream Lua at version 5.1
- curl - very common HTTP library, exposed to Lua
- fmtlib - modern string formatting
- libsodium - friendly cryptographic primitives, used in SimpleGraphic for fast hashing
- pkgconf - part of the build process to locate builds of bundled libraries
- re2 - regex library
Graphics:
- GLFW - multi-platform windowing library for OpenGL (and other APIs)
- ANGLE - OpenGL ES runtime from Google built on top of native rendering APIs
- Glad 2 - OpenGL header generator
Compression and image formats:
- stb - single-header libraries for many things, here image reading and writing
- giflib - GIF loading/saving
- libjpeg-turbo - JPEG loading/saving
- libpng - PNG loading/saving
- liblzma - LZMA compression/decompression
- zlib - zlib compression/decompression
For 3rd-party licences, see LICENSE. The licencing information is considered to be part of the documentation.