MiniDoom

src/i_gl.ml

Optional Win32/WGL OpenGL backend helpers.

Package
(global)
Reachable
Yes

Imports

Declarations

ChoosePixelFormat

extern function ChoosePixelFormat(hdc as ptr, pfd as bytes) from "gdi32.dll" symbol "ChoosePixelFormat" returns int

Asks GDI for the closest window pixel format matching the requested OpenGL framebuffer descriptor.

ParameterTypeDefaultDescription
hdcptr—`ptr` value supplied as hdc to `ChoosePixelFormat`.
pfdbytes—`bytes` value supplied as pfd to `ChoosePixelFormat`.

Returns: Result returned by the native `ChoosePixelFormat` binding as `int`.

View source

GL_ALPHA_TEST

const GL_ALPHA_TEST = 3008

Defines gl alpha test for the i gl subsystem.

View source

GL_BACK

const GL_BACK = 1029

Defines gl back for the i gl subsystem.

View source

GL_BLEND

const GL_BLEND = 3042

Defines gl blend for the i gl subsystem.

View source

GL_CLAMP

const GL_CLAMP = 10496

Defines gl clamp for the i gl subsystem.

View source

GL_COLOR_ARRAY

const GL_COLOR_ARRAY = 32886

Defines the Doom palette selection for gl color array.

View source

GL_COLOR_BUFFER_BIT

const GL_COLOR_BUFFER_BIT = 16384

Defines the Doom palette selection for gl color buffer bit.

View source

GL_COMPILE

const GL_COMPILE = 4864

Defines gl compile for the i gl subsystem.

View source

GL_CULL_FACE

const GL_CULL_FACE = 2884

Defines gl cull face for the i gl subsystem.

View source

GL_DEPTH_BUFFER_BIT

const GL_DEPTH_BUFFER_BIT = 256

Defines gl depth buffer bit for the i gl subsystem.

View source

GL_DEPTH_TEST

const GL_DEPTH_TEST = 2929

Defines gl depth test for the i gl subsystem.

View source

GL_FRONT

const GL_FRONT = 1028

Defines gl front for the i gl subsystem.

View source

GL_GREATER

const GL_GREATER = 516

Defines gl greater for the i gl subsystem.

View source

GL_INT

const GL_INT = 5124

Defines gl int for the i gl subsystem.

View source

GL_LEQUAL

const GL_LEQUAL = 515

Defines gl lequal for the i gl subsystem.

View source

GL_LESS

const GL_LESS = 513

Defines gl less for the i gl subsystem.

View source

GL_LINEAR

const GL_LINEAR = 9729

Defines gl linear for the i gl subsystem.

View source

GL_LINES

const GL_LINES = 1

Defines gl lines for the i gl subsystem.

View source

GL_MODELVIEW

const GL_MODELVIEW = 5888

Defines gl modelview for the i gl subsystem.

View source

GL_NEAREST

const GL_NEAREST = 9728

Defines gl nearest for the i gl subsystem.

View source

GL_ONE

const GL_ONE = 1

Defines gl one for the i gl subsystem.

View source

GL_ONE_MINUS_SRC_ALPHA

const GL_ONE_MINUS_SRC_ALPHA = 771

Defines the minimum gl one minus src alpha accepted by the i gl subsystem.

View source

GL_PACK_ALIGNMENT

const GL_PACK_ALIGNMENT = 3333

Defines gl pack alignment for the i gl subsystem.

View source

GL_POLYGON

const GL_POLYGON = 9

Defines gl polygon for the i gl subsystem.

View source

GL_PROJECTION

const GL_PROJECTION = 5889

Defines gl projection for the i gl subsystem.

View source

GL_QUADS

const GL_QUADS = 7

Defines gl quads for the i gl subsystem.

View source

GL_REPEAT

const GL_REPEAT = 10497

Defines gl repeat for the i gl subsystem.

View source

GL_RGB

const GL_RGB = 6407

Defines gl rgb for the i gl subsystem.

View source

GL_RGBA

const GL_RGBA = 6408

Defines gl rgba for the i gl subsystem.

View source

GL_SRC_ALPHA

const GL_SRC_ALPHA = 770

Defines gl src alpha for the i gl subsystem.

View source

GL_TEXTURE

const GL_TEXTURE = 5890

Defines gl texture for the i gl subsystem.

View source

GL_TEXTURE_2D

const GL_TEXTURE_2D = 3553

Defines gl texture 2 d for the i gl subsystem.

View source

GL_TEXTURE_COORD_ARRAY

const GL_TEXTURE_COORD_ARRAY = 32888

Defines gl texture coord array for the i gl subsystem.

View source

GL_TEXTURE_MAG_FILTER

const GL_TEXTURE_MAG_FILTER = 10240

Defines gl texture mag filter for the i gl subsystem.

View source

GL_TEXTURE_MIN_FILTER

const GL_TEXTURE_MIN_FILTER = 10241

Defines the minimum gl texture min filter accepted by the i gl subsystem.

View source

GL_TEXTURE_WRAP_S

const GL_TEXTURE_WRAP_S = 10242

Defines gl texture wrap s for the i gl subsystem.

View source

GL_TEXTURE_WRAP_T

const GL_TEXTURE_WRAP_T = 10243

Defines gl texture wrap t for the i gl subsystem.

View source

GL_TRIANGLES

const GL_TRIANGLES = 4

Defines gl triangles for the i gl subsystem.

View source

GL_UNPACK_ALIGNMENT

const GL_UNPACK_ALIGNMENT = 3317

Defines gl unpack alignment for the i gl subsystem.

View source

GL_UNSIGNED_BYTE

const GL_UNSIGNED_BYTE = 5121

Defines gl unsigned byte for the i gl subsystem.

View source

GL_VERTEX_ARRAY

const GL_VERTEX_ARRAY = 32884

Defines gl vertex array for the i gl subsystem.

View source

glAlphaFunc

extern function glAlphaFunc(func as u32, ref as double) from "opengl32.dll" symbol "glAlphaFunc" returns void

Selects the comparison and threshold used by fixed-function alpha testing.

ParameterTypeDefaultDescription
funcu32—`u32` value supplied as func to `glAlphaFunc`.
refdouble—`double` value supplied as ref to `glAlphaFunc`.

View source

glBegin

extern function glBegin(mode as u32) from "opengl32.dll" symbol "glBegin" returns void

Opens an immediate-mode primitive stream with the requested topology.

ParameterTypeDefaultDescription
modeu32—`u32` value supplied as mode to `glBegin`.

View source

glBindTexture

extern function glBindTexture(target as u32, texture as u32) from "opengl32.dll" symbol "glBindTexture" returns void

Makes a texture object current for operations on the selected texture target.

ParameterTypeDefaultDescription
targetu32—`u32` value supplied as target to `glBindTexture`.
textureu32—`u32` value supplied as texture to `glBindTexture`.

View source

glBlendFunc

extern function glBlendFunc(sfactor as u32, dfactor as u32) from "opengl32.dll" symbol "glBlendFunc" returns void

Selects source and destination factors for fixed-function color blending.

ParameterTypeDefaultDescription
sfactoru32—`u32` value supplied as sfactor to `glBlendFunc`.
dfactoru32—`u32` value supplied as dfactor to `glBlendFunc`.

View source

glCallList

extern function glCallList(list as u32) from "opengl32.dll" symbol "glCallList" returns void

Executes the commands compiled under one OpenGL display-list identifier.

ParameterTypeDefaultDescription
listu32—`u32` value supplied as list to `glCallList`.

View source

glClear

extern function glClear(mask as u32) from "opengl32.dll" symbol "glClear" returns void

Clears the framebuffer attachments selected by the caller's OpenGL mask.

ParameterTypeDefaultDescription
masku32—`u32` value supplied as mask to `glClear`.

View source

glClearDepth

extern function glClearDepth(depth as double) from "opengl32.dll" symbol "glClearDepth" returns void

Selects the depth value subsequently written by depth-buffer clears.

ParameterTypeDefaultDescription
depthdouble—`double` value supplied as depth to `glClearDepth`.

View source

glColor3ub

extern function glColor3ub(r as int, g as int, b as int) from "opengl32.dll" symbol "glColor3ub" returns void

Sets the opaque byte RGB color attached to following vertices.

ParameterTypeDefaultDescription
rint—`int` value supplied as r to `glColor3ub`.
gint—`int` value supplied as g to `glColor3ub`.
bint—Second input operand.

View source

glColor4ub

extern function glColor4ub(r as int, g as int, b as int, a as int) from "opengl32.dll" symbol "glColor4ub" returns void

Sets the byte RGBA color attached to following vertices.

ParameterTypeDefaultDescription
rint—`int` value supplied as r to `glColor4ub`.
gint—`int` value supplied as g to `glColor4ub`.
bint—Second input operand.
aint—First input operand.

View source

glColorMask

extern function glColorMask(red as bool, green as bool, blue as bool, alpha as bool) from "opengl32.dll" symbol "glColorMask" returns void

Controls framebuffer writes independently for red, green, blue, and alpha channels.

ParameterTypeDefaultDescription
redbool—`bool` value supplied as red to `glColorMask`.
greenbool—`bool` value supplied as green to `glColorMask`.
bluebool—`bool` value supplied as blue to `glColorMask`.
alphabool—`bool` value supplied as alpha to `glColorMask`.

View source

glColorPointer

extern function glColorPointer(size as int, typ as u32, stride as int, pointer as bytes) from "opengl32.dll" symbol "glColorPointer" returns void

Describes the component layout and storage of the active per-vertex color array.

ParameterTypeDefaultDescription
sizeint—Requested size in bytes or elements.
typu32—`u32` value supplied as typ to `glColorPointer`.
strideint—`int` value supplied as stride to `glColorPointer`.
pointerbytes—`bytes` value supplied as pointer to `glColorPointer`.

View source

glDeleteLists

extern function glDeleteLists(list as u32, range as int) from "opengl32.dll" symbol "glDeleteLists" returns void

Releases a contiguous range of compiled OpenGL display lists.

ParameterTypeDefaultDescription
listu32—`u32` value supplied as list to `glDeleteLists`.
rangeint—`int` value supplied as range to `glDeleteLists`.

View source

glDepthFunc

extern function glDepthFunc(func as u32) from "opengl32.dll" symbol "glDepthFunc" returns void

Selects the comparison applied between fragment depth and stored depth.

ParameterTypeDefaultDescription
funcu32—`u32` value supplied as func to `glDepthFunc`.

View source

glDepthMask

extern function glDepthMask(flag as bool) from "opengl32.dll" symbol "glDepthMask" returns void

Controls whether rasterized fragments may write to the depth buffer.

ParameterTypeDefaultDescription
flagbool—`bool` value supplied as flag to `glDepthMask`.

View source

glDisable

extern function glDisable(cap as u32) from "opengl32.dll" symbol "glDisable" returns void

Disables one fixed-function OpenGL capability for subsequent draw calls.

ParameterTypeDefaultDescription
capu32—`u32` value supplied as cap to `glDisable`.

View source

glDisableClientState

extern function glDisableClientState(array as u32) from "opengl32.dll" symbol "glDisableClientState" returns void

Disables one legacy vertex-array attribute source after array drawing.

ParameterTypeDefaultDescription
arrayu32—Array that supplies or receives the operation's values.

View source

glDrawArrays

extern function glDrawArrays(mode as u32, first as int, count as int) from "opengl32.dll" symbol "glDrawArrays" returns void

Emits a primitive range from the currently enabled legacy client arrays.

ParameterTypeDefaultDescription
modeu32—`u32` value supplied as mode to `glDrawArrays`.
firstint—`int` value supplied as first to `glDrawArrays`.
countint—Number of elements or iterations to process.

View source

glEnable

extern function glEnable(cap as u32) from "opengl32.dll" symbol "glEnable" returns void

Enables one fixed-function OpenGL capability for subsequent draw calls.

ParameterTypeDefaultDescription
capu32—`u32` value supplied as cap to `glEnable`.

View source

glEnableClientState

extern function glEnableClientState(array as u32) from "opengl32.dll" symbol "glEnableClientState" returns void

Enables one legacy vertex-array attribute source for subsequent array draws.

ParameterTypeDefaultDescription
arrayu32—Array that supplies or receives the operation's values.

View source

glEnd

extern function glEnd() from "opengl32.dll" symbol "glEnd" returns void

Closes the active immediate-mode primitive stream and submits its vertices.

View source

glEndList

extern function glEndList() from "opengl32.dll" symbol "glEndList" returns void

Finishes compilation of the currently open OpenGL display list.

View source

glFrustum

extern function glFrustum(left as double, right as double, bottom as double, top as double, zNear as double, zFar as double) from "opengl32.dll" symbol "glFrustum" returns void

Multiplies the current matrix by an asymmetric perspective projection frustum.

ParameterTypeDefaultDescription
leftdouble—`double` value supplied as left to `glFrustum`.
rightdouble—`double` value supplied as right to `glFrustum`.
bottomdouble—`double` value supplied as bottom to `glFrustum`.
topdouble—`double` value supplied as top to `glFrustum`.
zNeardouble—`double` value supplied as z near to `glFrustum`.
zFardouble—`double` value supplied as z far to `glFrustum`.

View source

glGenLists

extern function glGenLists(range as int) from "opengl32.dll" symbol "glGenLists" returns u32

Reserves a contiguous range of OpenGL display-list identifiers.

ParameterTypeDefaultDescription
rangeint—`int` value supplied as range to `glGenLists`.

Returns: Result returned by the native `glGenLists` binding as `u32`.

View source

glGenTextures

extern function glGenTextures(n as int, textures as bytes) from "opengl32.dll" symbol "glGenTextures" returns void

Allocates caller-requested OpenGL texture object identifiers.

ParameterTypeDefaultDescription
nint—Number of values to process.
texturesbytes—`bytes` value supplied as textures to `glGenTextures`.

View source

glLoadIdentity

extern function glLoadIdentity() from "opengl32.dll" symbol "glLoadIdentity" returns void

Replaces the current fixed-function matrix with the identity transform.

View source

glMatrixMode

extern function glMatrixMode(mode as u32) from "opengl32.dll" symbol "glMatrixMode" returns void

Selects the fixed-function matrix stack modified by following matrix operations.

ParameterTypeDefaultDescription
modeu32—`u32` value supplied as mode to `glMatrixMode`.

View source

glNewList

extern function glNewList(list as u32, mode as u32) from "opengl32.dll" symbol "glNewList" returns void

Begins compiling commands into a selected OpenGL display list.

ParameterTypeDefaultDescription
listu32—`u32` value supplied as list to `glNewList`.
modeu32—`u32` value supplied as mode to `glNewList`.

View source

glPixelStorei

extern function glPixelStorei(pname as u32, param as int) from "opengl32.dll" symbol "glPixelStorei" returns void

Configures byte-row alignment for texture uploads or framebuffer readback.

ParameterTypeDefaultDescription
pnameu32—`u32` value supplied as pname to `glPixelStorei`.
paramint—`int` value supplied as param to `glPixelStorei`.

View source

glPopMatrix

extern function glPopMatrix() from "opengl32.dll" symbol "glPopMatrix" returns void

Restores the previous transform from the active fixed-function matrix stack.

View source

glPushMatrix

extern function glPushMatrix() from "opengl32.dll" symbol "glPushMatrix" returns void

Saves the current transform on the active fixed-function matrix stack.

View source

glReadBuffer

extern function glReadBuffer(mode as u32) from "opengl32.dll" symbol "glReadBuffer" returns void

Selects the color buffer used by subsequent framebuffer readback.

ParameterTypeDefaultDescription
modeu32—`u32` value supplied as mode to `glReadBuffer`.

View source

glReadPixels

extern function glReadPixels(x as int, y as int, width as int, height as int, format as u32, typ as u32, pixels as bytes) from "opengl32.dll" symbol "glReadPixels" returns void

Copies a framebuffer rectangle into caller-provided pixel storage with format conversion.

ParameterTypeDefaultDescription
xint—Horizontal map- or screen-space coordinate.
yint—Vertical map- or screen-space coordinate.
widthint—Width of the target in pixels or map units.
heightint—Height of the target in pixels or map units.
formatu32—`u32` value supplied as format to `glReadPixels`.
typu32—`u32` value supplied as typ to `glReadPixels`.
pixelsbytes—`bytes` value supplied as pixels to `glReadPixels`.

View source

glRotated

extern function glRotated(angle as double, x as double, y as double, z as double) from "opengl32.dll" symbol "glRotated" returns void

Multiplies the current matrix by a double-precision axis-angle rotation.

ParameterTypeDefaultDescription
angledouble—Doom binary-angle measurement.
xdouble—Horizontal map- or screen-space coordinate.
ydouble—Vertical map- or screen-space coordinate.
zdouble—Vertical world-space coordinate.

View source

glScaled

extern function glScaled(x as double, y as double, z as double) from "opengl32.dll" symbol "glScaled" returns void

Multiplies the current matrix by independent double-precision axis scales.

ParameterTypeDefaultDescription
xdouble—Horizontal map- or screen-space coordinate.
ydouble—Vertical map- or screen-space coordinate.
zdouble—Vertical world-space coordinate.

View source

glTexCoord2d

extern function glTexCoord2d(s as double, t as double) from "opengl32.dll" symbol "glTexCoord2d" returns void

Sets the texture coordinate attached to following immediate-mode vertices.

ParameterTypeDefaultDescription
sdouble—`double` value supplied as s to `glTexCoord2d`.
tdouble—`double` value supplied as t to `glTexCoord2d`.

View source

glTexCoordPointer

extern function glTexCoordPointer(size as int, typ as u32, stride as int, pointer as bytes) from "opengl32.dll" symbol "glTexCoordPointer" returns void

Describes the component layout and storage of the active texture-coordinate array.

ParameterTypeDefaultDescription
sizeint—Requested size in bytes or elements.
typu32—`u32` value supplied as typ to `glTexCoordPointer`.
strideint—`int` value supplied as stride to `glTexCoordPointer`.
pointerbytes—`bytes` value supplied as pointer to `glTexCoordPointer`.

View source

glTexImage2D

extern function glTexImage2D(target as u32, level as int, internalFormat as int, width as int, height as int, border as int, format as u32, typ as u32, pixels as bytes) from "opengl32.dll" symbol "glTexImage2D" returns void

Defines one two-dimensional texture image from caller-supplied pixel storage.

ParameterTypeDefaultDescription
targetu32—`u32` value supplied as target to `glTexImage2D`.
levelint—`int` value supplied as level to `glTexImage2D`.
internalFormatint—`int` value supplied as internal format to `glTexImage2D`.
widthint—Width of the target in pixels or map units.
heightint—Height of the target in pixels or map units.
borderint—`int` value supplied as border to `glTexImage2D`.
formatu32—`u32` value supplied as format to `glTexImage2D`.
typu32—`u32` value supplied as typ to `glTexImage2D`.
pixelsbytes—`bytes` value supplied as pixels to `glTexImage2D`.

View source

glTexParameteri

extern function glTexParameteri(target as u32, pname as u32, param as int) from "opengl32.dll" symbol "glTexParameteri" returns void

Sets an integer sampling or wrapping parameter on the current texture target.

ParameterTypeDefaultDescription
targetu32—`u32` value supplied as target to `glTexParameteri`.
pnameu32—`u32` value supplied as pname to `glTexParameteri`.
paramint—`int` value supplied as param to `glTexParameteri`.

View source

glTranslated

extern function glTranslated(x as double, y as double, z as double) from "opengl32.dll" symbol "glTranslated" returns void

Multiplies the current matrix by a double-precision translation.

ParameterTypeDefaultDescription
xdouble—Horizontal map- or screen-space coordinate.
ydouble—Vertical map- or screen-space coordinate.
zdouble—Vertical world-space coordinate.

View source

glVertex3d

extern function glVertex3d(x as double, y as double, z as double) from "opengl32.dll" symbol "glVertex3d" returns void

Appends one double-precision position to the active immediate-mode primitive.

ParameterTypeDefaultDescription
xdouble—Horizontal map- or screen-space coordinate.
ydouble—Vertical map- or screen-space coordinate.
zdouble—Vertical world-space coordinate.

View source

glVertexPointer

extern function glVertexPointer(size as int, typ as u32, stride as int, pointer as bytes) from "opengl32.dll" symbol "glVertexPointer" returns void

Describes the component layout and storage of the active position array.

ParameterTypeDefaultDescription
sizeint—Requested size in bytes or elements.
typu32—`u32` value supplied as typ to `glVertexPointer`.
strideint—`int` value supplied as stride to `glVertexPointer`.
pointerbytes—`bytes` value supplied as pointer to `glVertexPointer`.

View source

glViewport

extern function glViewport(x as int, y as int, width as int, height as int) from "opengl32.dll" symbol "glViewport" returns void

Maps normalized device coordinates into the requested framebuffer rectangle.

ParameterTypeDefaultDescription
xint—Horizontal map- or screen-space coordinate.
yint—Vertical map- or screen-space coordinate.
widthint—Width of the target in pixels or map units.
heightint—Height of the target in pixels or map units.

View source

igl_active

igl_active

Tracks whether igl active is active in the i gl subsystem.

View source

igl_base_palette

igl_base_palette

Holds the optional igl base palette resource used by the i gl subsystem.

View source

IGL_Begin2D

function IGL_Begin2D()

Replaces the world matrices with identity clip-space transforms and disables depth testing for screen-aligned overlays.

View source

IGL_Begin3D

function IGL_Begin3D()

Makes the context current, clears the frame, and installs the perspective projection and depth state for world rendering.

View source

igl_capture_rgba

igl_capture_rgba

Holds the optional igl capture rgba resource used by the i gl subsystem.

View source

IGL_CaptureLogicalIndexed

function IGL_CaptureLogicalIndexed(dest, logicalW, logicalH)

Reads back the GL framebuffer, downsamples it to logical dimensions, and quantizes each pixel to the nearest base-palette index.

ParameterTypeDefaultDescription
destdynamic—Dest value supplied to `IGL_CaptureLogicalIndexed`.
logicalWdynamic—Logical w value supplied to `IGL_CaptureLogicalIndexed`.
logicalHdynamic—Logical h value supplied to `IGL_CaptureLogicalIndexed`.

View source

IGL_CaptureRGBA

function IGL_CaptureRGBA(dest, outW, outH, front)

Reads the selected GL color buffer, flips its bottom-up rows, and nearest-neighbor resizes RGBA pixels into the destination.

ParameterTypeDefaultDescription
destdynamic—Dest value supplied to `IGL_CaptureRGBA`.
outWdynamic—Out w value supplied to `IGL_CaptureRGBA`.
outHdynamic—Out h value supplied to `IGL_CaptureRGBA`.
frontdynamic—Front value supplied to `IGL_CaptureRGBA`.

View source

IGL_ConfigureFramePacing

function IGL_ConfigureFramePacing()

Enables VSync by default and installs a deterministic fallback limiter when needed.

View source

IGL_CreateFuzzMaskTexture

function IGL_CreateFuzzMaskTexture(data, width, height, transparent)

Creates a neutral alpha mask texture for Doom's shadow/fuzz sprites.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.
transparentdynamic—Transparent value supplied to `IGL_CreateFuzzMaskTexture`.

View source

IGL_CreateIndexedTexture

function IGL_CreateIndexedTexture(data, width, height, transparent)

Creates an indexed OpenGL texture using default Doom wall/sprite wrapping.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.
transparentdynamic—Transparent value supplied to `IGL_CreateIndexedTexture`.

View source

IGL_CreateIndexedTextureEx

function IGL_CreateIndexedTextureEx(data, width, height, transparent, repeatWrap)

Creates an indexed OpenGL texture with explicit alpha and wrap handling.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.
transparentdynamic—Transparent value supplied to `IGL_CreateIndexedTextureEx`.
repeatWrapdynamic—Repeat wrap value supplied to `IGL_CreateIndexedTextureEx`.

View source

IGL_DrawIndexedFrame

function IGL_DrawIndexedFrame(data, width, height)

Expands a palette-indexed software frame to RGBA, uploads it to the frame texture, and covers the complete output surface.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.

View source

IGL_DrawIndexedOverlay

function IGL_DrawIndexedOverlay(data, mask, width, height)

Converts and draws masked indexed HUD pixels through the native dirty-rectangle path, falling back safely when no pixels are visible.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.
maskdynamic—Mask value supplied to `IGL_DrawIndexedOverlay`.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.

View source

IGL_DrawIndexedOverlayLayers

function IGL_DrawIndexedOverlayLayers(logical, logicalMask, logicalMinX, logicalMinY, logicalMaxX, logicalMaxY, highres, highresMask, highresMinX, highresMinY, highresMaxX, highresMaxY, width, height, statusY)

Converts logical HUD pixels and prepared high-resolution patches in native code.

ParameterTypeDefaultDescription
logicaldynamic—Logical value supplied to `IGL_DrawIndexedOverlayLayers`.
logicalMaskdynamic—Logical mask value supplied to `IGL_DrawIndexedOverlayLayers`.
logicalMinXdynamic—Horizontal coordinate or vector component represented by logical min x.
logicalMinYdynamic—Vertical coordinate or vector component represented by logical min y.
logicalMaxXdynamic—Horizontal coordinate or vector component represented by logical max x.
logicalMaxYdynamic—Vertical coordinate or vector component represented by logical max y.
highresdynamic—Highres value supplied to `IGL_DrawIndexedOverlayLayers`.
highresMaskdynamic—Highres mask value supplied to `IGL_DrawIndexedOverlayLayers`.
highresMinXdynamic—Horizontal coordinate or vector component represented by highres min x.
highresMinYdynamic—Vertical coordinate or vector component represented by highres min y.
highresMaxXdynamic—Horizontal coordinate or vector component represented by highres max x.
highresMaxYdynamic—Vertical coordinate or vector component represented by highres max y.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.
statusYdynamic—Vertical coordinate or vector component represented by status y.

View source

IGL_DrawPaletteFlash

function IGL_DrawPaletteFlash()

Blends the active damage, bonus, or radiation palette tint over the finished frame without affecting depth.

View source

IGL_DrawRGBAFrame

function IGL_DrawRGBAFrame(data, width, height)

Uploads a validated RGBA frame directly to the reusable frame texture and presents it as a full-screen quad.

ParameterTypeDefaultDescription
datadynamic—Binary or structured data to process.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.

View source

IGL_DrawTextureRect

function IGL_DrawTextureRect(texid, x, y, width, height, flipped)

Draws a textured clip-space quad with caller-supplied bounds and resets the vertex color afterward.

ParameterTypeDefaultDescription
texiddynamic—Texid value supplied to `IGL_DrawTextureRect`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.
flippeddynamic—Flipped value supplied to `IGL_DrawTextureRect`.

View source

igl_enabled

igl_enabled

Tracks whether igl enabled is active in the i gl subsystem.

View source

IGL_EnsureFrameTexture

function IGL_EnsureFrameTexture()

Lazily allocates the reusable full-frame texture and configures pixel-exact sampling for software-frame presentation.

View source

IGL_EnsureOverlayTexture

function IGL_EnsureOverlayTexture()

Lazily allocates the reusable overlay texture and configures nearest filtering plus edge clamping.

View source

igl_flash_a

igl_flash_a

Tracks the mutable igl flash a value used by the i gl subsystem.

View source

igl_flash_b

igl_flash_b

Tracks the mutable igl flash b value used by the i gl subsystem.

View source

igl_flash_g

igl_flash_g

Tracks the mutable igl flash g value used by the i gl subsystem.

View source

igl_flash_r

igl_flash_r

Tracks the mutable igl flash r value used by the i gl subsystem.

View source

igl_frame_limit

igl_frame_limit

Tracks the mutable igl frame limit value used by the i gl subsystem.

View source

igl_frame_ready

igl_frame_ready

Tracks whether igl frame ready is active in the i gl subsystem.

View source

igl_frame_rgba

igl_frame_rgba

Holds the optional igl frame rgba resource used by the i gl subsystem.

View source

igl_frame_tex

igl_frame_tex

Tracks the mutable igl frame tex value used by the i gl subsystem.

View source

IGL_HasFrameReady

function IGL_HasFrameReady()

Reports whether an active OpenGL context currently has an unpresented completed frame.

View source

igl_hdc

igl_hdc

Holds the optional igl hdc resource used by the i gl subsystem.

View source

igl_height

igl_height

Tracks the mutable igl height value used by the i gl subsystem.

View source

igl_hrc

igl_hrc

Holds the optional igl hrc resource used by the i gl subsystem.

View source

IGL_Init

function IGL_Init(hwnd, hdc, width, height)

Initializes init state for the OpenGL backend system.

ParameterTypeDefaultDescription
hwnddynamic—Hwnd value supplied to `IGL_Init`.
hdcdynamic—Hdc value supplied to `IGL_Init`.
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.

View source

IGL_IsActive

function IGL_IsActive()

Returns true when the OpenGL renderer is the active drawing path.

View source

IGL_IsAvailable

function IGL_IsAvailable()

Returns true when an OpenGL context exists for optional rendering.

View source

IGL_MakeCurrent

function IGL_MakeCurrent()

Ensures the WGL context is current before issuing OpenGL commands.

View source

IGL_MarkFrameReady

function IGL_MarkFrameReady()

Records that the active renderer completed a frame eligible for presentation.

View source

igl_nearest_cache

igl_nearest_cache

Stores the igl nearest cache collection used by the i gl subsystem.

View source

IGL_NearestPaletteIndex

function IGL_NearestPaletteIndex(r, g, b)

Finds the closest RGB entry in the active 256-color palette and caches the result by quantized source color.

ParameterTypeDefaultDescription
rdynamic—R value supplied to `IGL_NearestPaletteIndex`.
gdynamic—G value supplied to `IGL_NearestPaletteIndex`.
bdynamic—Second input operand.

View source

igl_overlay_rgba

igl_overlay_rgba

Holds the optional igl overlay rgba resource used by the i gl subsystem.

View source

igl_overlay_tex

igl_overlay_tex

Tracks the mutable igl overlay tex value used by the i gl subsystem.

View source

igl_palette

igl_palette

Holds the optional igl palette resource used by the i gl subsystem.

View source

igl_palette_revision

igl_palette_revision

Tracks the mutable igl palette revision value used by the i gl subsystem.

View source

IGL_PFD_DOUBLEBUFFER

const IGL_PFD_DOUBLEBUFFER = 1

Defines igl pfd doublebuffer for the i gl subsystem.

View source

IGL_PFD_DRAW_TO_WINDOW

const IGL_PFD_DRAW_TO_WINDOW = 4

Defines igl pfd draw to window for the i gl subsystem.

View source

IGL_PFD_MAIN_PLANE

const IGL_PFD_MAIN_PLANE = 0

Defines igl pfd main plane for the i gl subsystem.

View source

IGL_PFD_SUPPORT_OPENGL

const IGL_PFD_SUPPORT_OPENGL = 32

Defines igl pfd support opengl for the i gl subsystem.

View source

IGL_PFD_TYPE_RGBA

const IGL_PFD_TYPE_RGBA = 0

Defines igl pfd type rgba for the i gl subsystem.

View source

IGL_ReadU32

inline function IGL_ReadU32(buf, off)

Decodes one unsigned 32-bit little-endian value from a byte buffer offset.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `IGL_ReadU32`.
offdynamic—Zero-based byte or element offset.

View source

igl_renderer_enabled

igl_renderer_enabled

Tracks whether igl renderer enabled is active in the i gl subsystem.

View source

IGL_Resize

function IGL_Resize(width, height)

Updates cached drawable dimensions and the OpenGL viewport, ignoring invalid or unchanged sizes.

ParameterTypeDefaultDescription
widthdynamic—Width of the target in pixels or map units.
heightdynamic—Height of the target in pixels or map units.

View source

IGL_SetPalette

function IGL_SetPalette(palette)

Copies a 256-color palette into render and conversion tables, invalidates nearest-color lookup, and bumps its revision.

ParameterTypeDefaultDescription
palettedynamic—Palette value supplied to `IGL_SetPalette`.

View source

IGL_SetPaletteFlash

function IGL_SetPaletteFlash(paletteIndex)

Converts Doom damage, bonus, and radiation palette indices into an RGBA fullscreen tint.

ParameterTypeDefaultDescription
paletteIndexdynamic—Index identifying palette.

View source

IGL_SetRendererEnabled

function IGL_SetRendererEnabled(v)

Selects whether the OpenGL renderer or the classic CPU renderer is active.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

IGL_Shutdown

function IGL_Shutdown()

Detaches and destroys the WGL context, clears backend handles, and returns renderer selection to classic software mode.

View source

IGL_Swap

function IGL_Swap()

Paces a ready frame, presents it through SwapBuffers, marks the real presentation time, and clears readiness only on success.

View source

igl_texture_palette

igl_texture_palette

Holds the optional igl texture palette resource used by the i gl subsystem.

View source

IGL_ToggleRenderer

function IGL_ToggleRenderer()

Toggles between the OpenGL and classic renderers when OpenGL is available.

View source

igl_vsync_active

igl_vsync_active

Tracks whether igl vsync active is active in the i gl subsystem.

View source

igl_vsync_requested

igl_vsync_requested

Tracks whether igl vsync requested is active in the i gl subsystem.

View source

IGL_WantsOpenGL

function IGL_WantsOpenGL()

Detects OpenGL command-line aliases, records the corresponding renderer request, and reports the selection.

View source

igl_width

igl_width

Tracks the mutable igl width value used by the i gl subsystem.

View source

IGL_WriteU16

inline function IGL_WriteU16(buf, off, value)

Encodes the low 16 bits of a value at a byte-buffer offset in little-endian order.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `IGL_WriteU16`.
offdynamic—Zero-based byte or element offset.
valuedynamic—Value consumed by the operation.

View source

IGL_WriteU32

inline function IGL_WriteU32(buf, off, value)

Encodes the low 32 bits of a value at a byte-buffer offset in little-endian order.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `IGL_WriteU32`.
offdynamic—Zero-based byte or element offset.
valuedynamic—Value consumed by the operation.

View source

MGL_BeginSpriteBatch

extern function MGL_BeginSpriteBatch(lightData as bytes, lightCount as int, viewX as double, viewY as double, rightX as double, rightZ as double, worldScale as double, footLift as double) from "MiniDoomGL.dll" symbol "MGL_BeginSpriteBatch" returns bool

Opens a native world-sprite stream and copies its frame-local lighting state.

ParameterTypeDefaultDescription
lightDatabytes—`bytes` value supplied as light data to `MGL_BeginSpriteBatch`.
lightCountint—Number of light to process.
viewXdouble—Horizontal coordinate or vector component represented by view x.
viewYdouble—Vertical coordinate or vector component represented by view y.
rightXdouble—Horizontal coordinate or vector component represented by right x.
rightZdouble—`double` value supplied as right z to `MGL_BeginSpriteBatch`.
worldScaledouble—`double` value supplied as world scale to `MGL_BeginSpriteBatch`.
footLiftdouble—`double` value supplied as foot lift to `MGL_BeginSpriteBatch`.

Returns: Result returned by the native `MGL_BeginSpriteBatch` binding as `bool`.

View source

MGL_CreateArrayBuffer

extern function MGL_CreateArrayBuffer(data as bytes, size as int) from "MiniDoomGL.dll" symbol "MGL_CreateArrayBuffer" returns u32

Uploads raw bytes to an OpenGL array buffer through the MiniDoom GL helper.

ParameterTypeDefaultDescription
databytes—Binary or structured data to process.
sizeint—Requested size in bytes or elements.

Returns: Result returned by the native `MGL_CreateArrayBuffer` binding as `u32`.

View source

MGL_CreateInterleavedGeomBuffer

extern function MGL_CreateInterleavedGeomBuffer(data as bytes, size as int) from "MiniDoomGL.dll" symbol "MGL_CreateInterleavedGeomBuffer" returns u32

Uploads MiniDoom fixed-point interleaved geometry as a float OpenGL VBO.

ParameterTypeDefaultDescription
databytes—Binary or structured data to process.
sizeint—Requested size in bytes or elements.

Returns: Result returned by the native `MGL_CreateInterleavedGeomBuffer` binding as `u32`.

View source

MGL_DeleteArrayBuffer

extern function MGL_DeleteArrayBuffer(id as u32) from "MiniDoomGL.dll" symbol "MGL_DeleteArrayBuffer" returns void

Deletes one OpenGL array buffer created through the MiniDoom GL helper.

ParameterTypeDefaultDescription
idu32—`u32` value supplied as id to `MGL_DeleteArrayBuffer`.

View source

MGL_DrawArrayBatch

extern function MGL_DrawArrayBatch(mode as u32, vertexBuffer as u32, texcoordBuffer as u32, colorBuffer as u32, count as int) from "MiniDoomGL.dll" symbol "MGL_DrawArrayBatch" returns void

Draws one VBO-backed vertex/texture/color array batch through the MiniDoom GL helper.

ParameterTypeDefaultDescription
modeu32—`u32` value supplied as mode to `MGL_DrawArrayBatch`.
vertexBufferu32—`u32` value supplied as vertex buffer to `MGL_DrawArrayBatch`.
texcoordBufferu32—`u32` value supplied as texcoord buffer to `MGL_DrawArrayBatch`.
colorBufferu32—`u32` value supplied as color buffer to `MGL_DrawArrayBatch`.
countint—Number of elements or iterations to process.

View source

MGL_DrawDynamicLightSurfaces

extern function MGL_DrawDynamicLightSurfaces(geomData as bytes, geomSize as int, lightData as bytes, lightCount as int) from "MiniDoomGL.dll" symbol "MGL_DrawDynamicLightSurfaces" returns bool

Draws additive dynamic light contribution on cached map geometry.

ParameterTypeDefaultDescription
geomDatabytes—`bytes` value supplied as geom data to `MGL_DrawDynamicLightSurfaces`.
geomSizeint—`int` value supplied as geom size to `MGL_DrawDynamicLightSurfaces`.
lightDatabytes—`bytes` value supplied as light data to `MGL_DrawDynamicLightSurfaces`.
lightCountint—Number of light to process.

Returns: Result returned by the native `MGL_DrawDynamicLightSurfaces` binding as `bool`.

View source

MGL_DrawIndexedLogicalOverlay

extern function MGL_DrawIndexedLogicalOverlay(texid as u32, data as bytes, dataSize as int, mask as bytes, maskSize as int, palette as bytes, logicalW as int, logicalH as int, scale as int, statusY as int, minX as int, minY as int, maxX as int, maxY as int) from "MiniDoomGL.dll" symbol "MGL_DrawIndexedLogicalOverlay" returns bool

Converts the scaled status area plus dirty logical-mask bounds to one minimal native RGBA overlay draw.

ParameterTypeDefaultDescription
texidu32—`u32` value supplied as texid to `MGL_DrawIndexedLogicalOverlay`.
databytes—Binary or structured data to process.
dataSizeint—`int` value supplied as data size to `MGL_DrawIndexedLogicalOverlay`.
maskbytes—`bytes` value supplied as mask to `MGL_DrawIndexedLogicalOverlay`.
maskSizeint—`int` value supplied as mask size to `MGL_DrawIndexedLogicalOverlay`.
palettebytes—`bytes` value supplied as palette to `MGL_DrawIndexedLogicalOverlay`.
logicalWint—`int` value supplied as logical w to `MGL_DrawIndexedLogicalOverlay`.
logicalHint—`int` value supplied as logical h to `MGL_DrawIndexedLogicalOverlay`.
scaleint—`int` value supplied as scale to `MGL_DrawIndexedLogicalOverlay`.
statusYint—Vertical coordinate or vector component represented by status y.
minXint—Horizontal coordinate or vector component represented by min x.
minYint—Vertical coordinate or vector component represented by min y.
maxXint—Horizontal coordinate or vector component represented by max x.
maxYint—Vertical coordinate or vector component represented by max y.

Returns: The converted the scaled status area plus dirty logical-mask bounds to one minimal native RGBA overlay draw.

View source

MGL_DrawIndexedOverlay

extern function MGL_DrawIndexedOverlay(texid as u32, data as bytes, mask as bytes, palette as bytes, width as int, height as int) from "MiniDoomGL.dll" symbol "MGL_DrawIndexedOverlay" returns bool

Converts and draws an indexed overlay with transparency mask in native code.

ParameterTypeDefaultDescription
texidu32—`u32` value supplied as texid to `MGL_DrawIndexedOverlay`.
databytes—Binary or structured data to process.
maskbytes—`bytes` value supplied as mask to `MGL_DrawIndexedOverlay`.
palettebytes—`bytes` value supplied as palette to `MGL_DrawIndexedOverlay`.
widthint—Width of the target in pixels or map units.
heightint—Height of the target in pixels or map units.

Returns: The converted and draws an indexed overlay with transparency mask in native code.

View source

MGL_DrawIndexedOverlayRect

extern function MGL_DrawIndexedOverlayRect(texid as u32, data as bytes, dataSize as int, mask as bytes, maskSize as int, palette as bytes, width as int, height as int, minX as int, minY as int, maxX as int, maxY as int) from "MiniDoomGL.dll" symbol "MGL_DrawIndexedOverlayRect" returns bool

Converts and draws only the caller-specified dirty rectangle of a masked indexed overlay.

ParameterTypeDefaultDescription
texidu32—`u32` value supplied as texid to `MGL_DrawIndexedOverlayRect`.
databytes—Binary or structured data to process.
dataSizeint—`int` value supplied as data size to `MGL_DrawIndexedOverlayRect`.
maskbytes—`bytes` value supplied as mask to `MGL_DrawIndexedOverlayRect`.
maskSizeint—`int` value supplied as mask size to `MGL_DrawIndexedOverlayRect`.
palettebytes—`bytes` value supplied as palette to `MGL_DrawIndexedOverlayRect`.
widthint—Width of the target in pixels or map units.
heightint—Height of the target in pixels or map units.
minXint—Horizontal coordinate or vector component represented by min x.
minYint—Vertical coordinate or vector component represented by min y.
maxXint—Horizontal coordinate or vector component represented by max x.
maxYint—Vertical coordinate or vector component represented by max y.

Returns: The converted and draws only the caller-specified dirty rectangle of a masked indexed overlay.

View source

MGL_DrawInterleavedBatch

extern function MGL_DrawInterleavedBatch(mode as u32, buffer as u32, count as int) from "MiniDoomGL.dll" symbol "MGL_DrawInterleavedBatch" returns void

Draws one VBO-backed interleaved vertex/texture/color batch through the MiniDoom GL helper.

ParameterTypeDefaultDescription
modeu32—`u32` value supplied as mode to `MGL_DrawInterleavedBatch`.
bufferu32—Buffer that supplies or receives data.
countint—Number of elements or iterations to process.

View source

MGL_DrawSpriteRecords

extern function MGL_DrawSpriteRecords(records as bytes, recordsSize as int, recordCount as int) from "MiniDoomGL.dll" symbol "MGL_DrawSpriteRecords" returns bool

Validates and renders a complete packed sprite-record buffer through one native call.

ParameterTypeDefaultDescription
recordsbytes—`bytes` value supplied as records to `MGL_DrawSpriteRecords`.
recordsSizeint—`int` value supplied as records size to `MGL_DrawSpriteRecords`.
recordCountint—Number of record to process.

Returns: Result returned by the native `MGL_DrawSpriteRecords` binding as `bool`.

View source

MGL_DrawVisibleGeomBatches

extern function MGL_DrawVisibleGeomBatches(mode as u32, records as bytes, recordCount as int, viewX as double, viewY as double, viewYaw as double) from "MiniDoomGL.dll" symbol "MGL_DrawVisibleGeomBatches" returns bool

Draws and culls a native batch-record buffer in the MiniDoom GL helper.

ParameterTypeDefaultDescription
modeu32—`u32` value supplied as mode to `MGL_DrawVisibleGeomBatches`.
recordsbytes—`bytes` value supplied as records to `MGL_DrawVisibleGeomBatches`.
recordCountint—Number of record to process.
viewXdouble—Horizontal coordinate or vector component represented by view x.
viewYdouble—Vertical coordinate or vector component represented by view y.
viewYawdouble—`double` value supplied as view yaw to `MGL_DrawVisibleGeomBatches`.

Returns: Result returned by the native `MGL_DrawVisibleGeomBatches` binding as `bool`.

View source

MGL_EndSpriteBatch

extern function MGL_EndSpriteBatch() from "MiniDoomGL.dll" symbol "MGL_EndSpriteBatch" returns void

Closes the native sprite stream and restores fixed-function state for subsequent renderer passes.

View source

MGL_ExpandIndexed8

extern function MGL_ExpandIndexed8(source as bytes, sourceBytes as int, dest as bytes, destBytes as int, palette as bytes, paletteBytes as int, pixels as int) from "MiniDoomGL.dll" symbol "MGL_ExpandIndexed8" returns bool

Expands an indexed software frame through its RGB palette into opaque RGBA bytes in native code.

ParameterTypeDefaultDescription
sourcebytes—Source value or buffer.
sourceBytesint—`int` value supplied as source bytes to `MGL_ExpandIndexed8`.
destbytes—`bytes` value supplied as dest to `MGL_ExpandIndexed8`.
destBytesint—`int` value supplied as dest bytes to `MGL_ExpandIndexed8`.
palettebytes—`bytes` value supplied as palette to `MGL_ExpandIndexed8`.
paletteBytesint—`int` value supplied as palette bytes to `MGL_ExpandIndexed8`.
pixelsint—`int` value supplied as pixels to `MGL_ExpandIndexed8`.

Returns: Result returned by the native `MGL_ExpandIndexed8` binding as `bool`.

View source

MGL_FramePace

extern function MGL_FramePace(targetFps as int, leadUs as int) from "MiniDoomGL.dll" symbol "MGL_FramePace" returns void

Applies a native high-resolution fallback frame limit when VSync is unavailable or disabled.

ParameterTypeDefaultDescription
targetFpsint—`int` value supplied as target fps to `MGL_FramePace`.
leadUsint—`int` value supplied as lead us to `MGL_FramePace`.

View source

MGL_FramePaceMark

extern function MGL_FramePaceMark() from "MiniDoomGL.dll" symbol "MGL_FramePaceMark" returns void

Marks the actual completion time of a successful presentation as the anchor for the next native pacing deadline.

View source

MGL_GetLastDrawnBatches

extern function MGL_GetLastDrawnBatches() from "MiniDoomGL.dll" symbol "MGL_GetLastDrawnBatches" returns int

Returns the number of batches drawn by the last native batch-record draw.

Returns: The number of batches drawn by the last native batch-record draw.

View source

MGL_GetLastDrawnVertices

extern function MGL_GetLastDrawnVertices() from "MiniDoomGL.dll" symbol "MGL_GetLastDrawnVertices" returns int

Returns the number of vertices drawn by the last native batch-record draw.

Returns: The number of vertices drawn by the last native batch-record draw.

View source

MGL_InitVBO

extern function MGL_InitVBO() from "MiniDoomGL.dll" symbol "MGL_InitVBO" returns bool

Initializes optional MiniDoom OpenGL VBO helper functions for static geometry batches.

Returns: Result returned by the native `MGL_InitVBO` binding as `bool`.

View source

MGL_RasterColumn8

extern function MGL_RasterColumn8(dest as bytes, destBytes as int, destIndex as int, destStride as int, count as int, source as bytes, sourceBytes as int, sourceOffset as int, sourceLength as int, colormap as bytes, colormapLength as int, frac as int, fracStep as int, sourceClamp as int) from "MiniDoomGL.dll" symbol "MGL_RasterColumn8" returns bool

