|
wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
|
Screenshots are produced by the built-in wxbgi_export_png_camera_view() and wxbgi_export_png() library functions, which read directly from the OpenGL framebuffer and write a valid PNG file – no OS screenshot tools needed.
examples/cpp/bgi_api_coverage.cpp
Exercises virtually every classic Borland BGI function: circle, arc, ellipse, pieslice, sector, fillpoly, bar3d, drawpoly, outtextxy and more – all rendered into the 2D pixel buffer, identical output on Windows, Linux, and macOS.
examples/cpp/wxbgi_keyboard_queue.cpp
Demonstrates the wxbgi_read_key() / wxbgi_is_key_down() extension API that emulates the classic DOS BGI keyboard queue, including special-key two-byte sequences.
examples/cpp/wxbgi_camera_demo.cpp– left panel
The cam_left camera is a fixed 2D orthographic view looking straight down the Z-axis at the XY plane. The gradient-filled rectangle and cylinder are drawn in world coordinates and projected through this camera. Viewport clipping is active: objects that cross the panel boundary are partially clipped.
examples/cpp/wxbgi_camera_demo.cpp– middle panel
An interactive 2D camera viewport supporting pan (WASD keys), zoom (+/- keys), and rotation (Q/E keys) at runtime. The scene is stored in the DDS and re-projected through cam2d on every frame – panning and zooming do not alter the DDS data, only the camera transform.
examples/cpp/wxbgi_camera_demo.cpp– right panel
A full perspective camera (fovY = 60 deg) orbiting the scene using arrow keys to change azimuth and elevation. The same DDS scene that drives the two 2D views is re-projected through this camera, demonstrating that the DDS is a single source of truth for all views simultaneously.
Full 1440 x 480 window
All three camera viewports side-by-side in a single window: fixed 2D ortho (left), interactive 2D (centre), and 3D perspective (right). Viewport dividers and panel labels are drawn in pixel space on top of the DDS renders.
examples/cpp/wxbgi_openlb_live_demo.cpp

Demonstrates the new non-blocking solver-view pattern for OpenLB-style usage: the simulation loop stays in control, wxbgi_field_draw_scalar_grid() renders the false-colour scalar field, wxbgi_field_draw_vector_grid() adds decimated vector arrows, and wxbgi_field_draw_scalar_legend() draws the live legend.
examples/cpp/wxbgi_set_operations_demo.cpp

This shaded capture summarizes the current retained composition status:
All of these are retained DDS nodes created from source-object IDs and replayed through wxbgi_render_dds().
Same scene in wireframe mode

The wireframe capture is useful for validating retained composition semantics:
After building the project:
The utility renders each camera view through wxbgi_render_dds(), then calls wxbgi_export_png_camera_view() (and wxbgi_export_png() for the composite) to write PNG files directly into the docs/images/ folder.