wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
Loading...
Searching...
No Matches
bgi::BgiState Struct Reference

#include <bgi_types.h>

Collaboration diagram for bgi::BgiState:

Public Member Functions

 BgiState ()
 BgiState (const BgiState &)=delete
BgiState & operator= (const BgiState &)=delete
 ~BgiState ()

Data Fields

std::string activeCamera {"default"}
std::string activeDdsName {"default"}
int activePage {0}
palettetype activePalette {}
std::string activeUcs {"world"}
int aspectX {1}
int aspectY {1}
int bkColor {BLACK}
std::unordered_map< std::string, std::shared_ptr< DdsCamera > > cameras
int currentColor {WHITE}
int currentX {0}
int currentY {0}
DdsScene * dds {nullptr}
 Non-owning shortcut → ddsRegistry[activeDdsName].
std::unordered_map< std::string, std::unique_ptr< DdsScene > > ddsRegistry
palettetype defaultPalette {}
bool doubleBuffered {false}
int extColorNext {kExtColorBase}
 next auto-alloc slot
std::array< ColorRGB, kExtPaletteSize > extPalette {}
 user-assigned RGB slots 16-255
int fillColor {WHITE}
std::array< std::uint8_t, kPatternRows > fillMask {}
int fillPattern {SOLID_FILL}
bool glfwInitialized {false}
unsigned graphBufSize {0U}
int graphDriver {DETECT}
int graphMode {0}
int height {kDefaultHeight}
bool inCrtMode {false}
 Set by restorecrtmode(); cleared by setgraphmode(). Window stays open. Optional callback set by the standalone frame to pump wx events. Called by wxbgi_poll_events() WITHOUT holding gMutex so wx handlers can safely call back into the BGI API.
int inputDefaultFlags {WXBGI_DEFAULT_ALL}
 Bitmask controlling built-in callback behaviors.
std::array< std::uint8_t, 512 > keyDown {}
std::queue< int > keyQueue
arccoordstype lastArc {0, 0, 0, 0, 0, 0}
int lastResult {grNoInitGraph}
bool legacyGlRender {false}
 When true, uses the old GL_POINTS per-pixel path.
LightState lightState
 Lighting parameters for GL Phong shading passes.
linesettingstype lineSettings {SOLID_LINE, 0xFFFFU, NORM_WIDTH}
bool mouseMoved {false}
 Set true by cursorPosCallback; cleared by wxbgi_mouse_moved().
int mouseX {0}
int mouseY {0}
OverlayGridState overlayGrid
OverlayUcsAxesState overlayUcsAxes
std::vector< std::vector< std::uint8_t > > pageBuffers
std::array< ColorRGB, kPaletteSize > palette {}
PendingGlRender pendingGl
 Geometry collected by wxbgi_render_dds() for the GL solid/line passes. Per-camera GL frames queued in wxEmbedded mode so WxBgiCanvas::Render() can replay each camera's solid geometry with the correct viewport.
std::vector< PendingGlFrame > pendingGlQueue
std::string pendingOverlayCam {}
 Camera name for the post-solid overlay alpha-blit in GLFW mode. Set by wxbgi_render_dds() and consumed by flushToScreen().
double scrollDeltaX {0.0}
 Accumulated horizontal scroll delta.
double scrollDeltaY {0.0}
 Accumulated vertical scroll delta.
std::vector< std::string > selectedObjectIds
 IDs of currently selected DDS drawing objects.
int selectionFlashScheme {0}
 Flash colour: 0 = orange (252), 1 = purple (253).
int selectionPickRadiusPx {16}
 Screen-pixel pick threshold for object selection.
bool shouldClose {false}
 In wx mode: set by wxbgi_request_close / frame close event.
int solidColorOverride {-1}
 When >= 0, replaces faceColor and edgeColor in renderTriangleBatch (used by selection flash).
