wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
Loading...
Searching...
No Matches
Namespaces | Data Structures | Typedefs | Enumerations | Functions | Variables
bgi Namespace Reference

Namespaces

namespace  embedded
 

Data Structures

struct  arccoordstype
 
struct  BgiState
 
struct  Camera3D
 3-D camera definition (Z-up, right-handed world coordinate system). More...
 
struct  ColorRGB
 
struct  CoordSystem
 A named user coordinate system (UCS). More...
 
struct  DdsArc
 
struct  DdsBar
 
struct  DdsBar3D
 
struct  DdsBox
 
class  DdsCamera
 Camera stored in the DDS. More...
 
struct  DdsCircle
 
struct  DdsCone
 
struct  DdsCylinder
 
struct  DdsEllipse
 
struct  DdsExternalAttributes
 
struct  DdsExtrusion
 
struct  DdsFillEllipse
 
struct  DdsFillPoly
 
struct  DdsHeightMap
 
struct  DdsImage
 
struct  DdsLine
 
class  DdsObject
 
struct  DdsParamSurface
 
struct  DdsPieSlice
 
struct  DdsPoint
 
struct  DdsPolygon
 
struct  DdsRectangle
 
class  DdsScene
 In-memory DDS scene graph. More...
 
struct  DdsSector
 
class  DdsSetDifference
 
class  DdsSetIntersection
 
class  DdsSetUnion
 
struct  DdsSolid3D
 Base for all Phase 4/5/6 solid/surface/extrusion objects. More...
 
struct  DdsSphere
 
struct  DdsStyle
 Baked rendering state captured at draw-call time. More...
 
struct  DdsText
 
struct  DdsTorus
 
class  DdsTransform
 
class  DdsUcs
 UCS stored in the DDS. More...
 
class  DdsWorldExtentsObj
 World-extents AABB stored in the DDS. More...
 
struct  fillsettingstype
 
struct  GlLineVertex
 One vertex in a GL depth-tested line batch (world-space, 6 floats). More...
 
struct  GlVertex
 One vertex in a GL solid triangle batch (world-space, 9 floats). More...
 
struct  ImageHeader
 
struct  LightState
 Lighting parameters used by the GL Phong shading passes. More...
 
struct  linesettingstype
 
struct  MouseClickEvent
 
struct  OpenLbMaterialHit
 Result of classifying a single world-space point against an OpenLB-tagged DDS scene. More...
 
struct  OverlayGridState
 State for the reference grid overlay. More...
 
struct  OverlayUcsAxesState
 State for the UCS axes overlay. More...
 
struct  palettetype
 
struct  PendingGlFrame
 Per-camera GL frame queued by wxbgi_render_dds() in wxEmbedded mode. More...
 
struct  PendingGlRender
 Geometry accumulated for a single wxbgi_render_dds() call. More...
 
struct  SolidTriangle
 
struct  textsettingstype
 
struct  viewporttype
 
struct  WorldExtents
 Axis-aligned bounding box (AABB) representing the programmer's declared drawing extents in world space. More...
 

Typedefs

using MouseHandler = void(BGI_CALL *)(int, int)
 

Enumerations

enum class  CameraProjection { Orthographic = 0 , Perspective = 1 }
 Projection mode for a Camera3D. More...
 
enum class  CoordSpace { BgiPixel , World3D , UcsLocal }
 Indicates the coordinate space in which a drawing object's coordinates are expressed when it was recorded. More...
 
enum class  DdsObjectType {
  Camera , Ucs , WorldExtentsObj , Transform ,
  SetUnion , SetIntersection , SetDifference , Point ,
  Line , Circle , Arc , Ellipse ,
  FillEllipse , PieSlice , Sector , Rectangle ,
  Bar , Bar3D , Polygon , FillPoly ,
  Text , Image , Box , Sphere ,
  Cylinder , Cone , Torus , HeightMap ,
  ParamSurface , Extrusion
}
 
enum  GraphStatus {
  grOk = 0 , grNoInitGraph = -1 , grNotDetected = -2 , grFileNotFound = -3 ,
  grInvalidDriver = -4 , grNoLoadMem = -5 , grNoScanMem = -6 , grNoFloodMem = -7 ,
  grFontNotFound = -8 , grNoFontMem = -9 , grInvalidMode = -10 , grError = -11 ,
  grIOerror = -12 , grInvalidFont = -13 , grInvalidFontNum = -14 , grInvalidVersion = -18 ,
  grInitFailed = -19 , grWindowClosed = -20 , grInvalidInput = -21 , grDuplicateName = -22
}
 
enum class  ParamSurfaceFormula {
  Sphere = 0 , Cylinder = 1 , Torus = 2 , Saddle = 3 ,
  Mobius = 4
}
 
enum class  SolidDrawMode { Wireframe = 0 , Flat = 1 , Smooth = 2 , Solid = 1 }
 

Functions

std::vector< std::uint8_t > & activePageBuffer ()
 
std::vector< std::pair< int, int > > buildArcPoints (int cx, int cy, int startAngle, int endAngle, int xradius, int yradius)
 
float cameraAspectRatio (const Camera3D &cam, int winW, int winH)
 Returns the aspect ratio (width / height) of the camera's effective viewport.
 
bool cameraClipToScreen (const Camera3D &cam, int winW, int winH, const glm::vec4 &clip, float &screenX, float &screenY)
 Project a 4-D clip-space point (after SH clipping) to a screen pixel.
 
void cameraEffectiveViewport (const Camera3D &cam, int winW, int winH, int &x, int &y, int &w, int &h)
 Returns the effective screen-space viewport rectangle (pixels) for a camera.
 
glm::mat4 cameraProjMatrix (const Camera3D &cam, float aspectRatio)
 Builds the projection matrix.
 
void cameraScreenToRay (const Camera3D &cam, int winW, int winH, float screenX, float screenY, float &rayOx, float &rayOy, float &rayOz, float &rayDx, float &rayDy, float &rayDz)
 Unprojects a screen pixel to a world-space ray.
 
glm::mat4 cameraViewMatrix (const Camera3D &cam)
 Builds the view matrix from eye / target / up, or from the 2-D pan / zoom / rotation fields when cam.is2D is true.
 
glm::mat4 cameraVPMatrix (const Camera3D &cam, float aspectRatio)
 Returns the combined view-projection matrix (proj × view).
 
glm::vec4 cameraWorldToClip (const Camera3D &cam, int winW, int winH, float wx, float wy, float wz)
 Transform a world-space point to 4-D clip space via the camera's VP matrix.
 
bool cameraWorldToScreen (const Camera3D &cam, int winW, int winH, float wx, float wy, float wz, float &screenX, float &screenY)
 Projects a world-space point to a screen pixel.
 
bool cameraWorldToScreenForced (const Camera3D &cam, int winW, int winH, float wx, float wy, float wz, float &screenX, float &screenY)
 Like cameraWorldToScreen but skips the NDC frustum boundary test.
 
bool captureImage (int left, int top, int right, int bottom, void *bitmap)
 
void clearActivePage (int color)
 
void clearViewportRegion (int color)
 
bool clipLineByPlane (glm::vec4 &A, glm::vec4 &B, const glm::vec4 &plane)
 Clip a LINE SEGMENT in clip space against one half-space in place.
 
bool clipLineZPlanes (glm::vec4 &A, glm::vec4 &B)
 Clip a line segment against near and far Z planes.
 
void clipPolyByPlane (std::vector< glm::vec4 > &poly, const glm::vec4 &plane)
 Sutherland-Hodgman clip step: clip a convex polygon (in 4-D clip space) against one half-space.
 
void clipPolyZPlanes (std::vector< glm::vec4 > &poly)
 Clip a convex polygon in clip space against the near plane (Z+W>0) and far plane (-Z+W>0).
 
ColorRGB colorToRGB (int c)
 resolves any colour index (0-255) to an RGB triple
 
int currentTextScaleX ()
 
int currentTextScaleY ()
 
void destroyWindowIfNeeded (bool resetGlState=false)
 
void drawCircleInternal (int cx, int cy, int radius, int color)
 
void drawEllipseInternal (int cx, int cy, int startAngle, int endAngle, int xradius, int yradius, int color)
 
void drawGlyph (int x, int y, std::uint32_t codepoint, int color)
 
bool drawImage (int left, int top, const void *bitmap, int op)
 
void drawLineInternal (int x1, int y1, int x2, int y2, int color)
 
void drawOutlineText (int x, int y, int fontId, const std::vector< std::uint32_t > &codepoints, int color, int scaleX, int scaleY, bool vertical)
 
void drawOverlaysForCamera (const std::string &camName, const Camera3D &cam)
 Draw all active overlays for one camera viewport.
 
void drawPolygonInternal (const std::vector< std::pair< int, int > > &points, int color)
 
void drawSelectionCursorsGL ()
 Draw selection cursor squares for all cameras that have the cursor enabled.
 
void drawText (int x, int y, const std::string &text, int color)
 
void fillEllipseInternal (int cx, int cy, int xradius, int yradius, int color)
 
void fillPolygonInternal (const std::vector< std::pair< int, int > > &points, int color)
 
void fillRectInternal (int left, int top, int right, int bottom, int color)
 
void flushToScreen ()
 
int fontCount ()
 
int fontIdFromName (const std::string &name)
 
const char * fontName (int fontId)
 
int getPixel (int x, int y)
 
void glPassDestroy ()
 Release all GL objects (call before context is destroyed).
 
void glPassInit (int w, int h)
 Initialise GL objects (shaders, VAO/VBO, page texture).
 
void glPassResetState ()
 Reset GL object handles to zero WITHOUT calling GL delete functions.
 
void glPassResize (int w, int h)
 Resize the page texture to match a new canvas size.
 
unsigned imageSizeForRect (int left, int top, int right, int bottom)
 
void initForWxCanvas (int width, int height)
 
bool isKnownFont (int fontId)
 
bool isOutlineFont (int fontId)
 
bool isReady ()
 
std::array< std::uint8_t, kPatternRowsmakeFillPatternMask (int pattern)
 
void matToFloatArray (const glm::mat4 &m, float *out16)
 Writes a GLM mat4 into a caller-supplied column-major float[16] array.
 
std::pair< int, int > measureOutlineText (int fontId, const std::vector< std::uint32_t > &codepoints, int scaleX, int scaleY, bool vertical)
 
std::pair< int, int > measureText (const std::string &text)
 
int normalizeColor (int color)
 
std::uint8_t normalizeColorByte (int value)
 
bool openlbClassifyPoint (const DdsScene &scene, const glm::vec3 &worldPoint, OpenLbMaterialHit &hit, int defaultFluidMaterial=1, int defaultSolidMaterial=2)
 Classify a single world-space point against all OpenLB-tagged render roots in a DDS scene and populate a hit record.
 
void openlbSampleMaterials2D (const DdsScene &scene, float minX, float minY, float z, int cols, int rows, float stepX, float stepY, std::vector< int > &materials, int defaultFluidMaterial=1, int defaultSolidMaterial=2)
 Sample a 2-D axis-aligned grid of world-space points and write per-cell material IDs into a std::vector<int>.
 
int outlineFontIdFromName (const std::string &name)
 
const char * outlineFontName (int fontId)
 
void overlayPerformPick (int screenX, int screenY, bool multiSelect)
 Handle a left-click pick event.
 
void renderPageAsTexture (int w, int h, int vpW=-1, int vpH=-1)
 Pass 1 — Upload the visual page buffer as an RGBA texture and draw a fullscreen quad.
 
void renderPageAsTextureAlpha (int w, int h, int vpW=-1, int vpH=-1)
 Overlay pass — Upload the visual page buffer as an RGBA texture and composite it ON TOP of the current framebuffer contents using alpha blending.
 
void renderPageLegacyPoints (int w, int h, int vpW=-1, int vpH=-1)
 Legacy per-pixel GL_POINTS path (kept for backward compat / diagnostics).
 
void renderPageToCurrentGLContext (int w, int h)
 
void renderSolid3D (const Camera3D &cam, const DdsObject &obj)
 Render a single Phase 4/5/6 solid/surface/extrusion DDS object through the given camera into the active BGI pixel buffer.
 
void renderSolidsGLPass (const PendingGlRender &pending, int w, int h, const LightState &light, const glm::mat4 &vp, const glm::vec3 &camPos, int vpX=0, int vpY=0)
 Pass 2a — Draw Phong-lit solid triangles (flat and/or smooth shading) with depth test.
 
void renderSolidTriangles (const Camera3D &cam, std::vector< SolidTriangle > &tris, SolidDrawMode mode)
 Render a pre-tessellated triangle list using the current GL/software path.
 
void renderWireframeGLPass (const PendingGlRender &pending, int w, int h, const glm::mat4 &vp, const glm::vec3 &camPos, int vpX=0, int vpY=0)
 Pass 2b — Two-pass hidden-line wireframe with proper depth-buffer HSR.
 
void renderWorldLinesGLPass (const PendingGlRender &pending, int w, int h, const glm::mat4 &vp, int vpX=0, int vpY=0)
 Pass 3 — Draw world-space line segments with depth test (hidden behind solids).
 
void resetDrawingState ()
 
void resetPaletteState ()
 
void resetStateForWindow (int width, int height, bool doubleBuffered)
 
void resizePixelBuffer (int width, int height)
 Resize only — preserves DDS scenes, cameras, UCS.
 
void setPixel (int x, int y, int color)
 
void setPixelWithMode (int x, int y, int color, int mode)
 
bool syncGlfwWindowSize ()
 
void syncPagesIfNeeded ()
 
bool tessellateSolid3D (const DdsObject &obj, std::vector< SolidTriangle > &tris)
 Tessellate a solid/surface/extrusion DDS object into world-space triangles.
 
bool toDeviceCoordinates (int x, int y, int &screenX, int &screenY)
 
CoordSystem ucsFromNormal (float nx, float ny, float nz, float ox, float oy, float oz)
 Constructs a right-handed orthonormal frame from a surface normal.
 
void ucsLocalToWorld (const CoordSystem &cs, float lx, float ly, float lz, float &wx, float &wy, float &wz)
 Transforms a UCS local point into world-space coordinates.
 
glm::mat4 ucsLocalToWorldMatrix (const CoordSystem &cs)
 Returns the 4×4 matrix that transforms a point from UCS local space to world space.
 
void ucsOrthonormalise (CoordSystem &cs)
 Orthonormalises the three axis vectors of a CoordSystem in-place using the Gram-Schmidt process.
 
void ucsWorldToLocal (const CoordSystem &cs, float wx, float wy, float wz, float &lx, float &ly, float &lz)
 Transforms a world-space point into UCS local coordinates.
 
glm::mat4 ucsWorldToLocalMatrix (const CoordSystem &cs)
 Returns the 4×4 matrix that transforms a point from world space to UCS local space.
 
bool useFillAt (int x, int y)
 
const std::vector< std::uint8_t > & visualPageBuffer ()
 
glm::vec3 worldExtentsCentre (const WorldExtents &extents)
 Returns the centre of the AABB as a vec3.
 
void worldExtentsExpand (WorldExtents &extents, float x, float y, float z)
 Expands extents to include the point (x, y, z).
 
glm::vec3 worldExtentsHalfSize (const WorldExtents &extents)
 Returns the half-extents (half-size of each axis) as a vec3.
 

Variables

constexpr int AND_PUT = 3
 
constexpr int BKSLASH_FILL = 5
 
constexpr int BLACK = 0
 
constexpr int BLUE = 1
 
constexpr int BOTTOM_TEXT = 0
 
constexpr int BROWN = 6
 
constexpr int CENTER_LINE = 2
 
constexpr int CENTER_TEXT = 1
 
constexpr int CLOSE_DOT_FILL = 11
 
constexpr int COPY_PUT = 0
 
constexpr int CYAN = 3
 
constexpr int DARKGRAY = 8
 
constexpr int DASHED_LINE = 3
 
constexpr int DEFAULT_FONT = 0
 
constexpr int DETECT = 0
 
constexpr int DOTTED_LINE = 1
 
constexpr int EMPTY_FILL = 0
 
std::mutex gMutex
 
constexpr int GOTHIC_FONT = 8
 
constexpr int GREEN = 2
 
BgiState gState
 
constexpr int HATCH_FILL = 7
 
constexpr int HORIZ_DIR = 0
 
constexpr int INTERLEAVE_FILL = 9
 
const ColorRGB kBgiPalette [kPaletteSize]
 
constexpr int kDefaultHeight = 720
 
constexpr int kDefaultWidth = 960
 
constexpr int kExtColorBase = 16
 first user-assignable extended colour index
 
constexpr int kExtPaletteSize = 240
 extended slots 16-255 (fits uint8_t pixel buffer)
 
constexpr int kPageCount = 2
 
constexpr int kPaletteSize = 16
 classic BGI palette slots (0-15)
 
constexpr int kPatternCols = 8
 
constexpr int kPatternRows = 8
 
constexpr int kSelectionOrangeColor = 252
 Reserved extended-palette slot — selection flash orange.
 
constexpr int kSelectionPurpleColor = 253
 Reserved extended-palette slot — selection flash purple.
 
constexpr int LEFT_TEXT = 0
 
constexpr int LIGHTBLUE = 9
 
constexpr int LIGHTCYAN = 11
 
constexpr int LIGHTGRAY = 7
 
constexpr int LIGHTGREEN = 10
 
constexpr int LIGHTMAGENTA = 13
 
constexpr int LIGHTRED = 12
 
constexpr int LINE_FILL = 2
 
constexpr int LTBKSLASH_FILL = 6
 
constexpr int LTSLASH_FILL = 3
 
constexpr int MAGENTA = 5
 
constexpr int MODERN_HANDJET_FONT = 18
 
constexpr int MODERN_PLAYFAIR_DISPLAY_FONT = 17
 
constexpr int MODERN_ROBOTO_FONT = 16
 
constexpr int NORM_WIDTH = 1
 
constexpr int NOT_PUT = 4
 
constexpr int OR_PUT = 2
 
constexpr int RED = 4
 
constexpr int RIGHT_TEXT = 2
 
constexpr int SANS_SERIF_FONT = 4
 
constexpr int SLASH_FILL = 4
 
constexpr int SMALL_FONT = 2
 
constexpr int SOLID_FILL = 1
 
constexpr int SOLID_LINE = 0
 
constexpr int THICK_WIDTH = 3
 
constexpr int TOP_TEXT = 2
 
constexpr int TRIPLEX_FONT = 1
 
constexpr int USER_FILL = 12
 
constexpr int USERBIT_LINE = 4
 
constexpr int VERT_DIR = 1
 
constexpr int WHITE = 15
 
constexpr int WIDE_DOT_FILL = 10
 
constexpr int XHATCH_FILL = 8
 
constexpr int XOR_PUT = 1
 
constexpr int YELLOW = 14
 

Typedef Documentation

◆ MouseHandler

using bgi::MouseHandler = typedef void(BGI_CALL *)(int, int)

Enumeration Type Documentation

◆ CameraProjection

enum class bgi::CameraProjection
strong

Projection mode for a Camera3D.

Enumerator
Orthographic 
Perspective 

◆ CoordSpace

enum class bgi::CoordSpace
strong

Indicates the coordinate space in which a drawing object's coordinates are expressed when it was recorded.

The DDS-based renderer uses this to choose the correct projection pipeline.

Enumerator
BgiPixel 

Pixel integers from classic BGI, stored as (x, y, 0) world coords.

World3D 

World-space 3-D coordinates (from wxbgi_world_* functions).

UcsLocal 

UCS-local coordinates; ucsName identifies the frame.

◆ DdsObjectType

enum class bgi::DdsObjectType
strong
Enumerator
Camera 
Ucs 
WorldExtentsObj 
Transform 
SetUnion 
SetIntersection 
SetDifference 
Point 
Line 
Circle 
Arc 
Ellipse 
FillEllipse 
PieSlice 
Sector 
Rectangle 
Bar 
Bar3D 
Polygon 
FillPoly 
Text 
Image 
Box 
Sphere 
Cylinder 
Cone 
Torus 
HeightMap 
ParamSurface 
Extrusion 

◆ GraphStatus

Enumerator
grOk 
grNoInitGraph 
grNotDetected 
grFileNotFound 
grInvalidDriver 
grNoLoadMem 
grNoScanMem 
grNoFloodMem 
grFontNotFound 
grNoFontMem 
grInvalidMode 
grError 
grIOerror 
grInvalidFont 
grInvalidFontNum 
grInvalidVersion 
grInitFailed 
grWindowClosed 
grInvalidInput 
grDuplicateName 

A camera or UCS with that name already exists.

◆ ParamSurfaceFormula

enum class bgi::ParamSurfaceFormula
strong
Enumerator
Sphere 
Cylinder 
Torus 
Saddle 
Mobius 

◆ SolidDrawMode

enum class bgi::SolidDrawMode
strong
Enumerator
Wireframe 
Flat 
Smooth 
Solid 

Function Documentation

◆ activePageBuffer()

std::vector< std::uint8_t > & bgi::activePageBuffer ( )

◆ buildArcPoints()

std::vector< std::pair< int, int > > bgi::buildArcPoints ( int  cx,
int  cy,
int  startAngle,
int  endAngle,
int  xradius,
int  yradius 
)

◆ cameraAspectRatio()

float bgi::cameraAspectRatio ( const Camera3D cam,
int  winW,
int  winH 
)

Returns the aspect ratio (width / height) of the camera's effective viewport.

◆ cameraClipToScreen()

bool bgi::cameraClipToScreen ( const Camera3D cam,
int  winW,
int  winH,
const glm::vec4 &  clip,
float &  screenX,
float &  screenY 
)

Project a 4-D clip-space point (after SH clipping) to a screen pixel.

No NDC X/Y boundary test — the caller relies on per-pixel viewport clipping inside drawLineInternal / fillPolygonInternal. Returns false only when clip.w <= 0 (should not occur after near clipping).

◆ cameraEffectiveViewport()

void bgi::cameraEffectiveViewport ( const Camera3D cam,
int  winW,
int  winH,
int &  x,
int &  y,
int &  w,
int &  h 
)

Returns the effective screen-space viewport rectangle (pixels) for a camera.

When cam.vpW == 0 the entire window (winW × winH) is used.

◆ cameraProjMatrix()

glm::mat4 bgi::cameraProjMatrix ( const Camera3D cam,
float  aspectRatio 
)

Builds the projection matrix.

For orthographic cameras the extents are taken from orthoLeftorthoTop. When all four are zero the extents are auto-computed from worldHeight2d (and aspectRatio for the width). For 2-D cameras (is2D == true) the ortho extents are derived from pan2dX/Y, zoom2d, and worldHeight2d so that the view is always aspect-correct.

◆ cameraScreenToRay()

void bgi::cameraScreenToRay ( const Camera3D cam,
int  winW,
int  winH,
float  screenX,
float  screenY,
float &  rayOx,
float &  rayOy,
float &  rayOz,
float &  rayDx,
float &  rayDy,
float &  rayDz 
)

Unprojects a screen pixel to a world-space ray.

The ray origin is on the near plane; the direction is normalised. Screen coordinates follow the same top-left / Y-down convention as cameraWorldToScreen.

Parameters
camCamera to use for unprojection.
winW,winHFull GLFW window dimensions.
screenX,screenYInput screen pixel.
rayOx,rayOy,rayOzOutput ray origin (world space).
rayDx,rayDy,rayDzOutput normalised ray direction (world space).

◆ cameraViewMatrix()

glm::mat4 bgi::cameraViewMatrix ( const Camera3D cam)

Builds the view matrix from eye / target / up, or from the 2-D pan / zoom / rotation fields when cam.is2D is true.

◆ cameraVPMatrix()

glm::mat4 bgi::cameraVPMatrix ( const Camera3D cam,
float  aspectRatio 
)

Returns the combined view-projection matrix (proj × view).

◆ cameraWorldToClip()

glm::vec4 bgi::cameraWorldToClip ( const Camera3D cam,
int  winW,
int  winH,
float  wx,
float  wy,
float  wz 
)

Transform a world-space point to 4-D clip space via the camera's VP matrix.

Use this to prepare vertices for Sutherland-Hodgman clipping.

◆ cameraWorldToScreen()

bool bgi::cameraWorldToScreen ( const Camera3D cam,
int  winW,
int  winH,
float  wx,
float  wy,
float  wz,
float &  screenX,
float &  screenY 
)

Projects a world-space point to a screen pixel.

Screen coordinates are returned with (0,0) at the top-left corner and Y increasing downward, matching classic BGI and most windowing conventions.

Parameters
camCamera to use for projection.
winWFull GLFW window width in pixels.
winHFull GLFW window height in pixels.
wx,wy,wzWorld-space input point.
screenXOutput screen X pixel coordinate.
screenYOutput screen Y pixel coordinate.
Returns
true if the point is within the view frustum (visible), false if it is behind the camera or outside clip depth.

◆ cameraWorldToScreenForced()

bool bgi::cameraWorldToScreenForced ( const Camera3D cam,
int  winW,
int  winH,
float  wx,
float  wy,
float  wz,
float &  screenX,
float &  screenY 
)

Like cameraWorldToScreen but skips the NDC frustum boundary test.

The returned screen coordinates may be outside the viewport rectangle (negative or beyond winW/winH). The only hard rejection is a point that is truly behind the camera (clip.w ≤ 0 for perspective cameras). This variant is used by polygon and line renderers that rely on per-pixel viewport clipping inside drawLineInternal / fillPolygonInternal, enabling correct partial clipping when primitives straddle viewport edges.

◆ captureImage()

bool bgi::captureImage ( int  left,
int  top,
int  right,
int  bottom,
void *  bitmap 
)

◆ clearActivePage()

void bgi::clearActivePage ( int  color)

◆ clearViewportRegion()

void bgi::clearViewportRegion ( int  color)

◆ clipLineByPlane()

bool bgi::clipLineByPlane ( glm::vec4 &  A,
glm::vec4 &  B,
const glm::vec4 &  plane 
)

Clip a LINE SEGMENT in clip space against one half-space in place.

Returns false (and leaves A/B undefined) when both endpoints are outside.

◆ clipLineZPlanes()

bool bgi::clipLineZPlanes ( glm::vec4 &  A,
glm::vec4 &  B 
)

Clip a line segment against near and far Z planes.

Returns false when the segment is fully clipped away.

◆ clipPolyByPlane()

void bgi::clipPolyByPlane ( std::vector< glm::vec4 > &  poly,
const glm::vec4 &  plane 
)

Sutherland-Hodgman clip step: clip a convex polygon (in 4-D clip space) against one half-space.

"Inside" is dot(plane, P) > 0.

Parameters
polyPolygon vertices (clip-space 4-D homogeneous), modified in place.
planeClip-plane coefficients (A,B,C,D): A·X+B·Y+C·Z+D·W > 0.

◆ clipPolyZPlanes()

void bgi::clipPolyZPlanes ( std::vector< glm::vec4 > &  poly)

Clip a convex polygon in clip space against the near plane (Z+W>0) and far plane (-Z+W>0).

Together these ensure W>0 (safe for perspective divide) and Z within the camera depth range.

◆ colorToRGB()

ColorRGB bgi::colorToRGB ( int  c)

resolves any colour index (0-255) to an RGB triple

◆ currentTextScaleX()

int bgi::currentTextScaleX ( )

◆ currentTextScaleY()

int bgi::currentTextScaleY ( )

◆ destroyWindowIfNeeded()

void bgi::destroyWindowIfNeeded ( bool  resetGlState = false)

◆ drawCircleInternal()

void bgi::drawCircleInternal ( int  cx,
int  cy,
int  radius,
int  color 
)

◆ drawEllipseInternal()

void bgi::drawEllipseInternal ( int  cx,
int  cy,
int  startAngle,
int  endAngle,
int  xradius,
int  yradius,
int  color 
)

◆ drawGlyph()

void bgi::drawGlyph ( int  x,
int  y,
std::uint32_t  codepoint,
int  color 
)

◆ drawImage()

bool bgi::drawImage ( int  left,
int  top,
const void *  bitmap,
int  op 
)

◆ drawLineInternal()

void bgi::drawLineInternal ( int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

◆ drawOutlineText()

void bgi::drawOutlineText ( int  x,
int  y,
int  fontId,
const std::vector< std::uint32_t > &  codepoints,
int  color,
int  scaleX,
int  scaleY,
bool  vertical 
)

◆ drawOverlaysForCamera()

void bgi::drawOverlaysForCamera ( const std::string &  camName,
const Camera3D cam 
)

Draw all active overlays for one camera viewport.

Called from wxbgi_render_dds() while gMutex is held, after the DDS scene traversal and before flushToScreen(). The BGI viewport is already set to the camera panel, so overlay drawing is clipped correctly.

Parameters
camNameName of the camera being rendered.
camCamera3D data for this camera.

◆ drawPolygonInternal()

void bgi::drawPolygonInternal ( const std::vector< std::pair< int, int > > &  points,
int  color 
)

◆ drawSelectionCursorsGL()

void bgi::drawSelectionCursorsGL ( )

Draw selection cursor squares for all cameras that have the cursor enabled.

Called from flushToScreen() in the OpenGL pass (after the pixel-buffer GL_POINTS loop, before glFlush). Draws using immediate-mode OpenGL in the same pixel-space ortho projection as the page-buffer rendering.

Does NOT acquire gMutex — the caller may already hold it.

◆ drawText()

void bgi::drawText ( int  x,
int  y,
const std::string &  text,
int  color 
)

◆ fillEllipseInternal()

void bgi::fillEllipseInternal ( int  cx,
int  cy,
int  xradius,
int  yradius,
int  color 
)

◆ fillPolygonInternal()

void bgi::fillPolygonInternal ( const std::vector< std::pair< int, int > > &  points,
int  color 
)

◆ fillRectInternal()

void bgi::fillRectInternal ( int  left,
int  top,
int  right,
int  bottom,
int  color 
)

◆ flushToScreen()

void bgi::flushToScreen ( )

◆ fontCount()

int bgi::fontCount ( )

◆ fontIdFromName()

int bgi::fontIdFromName ( const std::string &  name)

◆ fontName()

const char * bgi::fontName ( int  fontId)

◆ getPixel()

int bgi::getPixel ( int  x,
int  y 
)

◆ glPassDestroy()

void bgi::glPassDestroy ( )

Release all GL objects (call before context is destroyed).

◆ glPassInit()

void bgi::glPassInit ( int  w,
int  h 
)

Initialise GL objects (shaders, VAO/VBO, page texture).

Must be called once after a valid GL context is current and GLEW is inited. Safe to call multiple times — reinitialises if already initialised.

◆ glPassResetState()

void bgi::glPassResetState ( )

Reset GL object handles to zero WITHOUT calling GL delete functions.

Call this after the GL context has already been destroyed (e.g., after closegraph() tears down the GLFW window) so that the next context can start fresh. It is NOT safe to call GL functions after context destruction.

◆ glPassResize()

void bgi::glPassResize ( int  w,
int  h 
)

Resize the page texture to match a new canvas size.

◆ imageSizeForRect()

unsigned bgi::imageSizeForRect ( int  left,
int  top,
int  right,
int  bottom 
)

◆ initForWxCanvas()

void bgi::initForWxCanvas ( int  width,
int  height 
)

◆ isKnownFont()

bool bgi::isKnownFont ( int  fontId)

◆ isOutlineFont()

bool bgi::isOutlineFont ( int  fontId)

◆ isReady()

bool bgi::isReady ( )

◆ makeFillPatternMask()

std::array< std::uint8_t, kPatternRows > bgi::makeFillPatternMask ( int  pattern)

◆ matToFloatArray()

void bgi::matToFloatArray ( const glm::mat4 &  m,
float *  out16 
)

Writes a GLM mat4 into a caller-supplied column-major float[16] array.

◆ measureOutlineText()

std::pair< int, int > bgi::measureOutlineText ( int  fontId,
const std::vector< std::uint32_t > &  codepoints,
int  scaleX,
int  scaleY,
bool  vertical 
)

◆ measureText()

std::pair< int, int > bgi::measureText ( const std::string &  text)

◆ normalizeColor()

int bgi::normalizeColor ( int  color)

◆ normalizeColorByte()

std::uint8_t bgi::normalizeColorByte ( int  value)

◆ openlbClassifyPoint()

bool bgi::openlbClassifyPoint ( const DdsScene scene,
const glm::vec3 &  worldPoint,
OpenLbMaterialHit hit,
int  defaultFluidMaterial = 1,
int  defaultSolidMaterial = 2 
)

Classify a single world-space point against all OpenLB-tagged render roots in a DDS scene and populate a hit record.

Traverses the scene's render-root list and, for each root, recursively walks the DDS object graph (handling Transforms, set-union, set-intersection, set-difference, and leaf primitives). When multiple objects contain the point, the one with the highest openlb.priority attribute wins; ties are resolved by the last candidate found (last insertion order).

An object participates only if:

  • It is visible, not deleted, and not disabled via openlb.enabled = "0" / "false" / "off".
  • It carries at least one attribute whose key begins with "openlb.".
Parameters
[in]sceneThe DDS scene to query (read-only).
[in]worldPointQuery point in world (physical) coordinates.
[out]hitHit record populated on return. Always re-initialised to a default OpenLbMaterialHit before traversal starts.
[in]defaultFluidMaterialMaterial ID used when an object's role resolves to "fluid". Defaults to 1.
[in]defaultSolidMaterialMaterial ID used when an object has no explicit material and its role is not "fluid". Defaults to 2.
Returns
true if at least one DDS object was matched; false otherwise.
Note
This function is not thread-safe. The caller must hold bgi::gMutex (or ensure no other thread modifies the scene) for the duration of the call.
Point-in-solid tests use a small epsilon (~1e-4 world units) so points very close to object boundaries may be classified as inside.

◆ openlbSampleMaterials2D()

void bgi::openlbSampleMaterials2D ( const DdsScene scene,
float  minX,
float  minY,
float  z,
int  cols,
int  rows,
float  stepX,
float  stepY,
std::vector< int > &  materials,
int  defaultFluidMaterial = 1,
int  defaultSolidMaterial = 2 
)

Sample a 2-D axis-aligned grid of world-space points and write per-cell material IDs into a std::vector<int>.

Resizes materials to cols * rows and fills it with defaultFluidMaterial. Then iterates every cell (col, row) in row-major order and samples the DDS scene at the cell's centre:

x = minX + (col + 0.5f) * stepX
y = minY + (row + 0.5f) * stepY

Output index: materials[row * cols + col]. Unmatched cells retain defaultFluidMaterial.

Parameters
[in]sceneDDS scene to query (read-only).
[in]minXX world coordinate of the grid's lower-left corner.
[in]minYY world coordinate of the grid's lower-left corner.
[in]zConstant Z world coordinate for all sample points.
[in]colsNumber of grid columns (X direction).
[in]rowsNumber of grid rows (Y direction).
[in]stepXCell width in world units.
[in]stepYCell height in world units.
[out]materialsOutput vector. Resized to max(0, cols*rows) and populated with material IDs on return.
[in]defaultFluidMaterialFill value for unmatched cells and fluid-role objects. Defaults to 1.
[in]defaultSolidMaterialSolid-role fallback passed to openlbClassifyPoint. Defaults to 2.
Note
If cols <= 0 or rows <= 0 the function returns immediately after resizing materials to 0.
This function is not thread-safe. The caller must hold bgi::gMutex (or ensure no other thread modifies the scene) for the duration of the call.

◆ outlineFontIdFromName()

int bgi::outlineFontIdFromName ( const std::string &  name)

◆ outlineFontName()

const char * bgi::outlineFontName ( int  fontId)

◆ overlayPerformPick()

void bgi::overlayPerformPick ( int  screenX,
int  screenY,
bool  multiSelect 
)

Handle a left-click pick event.

Called from the GLFW mouse-button callback while gMutex is held. Finds the nearest visible DDS drawing object within gState.selectionPickRadiusPx screen pixels of (screenX, screenY) for any camera whose selection-cursor overlay is enabled, and updates gState.selectedObjectIds.

Parameters
screenXAbsolute window X of the click.
screenYAbsolute window Y of the click.
multiSelectIf true (CTRL held), add/toggle; otherwise replace selection.

◆ renderPageAsTexture()

void bgi::renderPageAsTexture ( int  w,
int  h,
int  vpW = -1,
int  vpH = -1 
)

Pass 1 — Upload the visual page buffer as an RGBA texture and draw a fullscreen quad.

Clears GL_DEPTH_BUFFER_BIT so subsequent 3-D passes have a fresh depth buffer. Does NOT swap buffers. Auto-initialises.

Parameters
w,hPage-buffer (logical) dimensions — used for the texture.
vpW,vpHPhysical viewport dimensions for glViewport. Pass -1 to use the page dimensions (default for non-DPI-scaled paths).

◆ renderPageAsTextureAlpha()

void bgi::renderPageAsTextureAlpha ( int  w,
int  h,
int  vpW = -1,
int  vpH = -1 
)

Overlay pass — Upload the visual page buffer as an RGBA texture and composite it ON TOP of the current framebuffer contents using alpha blending.

Background-coloured pixels are rendered as fully transparent (alpha = 0) so only non-background overlay pixels appear.

Call AFTER all 3-D solid/line passes so overlays always appear in front. Does NOT clear the colour or depth buffer.

Parameters
w,hPage-buffer (logical) dimensions — used for the texture.
vpW,vpHPhysical viewport dimensions for glViewport. Pass -1 to use the page dimensions.

◆ renderPageLegacyPoints()

void bgi::renderPageLegacyPoints ( int  w,
int  h,
int  vpW = -1,
int  vpH = -1 
)

Legacy per-pixel GL_POINTS path (kept for backward compat / diagnostics).

◆ renderPageToCurrentGLContext()

void bgi::renderPageToCurrentGLContext ( int  w,
int  h 
)

◆ renderSolid3D()

void bgi::renderSolid3D ( const Camera3D cam,
const DdsObject obj 
)

Render a single Phase 4/5/6 solid/surface/extrusion DDS object through the given camera into the active BGI pixel buffer.

Called both from bgi_solid_api.cpp (immediate render) and from bgi_dds_render.cpp (DDS re-render pass).

Caller must already hold gMutex.

◆ renderSolidsGLPass()

void bgi::renderSolidsGLPass ( const PendingGlRender pending,
int  w,
int  h,
const LightState light,
const glm::mat4 &  vp,
const glm::vec3 &  camPos,
int  vpX = 0,
int  vpY = 0 
)

Pass 2a — Draw Phong-lit solid triangles (flat and/or smooth shading) with depth test.

Uses flat program for solidVerts, smooth program for smoothVerts. vpX/vpY: GL-coord bottom-left of the target sub-panel (0,0 = full window).

◆ renderSolidTriangles()

void bgi::renderSolidTriangles ( const Camera3D cam,
std::vector< SolidTriangle > &  tris,
SolidDrawMode  mode 
)

Render a pre-tessellated triangle list using the current GL/software path.

◆ renderWireframeGLPass()

void bgi::renderWireframeGLPass ( const PendingGlRender pending,
int  w,
int  h,
const glm::mat4 &  vp,
const glm::vec3 &  camPos,
int  vpX = 0,
int  vpY = 0 
)

Pass 2b — Two-pass hidden-line wireframe with proper depth-buffer HSR.

Pass 1 fills the depth buffer with solid triangles (no colour output, back-face culled). Pass 2 draws only the visible edges (depth write off, GL_LEQUAL). vpX/vpY: GL-coord bottom-left of the target sub-panel (0,0 = full window).

◆ renderWorldLinesGLPass()

void bgi::renderWorldLinesGLPass ( const PendingGlRender pending,
int  w,
int  h,
const glm::mat4 &  vp,
int  vpX = 0,
int  vpY = 0 
)

Pass 3 — Draw world-space line segments with depth test (hidden behind solids).

vpX/vpY: GL-coord bottom-left of the target sub-panel (0,0 = full window).

◆ resetDrawingState()

void bgi::resetDrawingState ( )

◆ resetPaletteState()

void bgi::resetPaletteState ( )

◆ resetStateForWindow()

void bgi::resetStateForWindow ( int  width,
int  height,
bool  doubleBuffered 
)

◆ resizePixelBuffer()

void bgi::resizePixelBuffer ( int  width,
int  height 
)

Resize only — preserves DDS scenes, cameras, UCS.

◆ setPixel()

void bgi::setPixel ( int  x,
int  y,
int  color 
)

◆ setPixelWithMode()

void bgi::setPixelWithMode ( int  x,
int  y,
int  color,
int  mode 
)

◆ syncGlfwWindowSize()

bool bgi::syncGlfwWindowSize ( )

◆ syncPagesIfNeeded()

void bgi::syncPagesIfNeeded ( )

◆ tessellateSolid3D()

bool bgi::tessellateSolid3D ( const DdsObject obj,
std::vector< SolidTriangle > &  tris 
)

Tessellate a solid/surface/extrusion DDS object into world-space triangles.

◆ toDeviceCoordinates()

bool bgi::toDeviceCoordinates ( int  x,
int  y,
int &  screenX,
int &  screenY 
)

◆ ucsFromNormal()

CoordSystem bgi::ucsFromNormal ( float  nx,
float  ny,
float  nz,
float  ox,
float  oy,
float  oz 
)

Constructs a right-handed orthonormal frame from a surface normal.

The normal becomes the UCS Z axis. An arbitrary perpendicular is chosen for X and Y using the Gram-Schmidt process, with a fallback that avoids degeneracy when the normal is parallel to the world Z axis.

Parameters
nx,ny,nzSurface normal (need not be unit length).
ox,oy,ozOrigin of the new UCS in world space.
Returns
Fully populated CoordSystem with unit-length axes.

◆ ucsLocalToWorld()

void bgi::ucsLocalToWorld ( const CoordSystem cs,
float  lx,
float  ly,
float  lz,
float &  wx,
float &  wy,
float &  wz 
)

Transforms a UCS local point into world-space coordinates.

Parameters
csUCS to transform from.
lx,ly,lzUCS local input.
wx,wy,wzOutput world-space coordinates.

◆ ucsLocalToWorldMatrix()

glm::mat4 bgi::ucsLocalToWorldMatrix ( const CoordSystem cs)

Returns the 4×4 matrix that transforms a point from UCS local space to world space.

This is the standard "model" matrix for objects defined in UCS coordinates.

◆ ucsOrthonormalise()

void bgi::ucsOrthonormalise ( CoordSystem cs)

Orthonormalises the three axis vectors of a CoordSystem in-place using the Gram-Schmidt process.

Z is recomputed as X × Y, then Y is recomputed as Z × X to guarantee a right-handed system.

◆ ucsWorldToLocal()

void bgi::ucsWorldToLocal ( const CoordSystem cs,
float  wx,
float  wy,
float  wz,
float &  lx,
float &  ly,
float &  lz 
)

Transforms a world-space point into UCS local coordinates.

Parameters
csUCS to transform into.
wx,wy,wzWorld-space input.
lx,ly,lzOutput UCS local coordinates.

◆ ucsWorldToLocalMatrix()

glm::mat4 bgi::ucsWorldToLocalMatrix ( const CoordSystem cs)

Returns the 4×4 matrix that transforms a point from world space to UCS local space.

This is the inverse of ucsLocalToWorldMatrix.

◆ useFillAt()

bool bgi::useFillAt ( int  x,
int  y 
)

◆ visualPageBuffer()

const std::vector< std::uint8_t > & bgi::visualPageBuffer ( )

◆ worldExtentsCentre()

glm::vec3 bgi::worldExtentsCentre ( const WorldExtents extents)

Returns the centre of the AABB as a vec3.

Returns the origin if extents.hasData is false.

◆ worldExtentsExpand()

void bgi::worldExtentsExpand ( WorldExtents extents,
float  x,
float  y,
float  z 
)

Expands extents to include the point (x, y, z).

Sets extents.hasData = true on first call.

◆ worldExtentsHalfSize()

glm::vec3 bgi::worldExtentsHalfSize ( const WorldExtents extents)

Returns the half-extents (half-size of each axis) as a vec3.

Returns (0,0,0) if extents.hasData is false.

Variable Documentation

◆ AND_PUT

constexpr int bgi::AND_PUT = 3
constexpr

◆ BKSLASH_FILL

constexpr int bgi::BKSLASH_FILL = 5
constexpr

◆ BLACK

constexpr int bgi::BLACK = 0
constexpr

◆ BLUE

constexpr int bgi::BLUE = 1
constexpr

◆ BOTTOM_TEXT

constexpr int bgi::BOTTOM_TEXT = 0
constexpr

◆ BROWN

constexpr int bgi::BROWN = 6
constexpr

◆ CENTER_LINE

constexpr int bgi::CENTER_LINE = 2
constexpr

◆ CENTER_TEXT

constexpr int bgi::CENTER_TEXT = 1
constexpr

◆ CLOSE_DOT_FILL

constexpr int bgi::CLOSE_DOT_FILL = 11
constexpr

◆ COPY_PUT

constexpr int bgi::COPY_PUT = 0
constexpr

◆ CYAN

constexpr int bgi::CYAN = 3
constexpr

◆ DARKGRAY

constexpr int bgi::DARKGRAY = 8
constexpr

◆ DASHED_LINE

constexpr int bgi::DASHED_LINE = 3
constexpr

◆ DEFAULT_FONT

constexpr int bgi::DEFAULT_FONT = 0
constexpr

◆ DETECT

constexpr int bgi::DETECT = 0
constexpr

◆ DOTTED_LINE

constexpr int bgi::DOTTED_LINE = 1
constexpr

◆ EMPTY_FILL

constexpr int bgi::EMPTY_FILL = 0
constexpr

◆ gMutex

std::mutex bgi::gMutex
extern

◆ GOTHIC_FONT

constexpr int bgi::GOTHIC_FONT = 8
constexpr

◆ GREEN

constexpr int bgi::GREEN = 2
constexpr

◆ gState

BgiState bgi::gState
extern

◆ HATCH_FILL

constexpr int bgi::HATCH_FILL = 7
constexpr

◆ HORIZ_DIR

constexpr int bgi::HORIZ_DIR = 0
constexpr

◆ INTERLEAVE_FILL

constexpr int bgi::INTERLEAVE_FILL = 9
constexpr

◆ kBgiPalette

const ColorRGB bgi::kBgiPalette[kPaletteSize]
extern

◆ kDefaultHeight

constexpr int bgi::kDefaultHeight = 720
constexpr

◆ kDefaultWidth

constexpr int bgi::kDefaultWidth = 960
constexpr

◆ kExtColorBase

constexpr int bgi::kExtColorBase = 16
constexpr

first user-assignable extended colour index

◆ kExtPaletteSize

constexpr int bgi::kExtPaletteSize = 240
constexpr

extended slots 16-255 (fits uint8_t pixel buffer)

◆ kPageCount

constexpr int bgi::kPageCount = 2
constexpr

◆ kPaletteSize

constexpr int bgi::kPaletteSize = 16
constexpr

classic BGI palette slots (0-15)

◆ kPatternCols

constexpr int bgi::kPatternCols = 8
constexpr

◆ kPatternRows

constexpr int bgi::kPatternRows = 8
constexpr

◆ kSelectionOrangeColor

constexpr int bgi::kSelectionOrangeColor = 252
constexpr

Reserved extended-palette slot — selection flash orange.

◆ kSelectionPurpleColor

constexpr int bgi::kSelectionPurpleColor = 253
constexpr

Reserved extended-palette slot — selection flash purple.

◆ LEFT_TEXT

constexpr int bgi::LEFT_TEXT = 0
constexpr

◆ LIGHTBLUE

constexpr int bgi::LIGHTBLUE = 9
constexpr

◆ LIGHTCYAN

constexpr int bgi::LIGHTCYAN = 11
constexpr

◆ LIGHTGRAY

constexpr int bgi::LIGHTGRAY = 7
constexpr

◆ LIGHTGREEN

constexpr int bgi::LIGHTGREEN = 10
constexpr

◆ LIGHTMAGENTA

constexpr int bgi::LIGHTMAGENTA = 13
constexpr

◆ LIGHTRED

constexpr int bgi::LIGHTRED = 12
constexpr

◆ LINE_FILL

constexpr int bgi::LINE_FILL = 2
constexpr

◆ LTBKSLASH_FILL

constexpr int bgi::LTBKSLASH_FILL = 6
constexpr

◆ LTSLASH_FILL

constexpr int bgi::LTSLASH_FILL = 3
constexpr

◆ MAGENTA

constexpr int bgi::MAGENTA = 5
constexpr

◆ MODERN_HANDJET_FONT

constexpr int bgi::MODERN_HANDJET_FONT = 18
constexpr

◆ MODERN_PLAYFAIR_DISPLAY_FONT

constexpr int bgi::MODERN_PLAYFAIR_DISPLAY_FONT = 17
constexpr

◆ MODERN_ROBOTO_FONT

constexpr int bgi::MODERN_ROBOTO_FONT = 16
constexpr

◆ NORM_WIDTH

constexpr int bgi::NORM_WIDTH = 1
constexpr

◆ NOT_PUT

constexpr int bgi::NOT_PUT = 4
constexpr

◆ OR_PUT

constexpr int bgi::OR_PUT = 2
constexpr

◆ RED

constexpr int bgi::RED = 4
constexpr

◆ RIGHT_TEXT

constexpr int bgi::RIGHT_TEXT = 2
constexpr

◆ SANS_SERIF_FONT

constexpr int bgi::SANS_SERIF_FONT = 4
constexpr

◆ SLASH_FILL

constexpr int bgi::SLASH_FILL = 4
constexpr

◆ SMALL_FONT

constexpr int bgi::SMALL_FONT = 2
constexpr

◆ SOLID_FILL

constexpr int bgi::SOLID_FILL = 1
constexpr

◆ SOLID_LINE

constexpr int bgi::SOLID_LINE = 0
constexpr

◆ THICK_WIDTH

constexpr int bgi::THICK_WIDTH = 3
constexpr

◆ TOP_TEXT

constexpr int bgi::TOP_TEXT = 2
constexpr

◆ TRIPLEX_FONT

constexpr int bgi::TRIPLEX_FONT = 1
constexpr

◆ USER_FILL

constexpr int bgi::USER_FILL = 12
constexpr

◆ USERBIT_LINE

constexpr int bgi::USERBIT_LINE = 4
constexpr

◆ VERT_DIR

constexpr int bgi::VERT_DIR = 1
constexpr

◆ WHITE

constexpr int bgi::WHITE = 15
constexpr

◆ WIDE_DOT_FILL

constexpr int bgi::WIDE_DOT_FILL = 10
constexpr

◆ XHATCH_FILL

constexpr int bgi::XHATCH_FILL = 8
constexpr

◆ XOR_PUT

constexpr int bgi::XOR_PUT = 1
constexpr

◆ YELLOW

constexpr int bgi::YELLOW = 14
constexpr