Files
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.
| Parameter | Type | Default | Description |
|---|
hdc | ptr | — | `ptr` value supplied as hdc to `ChoosePixelFormat`. |
pfd | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
func | u32 | — | `u32` value supplied as func to `glAlphaFunc`. |
ref | double | — | `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.
| Parameter | Type | Default | Description |
|---|
mode | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
target | u32 | — | `u32` value supplied as target to `glBindTexture`. |
texture | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
sfactor | u32 | — | `u32` value supplied as sfactor to `glBlendFunc`. |
dfactor | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
list | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
mask | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
depth | double | — | `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.
| Parameter | Type | Default | Description |
|---|
r | int | — | `int` value supplied as r to `glColor3ub`. |
g | int | — | `int` value supplied as g to `glColor3ub`. |
b | int | — | 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.
| Parameter | Type | Default | Description |
|---|
r | int | — | `int` value supplied as r to `glColor4ub`. |
g | int | — | `int` value supplied as g to `glColor4ub`. |
b | int | — | Second input operand. |
a | int | — | 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.
| Parameter | Type | Default | Description |
|---|
red | bool | — | `bool` value supplied as red to `glColorMask`. |
green | bool | — | `bool` value supplied as green to `glColorMask`. |
blue | bool | — | `bool` value supplied as blue to `glColorMask`. |
alpha | bool | — | `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.
| Parameter | Type | Default | Description |
|---|
size | int | — | Requested size in bytes or elements. |
typ | u32 | — | `u32` value supplied as typ to `glColorPointer`. |
stride | int | — | `int` value supplied as stride to `glColorPointer`. |
pointer | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
list | u32 | — | `u32` value supplied as list to `glDeleteLists`. |
range | int | — | `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.
| Parameter | Type | Default | Description |
|---|
func | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
flag | bool | — | `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.
| Parameter | Type | Default | Description |
|---|
cap | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
array | u32 | — | 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.
| Parameter | Type | Default | Description |
|---|
mode | u32 | — | `u32` value supplied as mode to `glDrawArrays`. |
first | int | — | `int` value supplied as first to `glDrawArrays`. |
count | int | — | 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.
| Parameter | Type | Default | Description |
|---|
cap | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
array | u32 | — | 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.
| Parameter | Type | Default | Description |
|---|
left | double | — | `double` value supplied as left to `glFrustum`. |
right | double | — | `double` value supplied as right to `glFrustum`. |
bottom | double | — | `double` value supplied as bottom to `glFrustum`. |
top | double | — | `double` value supplied as top to `glFrustum`. |
zNear | double | — | `double` value supplied as z near to `glFrustum`. |
zFar | double | — | `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.
| Parameter | Type | Default | Description |
|---|
range | int | — | `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.
| Parameter | Type | Default | Description |
|---|
n | int | — | Number of values to process. |
textures | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
mode | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
list | u32 | — | `u32` value supplied as list to `glNewList`. |
mode | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
pname | u32 | — | `u32` value supplied as pname to `glPixelStorei`. |
param | int | — | `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.
| Parameter | Type | Default | Description |
|---|
mode | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
x | int | — | Horizontal map- or screen-space coordinate. |
y | int | — | Vertical map- or screen-space coordinate. |
width | int | — | Width of the target in pixels or map units. |
height | int | — | Height of the target in pixels or map units. |
format | u32 | — | `u32` value supplied as format to `glReadPixels`. |
typ | u32 | — | `u32` value supplied as typ to `glReadPixels`. |
pixels | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
angle | double | — | Doom binary-angle measurement. |
x | double | — | Horizontal map- or screen-space coordinate. |
y | double | — | Vertical map- or screen-space coordinate. |
z | double | — | 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.
| Parameter | Type | Default | Description |
|---|
x | double | — | Horizontal map- or screen-space coordinate. |
y | double | — | Vertical map- or screen-space coordinate. |
z | double | — | 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.
| Parameter | Type | Default | Description |
|---|
s | double | — | `double` value supplied as s to `glTexCoord2d`. |
t | double | — | `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.
| Parameter | Type | Default | Description |
|---|
size | int | — | Requested size in bytes or elements. |
typ | u32 | — | `u32` value supplied as typ to `glTexCoordPointer`. |
stride | int | — | `int` value supplied as stride to `glTexCoordPointer`. |
pointer | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
target | u32 | — | `u32` value supplied as target to `glTexImage2D`. |
level | int | — | `int` value supplied as level to `glTexImage2D`. |
internalFormat | int | — | `int` value supplied as internal format to `glTexImage2D`. |
width | int | — | Width of the target in pixels or map units. |
height | int | — | Height of the target in pixels or map units. |
border | int | — | `int` value supplied as border to `glTexImage2D`. |
format | u32 | — | `u32` value supplied as format to `glTexImage2D`. |
typ | u32 | — | `u32` value supplied as typ to `glTexImage2D`. |
pixels | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
target | u32 | — | `u32` value supplied as target to `glTexParameteri`. |
pname | u32 | — | `u32` value supplied as pname to `glTexParameteri`. |
param | int | — | `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.
| Parameter | Type | Default | Description |
|---|
x | double | — | Horizontal map- or screen-space coordinate. |
y | double | — | Vertical map- or screen-space coordinate. |
z | double | — | 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.
| Parameter | Type | Default | Description |
|---|
x | double | — | Horizontal map- or screen-space coordinate. |
y | double | — | Vertical map- or screen-space coordinate. |
z | double | — | 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.
| Parameter | Type | Default | Description |
|---|
size | int | — | Requested size in bytes or elements. |
typ | u32 | — | `u32` value supplied as typ to `glVertexPointer`. |
stride | int | — | `int` value supplied as stride to `glVertexPointer`. |
pointer | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
x | int | — | Horizontal map- or screen-space coordinate. |
y | int | — | Vertical map- or screen-space coordinate. |
width | int | — | Width of the target in pixels or map units. |
height | int | — | 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.
| Parameter | Type | Default | Description |
|---|
dest | dynamic | — | Dest value supplied to `IGL_CaptureLogicalIndexed`. |
logicalW | dynamic | — | Logical w value supplied to `IGL_CaptureLogicalIndexed`. |
logicalH | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
dest | dynamic | — | Dest value supplied to `IGL_CaptureRGBA`. |
outW | dynamic | — | Out w value supplied to `IGL_CaptureRGBA`. |
outH | dynamic | — | Out h value supplied to `IGL_CaptureRGBA`. |
front | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Binary or structured data to process. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
transparent | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Binary or structured data to process. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
transparent | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Binary or structured data to process. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
transparent | dynamic | — | Transparent value supplied to `IGL_CreateIndexedTextureEx`. |
repeatWrap | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Binary or structured data to process. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Binary or structured data to process. |
mask | dynamic | — | Mask value supplied to `IGL_DrawIndexedOverlay`. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
logical | dynamic | — | Logical value supplied to `IGL_DrawIndexedOverlayLayers`. |
logicalMask | dynamic | — | Logical mask value supplied to `IGL_DrawIndexedOverlayLayers`. |
logicalMinX | dynamic | — | Horizontal coordinate or vector component represented by logical min x. |
logicalMinY | dynamic | — | Vertical coordinate or vector component represented by logical min y. |
logicalMaxX | dynamic | — | Horizontal coordinate or vector component represented by logical max x. |
logicalMaxY | dynamic | — | Vertical coordinate or vector component represented by logical max y. |
highres | dynamic | — | Highres value supplied to `IGL_DrawIndexedOverlayLayers`. |
highresMask | dynamic | — | Highres mask value supplied to `IGL_DrawIndexedOverlayLayers`. |
highresMinX | dynamic | — | Horizontal coordinate or vector component represented by highres min x. |
highresMinY | dynamic | — | Vertical coordinate or vector component represented by highres min y. |
highresMaxX | dynamic | — | Horizontal coordinate or vector component represented by highres max x. |
highresMaxY | dynamic | — | Vertical coordinate or vector component represented by highres max y. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
statusY | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Binary or structured data to process. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
texid | dynamic | — | Texid value supplied to `IGL_DrawTextureRect`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
flipped | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
hwnd | dynamic | — | Hwnd value supplied to `IGL_Init`. |
hdc | dynamic | — | Hdc value supplied to `IGL_Init`. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
r | dynamic | — | R value supplied to `IGL_NearestPaletteIndex`. |
g | dynamic | — | G value supplied to `IGL_NearestPaletteIndex`. |
b | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `IGL_ReadU32`. |
off | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
palette | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
paletteIndex | dynamic | — | Index identifying palette. |
View source
# IGL_SetRendererEnabled
function IGL_SetRendererEnabled(v)
Selects whether the OpenGL renderer or the classic CPU renderer is active.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `IGL_WriteU16`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `IGL_WriteU32`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | Value consumed by the operation. |
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.
| Parameter | Type | Default | Description |
|---|
data | bytes | — | Binary or structured data to process. |
size | int | — | 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.
| Parameter | Type | Default | Description |
|---|
data | bytes | — | Binary or structured data to process. |
size | int | — | 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.
| Parameter | Type | Default | Description |
|---|
id | u32 | — | `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.
| Parameter | Type | Default | Description |
|---|
mode | u32 | — | `u32` value supplied as mode to `MGL_DrawArrayBatch`. |
vertexBuffer | u32 | — | `u32` value supplied as vertex buffer to `MGL_DrawArrayBatch`. |
texcoordBuffer | u32 | — | `u32` value supplied as texcoord buffer to `MGL_DrawArrayBatch`. |
colorBuffer | u32 | — | `u32` value supplied as color buffer to `MGL_DrawArrayBatch`. |
count | int | — | 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.
| Parameter | Type | Default | Description |
|---|
geomData | bytes | — | `bytes` value supplied as geom data to `MGL_DrawDynamicLightSurfaces`. |
geomSize | int | — | `int` value supplied as geom size to `MGL_DrawDynamicLightSurfaces`. |
lightData | bytes | — | `bytes` value supplied as light data to `MGL_DrawDynamicLightSurfaces`. |
lightCount | int | — | 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.
| Parameter | Type | Default | Description |
|---|
texid | u32 | — | `u32` value supplied as texid to `MGL_DrawIndexedLogicalOverlay`. |
data | bytes | — | Binary or structured data to process. |
dataSize | int | — | `int` value supplied as data size to `MGL_DrawIndexedLogicalOverlay`. |
mask | bytes | — | `bytes` value supplied as mask to `MGL_DrawIndexedLogicalOverlay`. |
maskSize | int | — | `int` value supplied as mask size to `MGL_DrawIndexedLogicalOverlay`. |
palette | bytes | — | `bytes` value supplied as palette to `MGL_DrawIndexedLogicalOverlay`. |
logicalW | int | — | `int` value supplied as logical w to `MGL_DrawIndexedLogicalOverlay`. |
logicalH | int | — | `int` value supplied as logical h to `MGL_DrawIndexedLogicalOverlay`. |
scale | int | — | `int` value supplied as scale to `MGL_DrawIndexedLogicalOverlay`. |
statusY | int | — | Vertical coordinate or vector component represented by status y. |
minX | int | — | Horizontal coordinate or vector component represented by min x. |
minY | int | — | Vertical coordinate or vector component represented by min y. |
maxX | int | — | Horizontal coordinate or vector component represented by max x. |
maxY | int | — | 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.
| Parameter | Type | Default | Description |
|---|
texid | u32 | — | `u32` value supplied as texid to `MGL_DrawIndexedOverlay`. |
data | bytes | — | Binary or structured data to process. |
mask | bytes | — | `bytes` value supplied as mask to `MGL_DrawIndexedOverlay`. |
palette | bytes | — | `bytes` value supplied as palette to `MGL_DrawIndexedOverlay`. |
width | int | — | Width of the target in pixels or map units. |
height | int | — | 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.
| Parameter | Type | Default | Description |
|---|
texid | u32 | — | `u32` value supplied as texid to `MGL_DrawIndexedOverlayRect`. |
data | bytes | — | Binary or structured data to process. |
dataSize | int | — | `int` value supplied as data size to `MGL_DrawIndexedOverlayRect`. |
mask | bytes | — | `bytes` value supplied as mask to `MGL_DrawIndexedOverlayRect`. |
maskSize | int | — | `int` value supplied as mask size to `MGL_DrawIndexedOverlayRect`. |
palette | bytes | — | `bytes` value supplied as palette to `MGL_DrawIndexedOverlayRect`. |
width | int | — | Width of the target in pixels or map units. |
height | int | — | Height of the target in pixels or map units. |
minX | int | — | Horizontal coordinate or vector component represented by min x. |
minY | int | — | Vertical coordinate or vector component represented by min y. |
maxX | int | — | Horizontal coordinate or vector component represented by max x. |
maxY | int | — | 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.
| Parameter | Type | Default | Description |
|---|
mode | u32 | — | `u32` value supplied as mode to `MGL_DrawInterleavedBatch`. |
buffer | u32 | — | Buffer that supplies or receives data. |
count | int | — | 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.
| Parameter | Type | Default | Description |
|---|
records | bytes | — | `bytes` value supplied as records to `MGL_DrawSpriteRecords`. |
recordsSize | int | — | `int` value supplied as records size to `MGL_DrawSpriteRecords`. |
recordCount | int | — | 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.
| Parameter | Type | Default | Description |
|---|
mode | u32 | — | `u32` value supplied as mode to `MGL_DrawVisibleGeomBatches`. |
records | bytes | — | `bytes` value supplied as records to `MGL_DrawVisibleGeomBatches`. |
recordCount | int | — | Number of record to process. |
viewX | double | — | Horizontal coordinate or vector component represented by view x. |
viewY | double | — | Vertical coordinate or vector component represented by view y. |
viewYaw | double | — | `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.
| Parameter | Type | Default | Description |
|---|
source | bytes | — | Source value or buffer. |
sourceBytes | int | — | `int` value supplied as source bytes to `MGL_ExpandIndexed8`. |
dest | bytes | — | `bytes` value supplied as dest to `MGL_ExpandIndexed8`. |
destBytes | int | — | `int` value supplied as dest bytes to `MGL_ExpandIndexed8`. |
palette | bytes | — | `bytes` value supplied as palette to `MGL_ExpandIndexed8`. |
paletteBytes | int | — | `int` value supplied as palette bytes to `MGL_ExpandIndexed8`. |
pixels | int | — | `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.
| Parameter | Type | Default | Description |
|---|
targetFps | int | — | `int` value supplied as target fps to `MGL_FramePace`. |
leadUs | int | — | `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.
| Parameter | Type | Default | Description |
|---|
dest | bytes | — | `bytes` value supplied as dest to `MGL_RasterColumn8`. |
destBytes | int | — | `int` value supplied as dest bytes to `MGL_RasterColumn8`. |
destIndex | int | — | Index identifying dest. |
destStride | int | — | `int` value supplied as dest stride to `MGL_RasterColumn8`. |
count | int | — | Number of elements or iterations to process. |
source | bytes | — | Source value or buffer. |
sourceBytes | int | — | `int` value supplied as source bytes to `MGL_RasterColumn8`. |
sourceOffset | int | — | `int` value supplied as source offset to `MGL_RasterColumn8`. |
sourceLength | int | — | `int` value supplied as source length to `MGL_RasterColumn8`. |
colormap | bytes | — | `bytes` value supplied as colormap to `MGL_RasterColumn8`. |
colormapLength | int | — | `int` value supplied as colormap length to `MGL_RasterColumn8`. |
frac | int | — | `int` value supplied as frac to `MGL_RasterColumn8`. |
fracStep | int | — | `int` value supplied as frac step to `MGL_RasterColumn8`. |
sourceClamp | int | — | `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.
| Parameter | Type | Default | Description |
|---|
dest | bytes | — | `bytes` value supplied as dest to `MGL_RasterSpan8`. |
destBytes | int | — | `int` value supplied as dest bytes to `MGL_RasterSpan8`. |
destIndex | int | — | Index identifying dest. |
count | int | — | Number of elements or iterations to process. |
source | bytes | — | Source value or buffer. |
sourceBytes | int | — | `int` value supplied as source bytes to `MGL_RasterSpan8`. |
colormap | bytes | — | `bytes` value supplied as colormap to `MGL_RasterSpan8`. |
colormapLength | int | — | `int` value supplied as colormap length to `MGL_RasterSpan8`. |
sourceWidth | int | — | Width of source width in pixels or map units. |
sourceHeight | int | — | Height of source height in pixels or map units. |
xFrac | int | — | `int` value supplied as x frac to `MGL_RasterSpan8`. |
yFrac | int | — | `int` value supplied as y frac to `MGL_RasterSpan8`. |
xStep | int | — | `int` value supplied as x step to `MGL_RasterSpan8`. |
yStep | int | — | `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.
| Parameter | Type | Default | Description |
|---|
interval | int | — | `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.
| Parameter | Type | Default | Description |
|---|
texid | u32 | — | `u32` value supplied as texid to `MGL_SubmitSprite`. |
flags | int | — | Bit flags that control the operation. |
baseLight | int | — | `int` value supplied as base light to `MGL_SubmitSprite`. |
fixedX | int | — | Horizontal coordinate or vector component represented by fixed x. |
fixedY | int | — | Vertical coordinate or vector component represented by fixed y. |
fixedZ | int | — | `int` value supplied as fixed z to `MGL_SubmitSprite`. |
width | int | — | Width of the target in pixels or map units. |
height | int | — | Height of the target in pixels or map units. |
yOffset | int | — | `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.
| Parameter | Type | Default | Description |
|---|
hdc | ptr | — | `ptr` value supplied as hdc to `SetPixelFormat`. |
format | int | — | `int` value supplied as format to `SetPixelFormat`. |
pfd | bytes | — | `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.
| Parameter | Type | Default | Description |
|---|
hdc | ptr | — | `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.
| Parameter | Type | Default | Description |
|---|
hdc | ptr | — | `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.
| Parameter | Type | Default | Description |
|---|
hglrc | ptr | — | `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.
| Parameter | Type | Default | Description |
|---|
hdc | ptr | — | `ptr` value supplied as hdc to `wglMakeCurrent`. |
hglrc | ptr | — | `ptr` value supplied as hglrc to `wglMakeCurrent`. |
Returns: Result returned by the native `wglMakeCurrent` binding as `bool`.
View source