int solidDrawMode {0}
 0 = Wireframe, 1 = Solid (painter's algorithm).
int solidEdgeColor {15}
 Default edge colour (WHITE).
int solidFaceColor {7}
 Default face colour (LIGHTGRAY).
textsettingstype textSettings {DEFAULT_FONT, HORIZ_DIR, 1, LEFT_TEXT, TOP_TEXT}
std::unordered_map< std::string, std::shared_ptr< DdsUcs > > ucsSystems
WxbgiCharHook userCharHook {nullptr}
int userCharSizeXDen {1}
int userCharSizeXNum {1}
int userCharSizeYDen {1}
int userCharSizeYNum {1}
WxbgiCursorPosHook userCursorPosHook {nullptr}
 Called after cursorPosCallback logic; may be NULL.
bool userFillPatternEnabled {false}
WxbgiKeyHook userKeyHook {nullptr}
WxbgiMouseButtonHook userMouseButtonHook {nullptr}
WxbgiScrollHook userScrollHook {nullptr}
viewporttype viewport {0, 0, kDefaultWidth - 1, kDefaultHeight - 1, 1}
int visualPage {0}
int width {kDefaultWidth}
GLFWwindow * window {nullptr}
std::string windowTitle {"BGI OpenGL Wrapper"}
WorldExtents worldExtents
int writeMode {COPY_PUT}
bool wxEmbedded {false}
 True when the BGI surface is hosted inside a WxBgiCanvas.
void(* wxPollCallback )()

Constructor & Destructor Documentation

◆ BgiState() [1/2]

bgi::BgiState::BgiState ( )

◆ ~BgiState()

bgi::BgiState::~BgiState ( )

◆ BgiState() [2/2]

bgi::BgiState::BgiState ( const BgiState & )
delete

Member Function Documentation

◆ operator=()

BgiState & bgi::BgiState::operator= ( const BgiState & )
delete

Field Documentation

◆ activeCamera

std::string bgi::BgiState::activeCamera {"default"}

◆ activeDdsName

std::string bgi::BgiState::activeDdsName {"default"}

◆ activePage

int bgi::BgiState::activePage {0}

◆ activePalette

palettetype bgi::BgiState::activePalette {}

◆ activeUcs

std::string bgi::BgiState::activeUcs {"world"}

◆ aspectX

int bgi::BgiState::aspectX {1}

◆ aspectY

int bgi::BgiState::aspectY {1}

◆ bkColor

int bgi::BgiState::bkColor {BLACK}

◆ cameras

std::unordered_map<std::string, std::shared_ptr<DdsCamera> > bgi::BgiState::cameras

◆ currentColor

int bgi::BgiState::currentColor {WHITE}

◆ currentX

int bgi::BgiState::currentX {0}

◆ currentY

int bgi::BgiState::currentY {0}

◆ dds

DdsScene* bgi::BgiState::dds {nullptr}

Non-owning shortcut → ddsRegistry[activeDdsName].

◆ ddsRegistry

std::unordered_map<std::string, std::unique_ptr<DdsScene> > bgi::BgiState::ddsRegistry

◆ defaultPalette

palettetype bgi::BgiState::defaultPalette {}

◆ doubleBuffered

bool bgi::BgiState::doubleBuffered {false}

◆ extColorNext

int bgi::BgiState::extColorNext {kExtColorBase}

next auto-alloc slot

◆ extPalette

std::array<ColorRGB, kExtPaletteSize> bgi::BgiState::extPalette {}

user-assigned RGB slots 16-255

◆ fillColor

int bgi::BgiState::fillColor {WHITE}

◆ fillMask

std::array<std::uint8_t, kPatternRows> bgi::BgiState::fillMask {}

◆ fillPattern

int bgi::BgiState::fillPattern {SOLID_FILL}

◆ glfwInitialized

bool bgi::BgiState::glfwInitialized {false}

◆ graphBufSize

unsigned bgi::BgiState::graphBufSize {0U}

◆ graphDriver

int bgi::BgiState::graphDriver {DETECT}

◆ graphMode

int bgi::BgiState::graphMode {0}

◆ height

int bgi::BgiState::height {kDefaultHeight}

◆ inCrtMode

bool bgi::BgiState::inCrtMode {false}

Set by restorecrtmode(); cleared by setgraphmode(). Window stays open. Optional callback set by the standalone frame to pump wx events. Called by wxbgi_poll_events() WITHOUT holding gMutex so wx handlers can safely call back into the BGI API.

◆ inputDefaultFlags

int bgi::BgiState::inputDefaultFlags {WXBGI_DEFAULT_ALL}

Bitmask controlling built-in callback behaviors.

◆ keyDown

std::array<std::uint8_t, 512> bgi::BgiState::keyDown {}

◆ keyQueue

std::queue<int> bgi::BgiState::keyQueue

◆ lastArc

arccoordstype bgi::BgiState::lastArc {0, 0, 0, 0, 0, 0}

◆ lastResult

int bgi::BgiState::lastResult {grNoInitGraph}

◆ legacyGlRender

bool bgi::BgiState::legacyGlRender {false}

When true, uses the old GL_POINTS per-pixel path.

◆ lightState

LightState bgi::BgiState::lightState

Lighting parameters for GL Phong shading passes.

◆ lineSettings

linesettingstype bgi::BgiState::lineSettings {SOLID_LINE, 0xFFFFU, NORM_WIDTH}

◆ mouseMoved

bool bgi::BgiState::mouseMoved {false}

Set true by cursorPosCallback; cleared by wxbgi_mouse_moved().

◆ mouseX

int bgi::BgiState::mouseX {0}

◆ mouseY

int bgi::BgiState::mouseY {0}

◆ overlayGrid

OverlayGridState bgi::BgiState::overlayGrid

◆ overlayUcsAxes

OverlayUcsAxesState bgi::BgiState::overlayUcsAxes

◆ pageBuffers

std::vector<std::vector<std::uint8_t> > bgi::BgiState::pageBuffers

◆ palette

std::array<ColorRGB, kPaletteSize> bgi::BgiState::palette {}

◆ pendingGl

PendingGlRender bgi::BgiState::pendingGl

Geometry collected by wxbgi_render_dds() for the GL solid/line passes. Per-camera GL frames queued in wxEmbedded mode so WxBgiCanvas::Render() can replay each camera's solid geometry with the correct viewport.

◆ pendingGlQueue

std::vector<PendingGlFrame> bgi::BgiState::pendingGlQueue

◆ pendingOverlayCam

std::string bgi::BgiState::pendingOverlayCam {}

Camera name for the post-solid overlay alpha-blit in GLFW mode. Set by wxbgi_render_dds() and consumed by flushToScreen().

◆ scrollDeltaX

double bgi::BgiState::scrollDeltaX {0.0}

Accumulated horizontal scroll delta.

◆ scrollDeltaY

double bgi::BgiState::scrollDeltaY {0.0}

Accumulated vertical scroll delta.

◆ selectedObjectIds

std::vector<std::string> bgi::BgiState::selectedObjectIds

IDs of currently selected DDS drawing objects.

◆ selectionFlashScheme

int bgi::BgiState::selectionFlashScheme {0}

Flash colour: 0 = orange (252), 1 = purple (253).

◆ selectionPickRadiusPx

int bgi::BgiState::selectionPickRadiusPx {16}

Screen-pixel pick threshold for object selection.

◆ shouldClose

bool bgi::BgiState::shouldClose {false}

In wx mode: set by wxbgi_request_close / frame close event.

◆ solidColorOverride

int bgi::BgiState::solidColorOverride {-1}

When >= 0, replaces faceColor and edgeColor in renderTriangleBatch (used by selection flash).

◆ solidDrawMode

int bgi::BgiState::solidDrawMode {0}

0 = Wireframe, 1 = Solid (painter's algorithm).

◆ solidEdgeColor

int bgi::BgiState::solidEdgeColor {15}

Default edge colour (WHITE).

◆ solidFaceColor

int bgi::BgiState::solidFaceColor {7}

Default face colour (LIGHTGRAY).

◆ textSettings

textsettingstype bgi::BgiState::textSettings {DEFAULT_FONT, HORIZ_DIR, 1, LEFT_TEXT, TOP_TEXT}

◆ ucsSystems

std::unordered_map<std::string, std::shared_ptr<DdsUcs> > bgi::BgiState::ucsSystems

◆ userCharHook

WxbgiCharHook bgi::BgiState::userCharHook {nullptr}

◆ userCharSizeXDen

int bgi::BgiState::userCharSizeXDen {1}

◆ userCharSizeXNum

int bgi::BgiState::userCharSizeXNum {1}

◆ userCharSizeYDen

int bgi::BgiState::userCharSizeYDen {1}

◆ userCharSizeYNum

int bgi::BgiState::userCharSizeYNum {1}

◆ userCursorPosHook

WxbgiCursorPosHook bgi::BgiState::userCursorPosHook {nullptr}

Called after cursorPosCallback logic; may be NULL.

◆ userFillPatternEnabled

bool bgi::BgiState::userFillPatternEnabled {false}

◆ userKeyHook

WxbgiKeyHook bgi::BgiState::userKeyHook {nullptr}

◆ userMouseButtonHook

WxbgiMouseButtonHook bgi::BgiState::userMouseButtonHook {nullptr}

◆ userScrollHook

WxbgiScrollHook bgi::BgiState::userScrollHook {nullptr}

◆ viewport

viewporttype bgi::BgiState::viewport {0, 0, kDefaultWidth - 1, kDefaultHeight - 1, 1}

◆ visualPage

int bgi::BgiState::visualPage {0}

◆ width

int bgi::BgiState::width {kDefaultWidth}

◆ window

GLFWwindow* bgi::BgiState::window {nullptr}

◆ windowTitle

std::string bgi::BgiState::windowTitle {"BGI OpenGL Wrapper"}

◆ worldExtents

WorldExtents bgi::BgiState::worldExtents

◆ writeMode

int bgi::BgiState::writeMode {COPY_PUT}

◆ wxEmbedded

bool bgi::BgiState::wxEmbedded {false}

True when the BGI surface is hosted inside a WxBgiCanvas.

◆ wxPollCallback

void(* bgi::BgiState::wxPollCallback) ()
inline

The documentation for this struct was generated from the following file: