|
wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
|
wx_BGI_Graphics is a cross-platform shared library that keeps the classic Borland BGI programming model usable on modern systems by implementing the API on top of OpenGL, GLFW, GLEW, and wxWidgets.
It is designed for programmers who want a simple graphics API for C, C++, Pascal, Python, and similar environments, while still gaining access to modern features such as retained scenes, multiple cameras, world coordinates, 3D solids, embedded wxWidgets canvases, and optional OpenLB-oriented live viewing.
src/wx_bgi.hsrc/wx_bgi_ext.hsrc/wx_bgi_3d.hsrc/wx_bgi_dds.hCore dependencies used by the project:
| Dependency | Purpose |
|---|---|
| GLFW 3.4 | Standalone windowing and OpenGL context creation |
| GLEW 2.2.0 | OpenGL extension loading |
| GLM 1.0.1 | Camera, UCS, and transform math |
| wxWidgets 3.2.5+ | Embedded canvas and default windowed backend |
| nlohmann/json | DDS JSON serialization |
| yaml-cpp | DDS YAML serialization |
| Manifold | Exact retained 3D boolean evaluation |
Most C/C++ dependencies are fetched automatically by CMake. Optional external tools include Doxygen, LaTeX/MiKTeX, FreePascal, and Python 3.
The documentation is organized into two main hierarchies.
Start here if you want to build the library, run it, and use its public features in applications.
Start here if you want to understand how the project is built, how the major subsystems are organized, how tests are structured, and how the docs pipeline is generated.
| Header | Purpose |
|---|---|
src/wx_bgi.h | Classic BGI C API |
src/wx_bgi_ext.h | Modern wxbgi_* extension helpers |
src/wx_bgi_3d.h | Cameras, UCS, world-coordinate drawing |
src/wx_bgi_dds.h | Retained DDS/CHDOP scene graph |
src/wx_bgi_openlb.h | OpenLB live-loop helpers and DDS material-query bridge entry points |
src/bgi_types.h | Shared types, structs, and constants |
The repository now supports DDS external attributes plus material-query helpers for OpenLB-oriented workflows. A DDS-only preview demo is included and works in the standard build. A real OpenLB-coupled smoke target is also wired when WXBGI_ENABLE_OPENLB=ON, but the current public OpenLB release does not compile cleanly under native Windows/MSVC in this environment, so full coupled validation currently requires a Linux, macOS, or WSL-style toolchain.
See ScreenShots.md for example output and reference images from the current demos.