|
wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
|
#include <array>#include <cstdint>#include <memory>#include <queue>#include <string>#include <unordered_map>#include <vector>

Go to the source code of this file.
Data Structures | |
| struct | bgi::arccoordstype |
| struct | bgi::BgiState |
| struct | bgi::Camera3D |
| 3-D camera definition (Z-up, right-handed world coordinate system). More... | |
| struct | bgi::ColorRGB |
| struct | bgi::CoordSystem |
| A named user coordinate system (UCS). More... | |
| struct | bgi::fillsettingstype |
| struct | bgi::GlLineVertex |
| One vertex in a GL depth-tested line batch (world-space, 6 floats). More... | |
| struct | bgi::GlVertex |
| One vertex in a GL solid triangle batch (world-space, 9 floats). More... | |
| struct | bgi::ImageHeader |
| struct | bgi::LightState |
| Lighting parameters used by the GL Phong shading passes. More... | |
| struct | bgi::linesettingstype |
| struct | bgi::MouseClickEvent |
| struct | bgi::OverlayGridState |
| State for the reference grid overlay. More... | |
| struct | bgi::OverlayUcsAxesState |
| State for the UCS axes overlay. More... | |
| struct | bgi::palettetype |
| struct | bgi::PendingGlFrame |
| Per-camera GL frame queued by wxbgi_render_dds() in wxEmbedded mode. More... | |
| struct | bgi::PendingGlRender |
| Geometry accumulated for a single wxbgi_render_dds() call. More... | |
| struct | bgi::textsettingstype |
| struct | bgi::viewporttype |
| struct | bgi::WorldExtents |
| Axis-aligned bounding box (AABB) representing the programmer's declared drawing extents in world space. More... | |
Namespaces | |
| namespace | bgi |
Macros | |
| #define | BGI_API extern "C" |
| #define | BGI_CALL |
Input default-behavior flags | |
Bitmask constants for Combine with bitwise OR; pass | |
| #define | WXBGI_DEFAULT_ALL 0x0F |
| All default behaviors enabled (initial state after initwindow). | |
| #define | WXBGI_DEFAULT_CURSOR_TRACK 0x02 |
| Cursor tracking: cursorPosCallback writes mouseX / mouseY / mouseMoved. | |
| #define | WXBGI_DEFAULT_KEY_QUEUE 0x01 |
| Key-code queuing: keyCallback updates keyQueue + charCallback queues chars. | |
| #define | WXBGI_DEFAULT_MOUSE_PICK 0x04 |
| Mouse-button picking: mouseButtonCallback calls overlayPerformPick(). | |
| #define | WXBGI_DEFAULT_NONE 0x00 |
| All default behaviors disabled. | |
| #define | WXBGI_DEFAULT_SCROLL_ACCUM 0x08 |
| Scroll accumulation: scrollCallback accumulates scrollDeltaX / scrollDeltaY. | |
Navigation and function key codes | |
Named constants for keyboard keys, matching GLFW values for hook callback compatibility. Use with | |
| #define | WXBGI_KEY_APOSTROPHE 39 |
| #define | WXBGI_KEY_BACKSPACE 259 |
| #define | WXBGI_KEY_COMMA 44 |
| #define | WXBGI_KEY_DELETE 261 |
| #define | WXBGI_KEY_DOWN 264 |
| #define | WXBGI_KEY_END 269 |
| #define | WXBGI_KEY_ENTER 257 |
| #define | WXBGI_KEY_EQUAL 61 |
| #define | WXBGI_KEY_ESCAPE 256 |
| #define | WXBGI_KEY_F1 290 |
| #define | WXBGI_KEY_F10 299 |
| #define | WXBGI_KEY_F11 300 |
| #define | WXBGI_KEY_F12 301 |
| #define | WXBGI_KEY_F2 291 |
| #define | WXBGI_KEY_F3 292 |
| #define | WXBGI_KEY_F4 293 |
| #define | WXBGI_KEY_F5 294 |
| #define | WXBGI_KEY_F6 295 |
| #define | WXBGI_KEY_F7 296 |
| #define | WXBGI_KEY_F8 297 |
| #define | WXBGI_KEY_F9 298 |
| #define | WXBGI_KEY_HOME 268 |
| #define | WXBGI_KEY_INSERT 260 |
| #define | WXBGI_KEY_LEFT 263 |
| #define | WXBGI_KEY_LEFT_BRACKET 91 |
| #define | WXBGI_KEY_MINUS 45 |
| #define | WXBGI_KEY_PAGE_DOWN 267 |
| #define | WXBGI_KEY_PAGE_UP 266 |
| #define | WXBGI_KEY_PERIOD 46 |
| #define | WXBGI_KEY_RIGHT 262 |
| #define | WXBGI_KEY_RIGHT_BRACKET 93 |
| #define | WXBGI_KEY_SEMICOLON 59 |
| #define | WXBGI_KEY_SLASH 47 |
| #define | WXBGI_KEY_SPACE 32 |
| #define | WXBGI_KEY_TAB 258 |
| #define | WXBGI_KEY_UP 265 |
Typedefs | |
| using | bgi::MouseHandler = void(BGI_CALL *)(int, int) |
| typedef void(BGI_CALL * | WxbgiCharHook) (unsigned int codepoint) |
| User hook fired after each printable Unicode character input event. | |
| typedef void(BGI_CALL * | WxbgiCursorPosHook) (int x, int y) |
| User hook fired after every mouse cursor movement. | |
| typedef void(BGI_CALL * | WxbgiKeyHook) (int key, int scancode, int action, int mods) |
| User hook fired after each key press, repeat, or release event. | |
| typedef void(BGI_CALL * | WxbgiMouseButtonHook) (int button, int action, int mods) |
| User hook fired after each mouse button press or release. | |
| typedef void(BGI_CALL * | WxbgiScrollHook) (double xoffset, double yoffset) |
| User hook fired after each mouse scroll (wheel) event. | |
Enumerations | |
| enum class | bgi::CameraProjection { bgi::Orthographic = 0 , bgi::Perspective = 1 } |
| Projection mode for a Camera3D. More... | |
| enum | bgi::GraphStatus { bgi::grOk = 0 , bgi::grNoInitGraph = -1 , bgi::grNotDetected = -2 , bgi::grFileNotFound = -3 , bgi::grInvalidDriver = -4 , bgi::grNoLoadMem = -5 , bgi::grNoScanMem = -6 , bgi::grNoFloodMem = -7 , bgi::grFontNotFound = -8 , bgi::grNoFontMem = -9 , bgi::grInvalidMode = -10 , bgi::grError = -11 , bgi::grIOerror = -12 , bgi::grInvalidFont = -13 , bgi::grInvalidFontNum = -14 , bgi::grInvalidVersion = -18 , bgi::grInitFailed = -19 , bgi::grWindowClosed = -20 , bgi::grInvalidInput = -21 , bgi::grDuplicateName = -22 } |
Variables | |
| constexpr int | bgi::AND_PUT = 3 |
| constexpr int | bgi::BKSLASH_FILL = 5 |
| constexpr int | bgi::BLACK = 0 |
| constexpr int | bgi::BLUE = 1 |
| constexpr int | bgi::BOTTOM_TEXT = 0 |
| constexpr int | bgi::BROWN = 6 |
| constexpr int | bgi::CENTER_LINE = 2 |
| constexpr int | bgi::CENTER_TEXT = 1 |
| constexpr int | bgi::CLOSE_DOT_FILL = 11 |
| constexpr int | bgi::COPY_PUT = 0 |
| constexpr int | bgi::CYAN = 3 |
| constexpr int | bgi::DARKGRAY = 8 |
| constexpr int | bgi::DASHED_LINE = 3 |
| constexpr int | bgi::DEFAULT_FONT = 0 |
| constexpr int | bgi::DETECT = 0 |
| constexpr int | bgi::DOTTED_LINE = 1 |
| constexpr int | bgi::EMPTY_FILL = 0 |
| constexpr int | bgi::GOTHIC_FONT = 8 |
| constexpr int | bgi::GREEN = 2 |
| constexpr int | bgi::HATCH_FILL = 7 |
| constexpr int | bgi::HORIZ_DIR = 0 |
| constexpr int | bgi::INTERLEAVE_FILL = 9 |
| const ColorRGB | bgi::kBgiPalette [kPaletteSize] |
| constexpr int | bgi::kDefaultHeight = 720 |
| constexpr int | bgi::kDefaultWidth = 960 |
| constexpr int | bgi::kExtColorBase = 16 |
| first user-assignable extended colour index | |
| constexpr int | bgi::kExtPaletteSize = 240 |
| extended slots 16-255 (fits uint8_t pixel buffer) | |
| constexpr int | bgi::kPageCount = 2 |
| constexpr int | bgi::kPaletteSize = 16 |
| classic BGI palette slots (0-15) | |
| constexpr int | bgi::kPatternCols = 8 |
| constexpr int | bgi::kPatternRows = 8 |
| constexpr int | bgi::kSelectionOrangeColor = 252 |
| Reserved extended-palette slot — selection flash orange. | |
| constexpr int | bgi::kSelectionPurpleColor = 253 |
| Reserved extended-palette slot — selection flash purple. | |
| constexpr int | bgi::LEFT_TEXT = 0 |
| constexpr int | bgi::LIGHTBLUE = 9 |
| constexpr int | bgi::LIGHTCYAN = 11 |
| constexpr int | bgi::LIGHTGRAY = 7 |
| constexpr int | bgi::LIGHTGREEN = 10 |
| constexpr int | bgi::LIGHTMAGENTA = 13 |
| constexpr int | bgi::LIGHTRED = 12 |
| constexpr int | bgi::LINE_FILL = 2 |
| constexpr int | bgi::LTBKSLASH_FILL = 6 |
| constexpr int | bgi::LTSLASH_FILL = 3 |
| constexpr int | bgi::MAGENTA = 5 |
| constexpr int | bgi::NORM_WIDTH = 1 |
| constexpr int | bgi::NOT_PUT = 4 |
| constexpr int | bgi::OR_PUT = 2 |
| constexpr int | bgi::RED = 4 |
| constexpr int | bgi::RIGHT_TEXT = 2 |
| constexpr int | bgi::SANS_SERIF_FONT = 4 |
| constexpr int | bgi::SLASH_FILL = 4 |
| constexpr int | bgi::SMALL_FONT = 2 |
| constexpr int | bgi::SOLID_FILL = 1 |
| constexpr int | bgi::SOLID_LINE = 0 |
| constexpr int | bgi::THICK_WIDTH = 3 |
| constexpr int | bgi::TOP_TEXT = 2 |
| constexpr int | bgi::TRIPLEX_FONT = 1 |
| constexpr int | bgi::USER_FILL = 12 |
| constexpr int | bgi::USERBIT_LINE = 4 |
| constexpr int | bgi::VERT_DIR = 1 |
| constexpr int | bgi::WHITE = 15 |
| constexpr int | bgi::WIDE_DOT_FILL = 10 |
| constexpr int | bgi::XHATCH_FILL = 8 |
| constexpr int | bgi::XOR_PUT = 1 |
| constexpr int | bgi::YELLOW = 14 |
| #define BGI_API extern "C" |
| #define BGI_CALL |
| #define WXBGI_DEFAULT_ALL 0x0F |
All default behaviors enabled (initial state after initwindow).
| #define WXBGI_DEFAULT_CURSOR_TRACK 0x02 |
Cursor tracking: cursorPosCallback writes mouseX / mouseY / mouseMoved.
| #define WXBGI_DEFAULT_KEY_QUEUE 0x01 |
Key-code queuing: keyCallback updates keyQueue + charCallback queues chars.
| #define WXBGI_DEFAULT_MOUSE_PICK 0x04 |
Mouse-button picking: mouseButtonCallback calls overlayPerformPick().
| #define WXBGI_DEFAULT_NONE 0x00 |
All default behaviors disabled.
| #define WXBGI_DEFAULT_SCROLL_ACCUM 0x08 |
Scroll accumulation: scrollCallback accumulates scrollDeltaX / scrollDeltaY.
| #define WXBGI_KEY_APOSTROPHE 39 |
| #define WXBGI_KEY_BACKSPACE 259 |
| #define WXBGI_KEY_COMMA 44 |
| #define WXBGI_KEY_DELETE 261 |
| #define WXBGI_KEY_DOWN 264 |
| #define WXBGI_KEY_END 269 |
| #define WXBGI_KEY_ENTER 257 |
| #define WXBGI_KEY_EQUAL 61 |
| #define WXBGI_KEY_ESCAPE 256 |
| #define WXBGI_KEY_F1 290 |
| #define WXBGI_KEY_F10 299 |
| #define WXBGI_KEY_F11 300 |
| #define WXBGI_KEY_F12 301 |
| #define WXBGI_KEY_F2 291 |
| #define WXBGI_KEY_F3 292 |
| #define WXBGI_KEY_F4 293 |
| #define WXBGI_KEY_F5 294 |
| #define WXBGI_KEY_F6 295 |
| #define WXBGI_KEY_F7 296 |
| #define WXBGI_KEY_F8 297 |
| #define WXBGI_KEY_F9 298 |
| #define WXBGI_KEY_HOME 268 |
| #define WXBGI_KEY_INSERT 260 |
| #define WXBGI_KEY_LEFT 263 |
| #define WXBGI_KEY_LEFT_BRACKET 91 |
| #define WXBGI_KEY_MINUS 45 |
| #define WXBGI_KEY_PAGE_DOWN 267 |
| #define WXBGI_KEY_PAGE_UP 266 |
| #define WXBGI_KEY_PERIOD 46 |
| #define WXBGI_KEY_RIGHT 262 |
| #define WXBGI_KEY_RIGHT_BRACKET 93 |
| #define WXBGI_KEY_SEMICOLON 59 |
| #define WXBGI_KEY_SLASH 47 |
| #define WXBGI_KEY_SPACE 32 |
| #define WXBGI_KEY_TAB 258 |
| #define WXBGI_KEY_UP 265 |