Rasterizes one clipped 8-bit software column in native code and rejects malformed buffer ranges.

ParameterTypeDefaultDescription
destbytes—`bytes` value supplied as dest to `MGL_RasterColumn8`.
destBytesint—`int` value supplied as dest bytes to `MGL_RasterColumn8`.
destIndexint—Index identifying dest.
destStrideint—`int` value supplied as dest stride to `MGL_RasterColumn8`.
countint—Number of elements or iterations to process.
sourcebytes—Source value or buffer.
sourceBytesint—`int` value supplied as source bytes to `MGL_RasterColumn8`.
sourceOffsetint—`int` value supplied as source offset to `MGL_RasterColumn8`.
sourceLengthint—`int` value supplied as source length to `MGL_RasterColumn8`.
colormapbytes—`bytes` value supplied as colormap to `MGL_RasterColumn8`.
colormapLengthint—`int` value supplied as colormap length to `MGL_RasterColumn8`.
fracint—`int` value supplied as frac to `MGL_RasterColumn8`.
fracStepint—`int` value supplied as frac step to `MGL_RasterColumn8`.
sourceClampint—`int` value supplied as source clamp to `MGL_RasterColumn8`.

Returns: Result returned by the native `MGL_RasterColumn8` binding as `bool`.

View source

MGL_RasterSpan8

extern function MGL_RasterSpan8(dest as bytes, destBytes as int, destIndex as int, count as int, source as bytes, sourceBytes as int, colormap as bytes, colormapLength as int, sourceWidth as int, sourceHeight as int, xFrac as int, yFrac as int, xStep as int, yStep as int) from "MiniDoomGL.dll" symbol "MGL_RasterSpan8" returns bool

Rasterizes one clipped 8-bit software floor or ceiling span in native code and rejects malformed buffer ranges.

ParameterTypeDefaultDescription
destbytes—`bytes` value supplied as dest to `MGL_RasterSpan8`.
destBytesint—`int` value supplied as dest bytes to `MGL_RasterSpan8`.
destIndexint—Index identifying dest.
countint—Number of elements or iterations to process.
sourcebytes—Source value or buffer.
sourceBytesint—`int` value supplied as source bytes to `MGL_RasterSpan8`.
colormapbytes—`bytes` value supplied as colormap to `MGL_RasterSpan8`.
colormapLengthint—`int` value supplied as colormap length to `MGL_RasterSpan8`.
sourceWidthint—Width of source width in pixels or map units.
sourceHeightint—Height of source height in pixels or map units.
xFracint—`int` value supplied as x frac to `MGL_RasterSpan8`.
yFracint—`int` value supplied as y frac to `MGL_RasterSpan8`.
xStepint—`int` value supplied as x step to `MGL_RasterSpan8`.
yStepint—`int` value supplied as y step to `MGL_RasterSpan8`.

Returns: Result returned by the native `MGL_RasterSpan8` binding as `bool`.

View source

MGL_SetSwapInterval

extern function MGL_SetSwapInterval(interval as int) from "MiniDoomGL.dll" symbol "MGL_SetSwapInterval" returns bool

Sets the WGL swap interval when the driver exposes wglSwapIntervalEXT.

ParameterTypeDefaultDescription
intervalint—`int` value supplied as interval to `MGL_SetSwapInterval`.

Returns: Result returned by the native `MGL_SetSwapInterval` binding as `bool`.

View source

MGL_SubmitSprite

extern function MGL_SubmitSprite(texid as u32, flags as int, baseLight as int, fixedX as int, fixedY as int, fixedZ as int, width as int, height as int, yOffset as int) from "MiniDoomGL.dll" symbol "MGL_SubmitSprite" returns void

Streams one packed world sprite into the active native batch, including lighting, flip, and fuzz-shadow flags.

ParameterTypeDefaultDescription
texidu32—`u32` value supplied as texid to `MGL_SubmitSprite`.
flagsint—Bit flags that control the operation.
baseLightint—`int` value supplied as base light to `MGL_SubmitSprite`.
fixedXint—Horizontal coordinate or vector component represented by fixed x.
fixedYint—Vertical coordinate or vector component represented by fixed y.
fixedZint—`int` value supplied as fixed z to `MGL_SubmitSprite`.
widthint—Width of the target in pixels or map units.
heightint—Height of the target in pixels or map units.
yOffsetint—`int` value supplied as y offset to `MGL_SubmitSprite`.

View source

MGL_TimeMicroseconds

extern function MGL_TimeMicroseconds() from "MiniDoomGL.dll" symbol "MGL_TimeMicroseconds" returns i64

Reads the native high-resolution monotonic timer used by profiling and frame pacing.

Returns: The requested the native high-resolution monotonic timer used by profiling and frame pacing.

View source

SetPixelFormat

extern function SetPixelFormat(hdc as ptr, format as int, pfd as bytes) from "gdi32.dll" symbol "SetPixelFormat" returns bool

Installs the selected immutable pixel format on the window device context before WGL context creation.

ParameterTypeDefaultDescription
hdcptr—`ptr` value supplied as hdc to `SetPixelFormat`.
formatint—`int` value supplied as format to `SetPixelFormat`.
pfdbytes—`bytes` value supplied as pfd to `SetPixelFormat`.

Returns: Result returned by the native `SetPixelFormat` binding as `bool`.

View source

SwapBuffers

extern function SwapBuffers(hdc as ptr) from "gdi32.dll" symbol "SwapBuffers" returns bool

Presents the device context's back buffer to the window after a rendered frame.

ParameterTypeDefaultDescription
hdcptr—`ptr` value supplied as hdc to `SwapBuffers`.

Returns: Result returned by the native `SwapBuffers` binding as `bool`.

View source

wglCreateContext

extern function wglCreateContext(hdc as ptr) from "opengl32.dll" symbol "wglCreateContext" returns ptr

Creates a legacy WGL rendering context for the configured window device context.

ParameterTypeDefaultDescription
hdcptr—`ptr` value supplied as hdc to `wglCreateContext`.

Returns: The resulting legacy WGL rendering context for the configured window device context.

View source

wglDeleteContext

extern function wglDeleteContext(hglrc as ptr) from "opengl32.dll" symbol "wglDeleteContext" returns bool

Releases a WGL rendering context after it has been detached from the calling thread.

ParameterTypeDefaultDescription
hglrcptr—`ptr` value supplied as hglrc to `wglDeleteContext`.

Returns: Result returned by the native `wglDeleteContext` binding as `bool`.

View source

wglMakeCurrent

extern function wglMakeCurrent(hdc as ptr, hglrc as ptr) from "opengl32.dll" symbol "wglMakeCurrent" returns bool

Associates a WGL context with the calling thread and its window device context.

ParameterTypeDefaultDescription
hdcptr—`ptr` value supplied as hdc to `wglMakeCurrent`.
hglrcptr—`ptr` value supplied as hglrc to `wglMakeCurrent`.

Returns: Result returned by the native `wglMakeCurrent` binding as `bool`.

View source