MiniQuake

src/miniquake/render/draw2d.ml

Package
miniquake.render.draw2d
Reachable
Yes

Imports

Declarations

alphaByte

function alphaByte(alpha)

Return alpha byte derived from the active module state.

ParameterTypeDefaultDescription
alphadynamic—The alpha input consumed by `alphaByte`.

View source

begin2d

function begin2d(width, height)

Initialize state for begin2d.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

BuildTranslatedPicPixels

function BuildTranslatedPicPixels(picture, translation)

Create and initialize translated pic pixels.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `BuildTranslatedPicPixels`.
translationdynamic—The translation input consumed by `BuildTranslatedPicPixels`.

View source

BuildUpload32Levels

function BuildUpload32Levels(data, width, height, mipmap)

Create and initialize upload32 levels.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
mipmapdynamic—The mipmap input consumed by `BuildUpload32Levels`.

View source

char_texture

char_texture

Tracks the module-level char texture state owned by `miniquake.render.draw2d`.

View source

character

function character(texture, x, y, code, scale, alpha)

Implements the `character` operation for `miniquake.render.draw2d` (character).

ParameterTypeDefaultDescription
texturedynamic—Texture resource processed by the operation.
xdynamic—The x input consumed by `character`.
ydynamic—The y input consumed by `character`.
codedynamic—The code input consumed by `character`.
scaledynamic—The scale input consumed by `character`.
alphadynamic—The alpha input consumed by `character`.

View source

CharTexture

function CharTexture()

Implements the `CharTexture` operation for `miniquake.render.draw2d` (char texture).

View source

conback

conback

Tracks the module-level conback state owned by `miniquake.render.draw2d`.

View source

configureDraw

function configureDraw(filesystem, palette, cvars)

============================================================================= gl_draw.c compatibility surface =============================================================================

ParameterTypeDefaultDescription
filesystemdynamic—The filesystem input consumed by `configureDraw`.
palettedynamic—The palette input consumed by `configureDraw`.
cvarsdynamic—The cvars input consumed by `configureDraw`.

View source

currenttexture

currenttexture

Tracks the module-level currenttexture state owned by `miniquake.render.draw2d`.

View source

currentTextureSlots

currentTextureSlots

Tracks the module-level current texture slots state owned by `miniquake.render.draw2d`.

View source

Draw_AlphaPic

function Draw_AlphaPic(x, y, picture, alpha)

Render alpha pic.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_AlphaPic`.
ydynamic—The y input consumed by `Draw_AlphaPic`.
picturedynamic—The picture input consumed by `Draw_AlphaPic`.
alphadynamic—The alpha input consumed by `Draw_AlphaPic`.

View source

Draw_AlphaPicSized

function Draw_AlphaPicSized(x, y, picture, width, height, alpha)

Render alpha pic sized.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_AlphaPicSized`.
ydynamic—The y input consumed by `Draw_AlphaPicSized`.
picturedynamic—The picture input consumed by `Draw_AlphaPicSized`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
alphadynamic—The alpha input consumed by `Draw_AlphaPicSized`.

View source

Draw_ApplyAnisotropy

function Draw_ApplyAnisotropy()

Apply the archived anisotropy level to every resident mipmapped texture. This makes the Video Mode selection effective immediately without a costly renderer or map restart.

View source

draw_backtile

draw_backtile

Tracks the module-level draw backtile state owned by `miniquake.render.draw2d`.

View source

Draw_BeginDisc

function Draw_BeginDisc()

Render begin disc.

View source

Draw_CachePic

function Draw_CachePic(path)

Render cache pic.

ParameterTypeDefaultDescription
pathdynamic—Filesystem path to process.

View source

Draw_Character

function Draw_Character(x, y, num)

Render character.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_Character`.
ydynamic—The y input consumed by `Draw_Character`.
numdynamic—The num input consumed by `Draw_Character`.

View source

draw_chars

draw_chars

Tracks the module-level draw chars state owned by `miniquake.render.draw2d`.

View source

Draw_CharToConback

function Draw_CharToConback(num, destination, destinationOffset)

C's dest pointer is represented by an explicit destination byte offset.

ParameterTypeDefaultDescription
numdynamic—The num input consumed by `Draw_CharToConback`.
destinationdynamic—Destination value or collection to update.
destinationOffsetdynamic—Zero-based offset of the requested data.

View source

Draw_ConsoleBackground

function Draw_ConsoleBackground(lines)

Render console background.

ParameterTypeDefaultDescription
linesdynamic—The lines input consumed by `Draw_ConsoleBackground`.

View source

Draw_DebugChar

function Draw_DebugChar(num)

Render debug char.

ParameterTypeDefaultDescription
numdynamic—The num input consumed by `Draw_DebugChar`.

View source

Draw_DifferentialReset

function Draw_DifferentialReset(palette)

Deterministic state injection used only by the pinned-source differential. It keeps the actual production functions under test and avoids requiring an OpenGL context merely to arrange their original global inputs.

ParameterTypeDefaultDescription
palettedynamic—The palette input consumed by `Draw_DifferentialReset`.

View source

Draw_DifferentialResetPictureCaches

function Draw_DifferentialResetPictureCaches()

Render differential reset picture caches.

View source

Draw_DifferentialSetCaches

function Draw_DifferentialSetCaches(wadPictures, menuPictures, consolePicture)

Render differential set caches.

ParameterTypeDefaultDescription
wadPicturesdynamic—The wad pictures input consumed by `Draw_DifferentialSetCaches`.
menuPicturesdynamic—The menu pictures input consumed by `Draw_DifferentialSetCaches`.
consolePicturedynamic—The console picture input consumed by `Draw_DifferentialSetCaches`.

View source

Draw_DifferentialSetGlobals

function Draw_DifferentialSetGlobals(characterTexture, translatedTexture, noBind, characters, menuPixels)

Render differential set globals.

ParameterTypeDefaultDescription
characterTexturedynamic—The character texture input consumed by `Draw_DifferentialSetGlobals`.
translatedTexturedynamic—The translated texture input consumed by `Draw_DifferentialSetGlobals`.
noBinddynamic—The no bind input consumed by `Draw_DifferentialSetGlobals`.
charactersdynamic—The characters input consumed by `Draw_DifferentialSetGlobals`.
menuPixelsdynamic—The menu pixels input consumed by `Draw_DifferentialSetGlobals`.

View source

Draw_DifferentialSetMultitexture

function Draw_DifferentialSetMultitexture(available, current, slot0, slot1)

Render differential set multitexture.

ParameterTypeDefaultDescription
availabledynamic—The available input consumed by `Draw_DifferentialSetMultitexture`.
currentdynamic—The current input consumed by `Draw_DifferentialSetMultitexture`.
slot0dynamic—The slot0 input consumed by `Draw_DifferentialSetMultitexture`.
slot1dynamic—The slot1 input consumed by `Draw_DifferentialSetMultitexture`.

View source

Draw_DifferentialSetPictures

function Draw_DifferentialSetPictures(disc, backtile, consolePicture)

Render differential set pictures.

ParameterTypeDefaultDescription
discdynamic—The disc input consumed by `Draw_DifferentialSetPictures`.
backtiledynamic—The backtile input consumed by `Draw_DifferentialSetPictures`.
consolePicturedynamic—The console picture input consumed by `Draw_DifferentialSetPictures`.

View source

Draw_DifferentialSetTextureState

function Draw_DifferentialSetTextureState(nextTexture, current, names, ids, widths, heights, mipmaps)

Render differential set texture state.

ParameterTypeDefaultDescription
nextTexturedynamic—The next texture input consumed by `Draw_DifferentialSetTextureState`.
currentdynamic—The current input consumed by `Draw_DifferentialSetTextureState`.
namesdynamic—The names input consumed by `Draw_DifferentialSetTextureState`.
idsdynamic—The ids input consumed by `Draw_DifferentialSetTextureState`.
widthsdynamic—The widths input consumed by `Draw_DifferentialSetTextureState`.
heightsdynamic—The heights input consumed by `Draw_DifferentialSetTextureState`.
mipmapsdynamic—The mipmaps input consumed by `Draw_DifferentialSetTextureState`.

View source

Draw_DifferentialState

function Draw_DifferentialState()

Render differential state.

View source

Draw_DifferentialUseAssets

function Draw_DifferentialUseAssets(filesystem, wadArchive)

Render differential use assets.

ParameterTypeDefaultDescription
filesystemdynamic—The filesystem input consumed by `Draw_DifferentialUseAssets`.
wadArchivedynamic—The wad archive input consumed by `Draw_DifferentialUseAssets`.

View source

draw_disc

draw_disc

Tracks the module-level draw disc state owned by `miniquake.render.draw2d`.

View source

Draw_EndDisc

function Draw_EndDisc()

Render end disc.

View source

Draw_FadeScreen

function Draw_FadeScreen()

Render fade screen.

View source

Draw_Fill

function Draw_Fill(x, y, width, height, colorIndex)

Render fill.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_Fill`.
ydynamic—The y input consumed by `Draw_Fill`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
colorIndexdynamic—Zero-based index of the requested entry.

View source

Draw_Init

function Draw_Init(filesystem, palette, width, height, cvars)

Render init.

ParameterTypeDefaultDescription
filesystemdynamic—The filesystem input consumed by `Draw_Init`.
palettedynamic—The palette input consumed by `Draw_Init`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
cvarsdynamic—The cvars input consumed by `Draw_Init`.

View source

Draw_Pic

function Draw_Pic(x, y, picture)

Render pic.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_Pic`.
ydynamic—The y input consumed by `Draw_Pic`.
picturedynamic—The picture input consumed by `Draw_Pic`.

View source

Draw_PicFromWad

function Draw_PicFromWad(name)

Render pic from wad.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

Draw_PicScaled

function Draw_PicScaled(picture, x, y, scale, alpha)

Render pic scaled.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `Draw_PicScaled`.
xdynamic—The x input consumed by `Draw_PicScaled`.
ydynamic—The y input consumed by `Draw_PicScaled`.
scaledynamic—The scale input consumed by `Draw_PicScaled`.
alphadynamic—The alpha input consumed by `Draw_PicScaled`.

View source

Draw_PicSized

function Draw_PicSized(picture, x, y, width, height, alpha)

Render pic sized.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `Draw_PicSized`.
xdynamic—The x input consumed by `Draw_PicSized`.
ydynamic—The y input consumed by `Draw_PicSized`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
alphadynamic—The alpha input consumed by `Draw_PicSized`.

View source

Draw_PicSizedNearest

function Draw_PicSizedNearest(picture, x, y, width, height, alpha)

Render pic sized nearest.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `Draw_PicSizedNearest`.
xdynamic—The x input consumed by `Draw_PicSizedNearest`.
ydynamic—The y input consumed by `Draw_PicSizedNearest`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
alphadynamic—The alpha input consumed by `Draw_PicSizedNearest`.

View source

Draw_PicTrace

function Draw_PicTrace(x, y, picture, width, height, alpha)

Render pic trace.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_PicTrace`.
ydynamic—The y input consumed by `Draw_PicTrace`.
picturedynamic—The picture input consumed by `Draw_PicTrace`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
alphadynamic—The alpha input consumed by `Draw_PicTrace`.

View source

Draw_SetPalette

function Draw_SetPalette(palette)

gl_draw.c owns the process-wide indexed-texture upload palette. Model and world loading use the same GL_LoadTexture path after VID_SetPalette.

ParameterTypeDefaultDescription
palettedynamic—The palette input consumed by `Draw_SetPalette`.

View source

Draw_Shutdown

function Draw_Shutdown()

Render shutdown.

View source

Draw_String

function Draw_String(x, y, text)

Render string.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_String`.
ydynamic—The y input consumed by `Draw_String`.
textdynamic—Text to parse or process.

View source

Draw_TextureMode_f

function Draw_TextureMode_f(arguments)

Render texture mode f.

ParameterTypeDefaultDescription
argumentsdynamic—Command-line arguments to inspect or execute.

View source

Draw_TileClear

function Draw_TileClear(x, y, width, height)

Render tile clear.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_TileClear`.
ydynamic—The y input consumed by `Draw_TileClear`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

Draw_TraceSetBacktile

function Draw_TraceSetBacktile(picture)

Render trace set backtile.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `Draw_TraceSetBacktile`.

View source

Draw_TransPic

function Draw_TransPic(x, y, picture)

Render trans pic.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_TransPic`.
ydynamic—The y input consumed by `Draw_TransPic`.
picturedynamic—The picture input consumed by `Draw_TransPic`.

View source

Draw_TransPicTranslate

function Draw_TransPicTranslate(x, y, picture, translation)

Render trans pic translate.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_TransPicTranslate`.
ydynamic—The y input consumed by `Draw_TransPicTranslate`.
picturedynamic—The picture input consumed by `Draw_TransPicTranslate`.
translationdynamic—The translation input consumed by `Draw_TransPicTranslate`.

View source

Draw_TransPicTranslateSized

function Draw_TransPicTranslateSized(x, y, width, height, picture, translation)

Render trans pic translate sized.

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `Draw_TransPicTranslateSized`.
ydynamic—The y input consumed by `Draw_TransPicTranslateSized`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
picturedynamic—The picture input consumed by `Draw_TransPicTranslateSized`.
translationdynamic—The translation input consumed by `Draw_TransPicTranslateSized`.

View source

drawConsole

function drawConsole(state, width, height, scale)

Render console.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.render.draw2d` state used by `drawConsole`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
scaledynamic—The scale input consumed by `drawConsole`.

View source

drawCvars

drawCvars

Tracks the module-level draw cvars state owned by `miniquake.render.draw2d`.

View source

drawFilesystem

drawFilesystem

Tracks the module-level draw filesystem state owned by `miniquake.render.draw2d`.

View source

drawPalette

drawPalette

Tracks the module-level draw palette state owned by `miniquake.render.draw2d`.

View source

drawPictureCoordinates

drawPictureCoordinates

Tracks the module-level draw picture coordinates state owned by `miniquake.render.draw2d`.

View source

drawPictureObjects

drawPictureObjects

Tracks the module-level draw picture objects state owned by `miniquake.render.draw2d`.

View source

drawPicturePixels

drawPicturePixels

Tracks the module-level draw picture pixels state owned by `miniquake.render.draw2d`.

View source

drawPictureQuad

function drawPictureQuad(picture, x, y, width, height, alpha)

Render picture quad.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `drawPictureQuad`.
xdynamic—The x input consumed by `drawPictureQuad`.
ydynamic—The y input consumed by `drawPictureQuad`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
alphadynamic—The alpha input consumed by `drawPictureQuad`.

View source

drawSbarChanges

drawSbarChanges

Tracks the module-level draw sbar changes state owned by `miniquake.render.draw2d`.

View source

drawStatus

function drawStatus(texture, width, height, text)

Render status.

ParameterTypeDefaultDescription
texturedynamic—Texture resource processed by the operation.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
textdynamic—Text to parse or process.

View source

drawVideoHeight

drawVideoHeight

Tracks the module-level draw video height state owned by `miniquake.render.draw2d`.

View source

drawVideoWidth

drawVideoWidth

Tracks the module-level draw video width state owned by `miniquake.render.draw2d`.

View source

drawViewport

drawViewport

Tracks the module-level draw viewport state owned by `miniquake.render.draw2d`.

View source

drawWad

drawWad

Tracks the module-level draw wad state owned by `miniquake.render.draw2d`.

View source

effectiveTextureMaximum

function effectiveTextureMaximum()

Return the effective upload limit. Opt-in high-resolution scaling raises the historical 1024 default to 2048 while still respecting a larger explicit gl_max_size selected by a mod or advanced configuration.

View source

end2d

function end2d()

Finalize state for end2d.

View source

ensureScrapState

function ensureScrapState()

Ensure sufficient storage or state for scrap state.

View source

filterModes

function filterModes()

Implements the `filterModes` operation for `miniquake.render.draw2d` (filter modes).

View source

gl_alpha_format

gl_alpha_format

Tracks the module-level gl alpha format state owned by `miniquake.render.draw2d`.

View source

gl_anisotropy

gl_anisotropy

Tracks the module-level gl anisotropy state owned by `miniquake.render.draw2d`.

View source

GL_Bind

function GL_Bind(texnum)

Mirror Quake's GL_Bind routine and its observable state changes.

ParameterTypeDefaultDescription
texnumdynamic—The texnum input consumed by `GL_Bind`.

View source

gl_filter_max

gl_filter_max

Tracks the module-level gl filter max state owned by `miniquake.render.draw2d`.

View source

gl_filter_min

gl_filter_min

Tracks the module-level gl filter min state owned by `miniquake.render.draw2d`.

View source

GL_FindTexture

function GL_FindTexture(identifier)

Mirror Quake's GL_FindTexture routine and its observable state changes.

ParameterTypeDefaultDescription
identifierdynamic—The identifier input consumed by `GL_FindTexture`.

View source

gl_lightmap_format

gl_lightmap_format

Tracks the module-level gl lightmap format state owned by `miniquake.render.draw2d`.

View source

GL_LoadPicTexture

function GL_LoadPicTexture(pic)

Mirror Quake's GL_LoadPicTexture routine and its observable state changes.

ParameterTypeDefaultDescription
picdynamic—The pic input consumed by `GL_LoadPicTexture`.

View source

GL_LoadTexture

function GL_LoadTexture(identifier, width, height, data, mipmap, alpha)

Mirror Quake's GL_LoadTexture routine and its observable state changes.

ParameterTypeDefaultDescription
identifierdynamic—The identifier input consumed by `GL_LoadTexture`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
datadynamic—Input data consumed by the operation.
mipmapdynamic—The mipmap input consumed by `GL_LoadTexture`.
alphadynamic—The alpha input consumed by `GL_LoadTexture`.

View source

gl_max_size

gl_max_size

Tracks the module-level gl max size state owned by `miniquake.render.draw2d`.

View source

GL_MipMap

function GL_MipMap(input, width, height)

Mirror Quake's GL_MipMap routine and its observable state changes.

ParameterTypeDefaultDescription
inputdynamic—The input input consumed by `GL_MipMap`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

GL_MipMap8Bit

function GL_MipMap8Bit(input, width, height)

Mirror Quake's GL_MipMap8Bit routine and its observable state changes.

ParameterTypeDefaultDescription
inputdynamic—The input input consumed by `GL_MipMap8Bit`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

gl_nobind

gl_nobind

Tracks the module-level gl nobind state owned by `miniquake.render.draw2d`.

View source

gl_picmip

gl_picmip

Tracks the module-level gl picmip state owned by `miniquake.render.draw2d`.

View source

GL_Resample8BitTexture

function GL_Resample8BitTexture(input, inputWidth, inputHeight, outputWidth, outputHeight)

Mirror Quake's GL_Resample8BitTexture routine and its observable state changes.

ParameterTypeDefaultDescription
inputdynamic—The input input consumed by `GL_Resample8BitTexture`.
inputWidthdynamic—The input width input consumed by `GL_Resample8BitTexture`.
inputHeightdynamic—The input height input consumed by `GL_Resample8BitTexture`.
outputWidthdynamic—The output width input consumed by `GL_Resample8BitTexture`.
outputHeightdynamic—The output height input consumed by `GL_Resample8BitTexture`.

View source

GL_ResampleTexture

function GL_ResampleTexture(input, inputWidth, inputHeight, outputWidth, outputHeight)

Mirror Quake's GL_ResampleTexture routine and its observable state changes.

ParameterTypeDefaultDescription
inputdynamic—The input input consumed by `GL_ResampleTexture`.
inputWidthdynamic—The input width input consumed by `GL_ResampleTexture`.
inputHeightdynamic—The input height input consumed by `GL_ResampleTexture`.
outputWidthdynamic—The output width input consumed by `GL_ResampleTexture`.
outputHeightdynamic—The output height input consumed by `GL_ResampleTexture`.

View source

GL_SelectTexture

function GL_SelectTexture(target)

Mirror Quake's GL_SelectTexture routine and its observable state changes.

ParameterTypeDefaultDescription
targetdynamic—The target input consumed by `GL_SelectTexture`.

View source

GL_Set2D

function GL_Set2D()

Mirror Quake's GL_Set2D routine and its observable state changes.

View source

gl_solid_format

gl_solid_format

Tracks the module-level gl solid format state owned by `miniquake.render.draw2d`.

View source

gl_textureupscale

gl_textureupscale

Tracks the module-level gl textureupscale state owned by `miniquake.render.draw2d`.

View source

GL_TextureUpscaleMode

function GL_TextureUpscaleMode()

Return the active backend-neutral texture-upscale selection.

View source

GL_Upload32

function GL_Upload32(data, width, height, mipmap, alpha)

Mirror Quake's GL_Upload32 routine and its observable state changes.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
mipmapdynamic—The mipmap input consumed by `GL_Upload32`.
alphadynamic—The alpha input consumed by `GL_Upload32`.

View source

GL_Upload8

function GL_Upload8(data, width, height, mipmap, alpha)

Mirror Quake's GL_Upload8 routine and its observable state changes.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
mipmapdynamic—The mipmap input consumed by `GL_Upload8`.
alphadynamic—The alpha input consumed by `GL_Upload8`.

View source

GL_Upload8_EXT

function GL_Upload8_EXT(data, width, height, mipmap, alpha)

Mirror Quake's GL_Upload8_EXT routine and its observable state changes.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
mipmapdynamic—The mipmap input consumed by `GL_Upload8_EXT`.
alphadynamic—The alpha input consumed by `GL_Upload8_EXT`.

View source

GL_UpscaleTextureRgba

function GL_UpscaleTextureRgba(data, width, height)

Upscale one non-UI RGBA texture before the ordinary power-of-two and mip processing. Textures which cannot gain resolution within the configured upload limit remain unchanged instead of allocating a throwaway image.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

glMultiTextureAvailable

glMultiTextureAvailable

Tracks the module-level gl multi texture available state owned by `miniquake.render.draw2d`.

View source

glTextureHeights

glTextureHeights

Tracks the module-level gl texture heights state owned by `miniquake.render.draw2d`.

View source

glTextureIds

glTextureIds

Tracks the module-level gl texture ids state owned by `miniquake.render.draw2d`.

View source

glTextureMipmaps

glTextureMipmaps

Tracks the module-level gl texture mipmaps state owned by `miniquake.render.draw2d`.

View source

glTextureNames

glTextureNames

Tracks the module-level gl texture names state owned by `miniquake.render.draw2d`.

View source

glTextureWidths

glTextureWidths

Tracks the module-level gl texture widths state owned by `miniquake.render.draw2d`.

View source

indexedFontRgba

function indexedFontRgba(pixels, palette)

Implements the `indexedFontRgba` operation for `miniquake.render.draw2d` (indexed font rgba).

ParameterTypeDefaultDescription
pixelsdynamic—The pixels input consumed by `indexedFontRgba`.
palettedynamic—The palette input consumed by `indexedFontRgba`.

View source

indexedPictureRgba

function indexedPictureRgba(pixels, palette, transparent)

Implements the `indexedPictureRgba` operation for `miniquake.render.draw2d` (indexed picture rgba).

ParameterTypeDefaultDescription
pixelsdynamic—The pixels input consumed by `indexedPictureRgba`.
palettedynamic—The palette input consumed by `indexedPictureRgba`.
transparentdynamic—The transparent input consumed by `indexedPictureRgba`.

View source

indexedToUploadRgba

function indexedToUploadRgba(data, width, height, alpha)

Implements the `indexedToUploadRgba` operation for `miniquake.render.draw2d` (indexed to upload rgba).

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
alphadynamic—The alpha input consumed by `indexedToUploadRgba`.

View source

MAX_CACHED_PICS

const MAX_CACHED_PICS = 128

Defines the max cached pics value used by `miniquake.render.draw2d`.

View source

MAX_GLTEXTURES

const MAX_GLTEXTURES = 1024

Defines the max gltextures value used by `miniquake.render.draw2d`.

View source

MAX_SCRAPS

const MAX_SCRAPS = 2

Defines the max scraps value used by `miniquake.render.draw2d`.

View source

menu_cachepics

menu_cachepics

Tracks the module-level menu cachepics state owned by `miniquake.render.draw2d`.

View source

menuplyr_pixels

menuplyr_pixels

Tracks the module-level menuplyr pixels state owned by `miniquake.render.draw2d`.

View source

nearestPaletteIndex

function nearestPaletteIndex(red, green, blue)

Return nearest palette index derived from the active module state.

ParameterTypeDefaultDescription
reddynamic—The red input consumed by `nearestPaletteIndex`.
greendynamic—The green input consumed by `nearestPaletteIndex`.
bluedynamic—The blue input consumed by `nearestPaletteIndex`.

View source

nextPowerOfTwo

function nextPowerOfTwo(value)

Return next power of two for the active module state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `nextPowerOfTwo`.

View source

oldTextureTarget

oldTextureTarget

Tracks the module-level old texture target state owned by `miniquake.render.draw2d`.

View source

parseQpic

function parseQpic(data, name)

Read and validate qpic.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
namedynamic—Stable name that identifies the requested object or option.

View source

pic_count

pic_count

Tracks the module-level pic count state owned by `miniquake.render.draw2d`.

View source

pic_texels

pic_texels

Tracks the module-level pic texels state owned by `miniquake.render.draw2d`.

View source

pictureCoordinates

function pictureCoordinates(picture)

Implements the `pictureCoordinates` operation for `miniquake.render.draw2d` (picture coordinates).

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `pictureCoordinates`.

View source

pictureFromPixels

function pictureFromPixels(name, width, height, pixels, texture, coordinates)

Implements the `pictureFromPixels` operation for `miniquake.render.draw2d` (picture from pixels).

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
pixelsdynamic—The pixels input consumed by `pictureFromPixels`.
texturedynamic—Texture resource processed by the operation.
coordinatesdynamic—The coordinates input consumed by `pictureFromPixels`.

View source

pictureMetadataIndex

function pictureMetadataIndex(picture)

Return picture metadata index derived from the active module state.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `pictureMetadataIndex`.

View source

picturePixels

function picturePixels(picture)

Implements the `picturePixels` operation for `miniquake.render.draw2d` (picture pixels).

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `picturePixels`.

View source

PictureUsesScrap

function PictureUsesScrap(picture)

Implements the `PictureUsesScrap` operation for `miniquake.render.draw2d` (picture uses scrap).

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `PictureUsesScrap`.

View source

registerDrawPicture

function registerDrawPicture(picture, coordinates, pixels)

Update subsystem configuration for register draw picture.

ParameterTypeDefaultDescription
picturedynamic—The picture input consumed by `registerDrawPicture`.
coordinatesdynamic—The coordinates input consumed by `registerDrawPicture`.
pixelsdynamic—The pixels input consumed by `registerDrawPicture`.

View source

ResetScrap

function ResetScrap(textureIds)

Update module state for scrap.

ParameterTypeDefaultDescription
textureIdsdynamic—The texture ids input consumed by `ResetScrap`.

View source

scrap_allocated

scrap_allocated

Tracks the module-level scrap allocated state owned by `miniquake.render.draw2d`.

View source

Scrap_AllocBlock

function Scrap_AllocBlock(width, height)

C returns the scrap number and writes x/y through pointer arguments. The MiniLang port returns the three values as [scrap, x, y].

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

scrap_dirty

scrap_dirty

Tracks the module-level scrap dirty state owned by `miniquake.render.draw2d`.

View source

SCRAP_HEIGHT

const SCRAP_HEIGHT = 256

Defines the scrap height value used by `miniquake.render.draw2d`.

View source

scrap_texels

scrap_texels

Tracks the module-level scrap texels state owned by `miniquake.render.draw2d`.

View source

scrap_textures

scrap_textures

Tracks the module-level scrap textures state owned by `miniquake.render.draw2d`.

View source

Scrap_Upload

function Scrap_Upload()

Mirror Quake's Scrap_Upload routine and its observable state changes.

View source

scrap_uploads

scrap_uploads

Tracks the module-level scrap uploads state owned by `miniquake.render.draw2d`.

View source

SCRAP_WIDTH

const SCRAP_WIDTH = 256

Defines the scrap width value used by `miniquake.render.draw2d`.

View source

SetVideoSize

function SetVideoSize(width, height)

Update module state for video size.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

solidQuad

function solidQuad(x, y, width, height, red, green, blue, alpha)

Implements the `solidQuad` operation for `miniquake.render.draw2d` (solid quad).

ParameterTypeDefaultDescription
xdynamic—The x input consumed by `solidQuad`.
ydynamic—The y input consumed by `solidQuad`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
reddynamic—The red input consumed by `solidQuad`.
greendynamic—The green input consumed by `solidQuad`.
bluedynamic—The blue input consumed by `solidQuad`.
alphadynamic—The alpha input consumed by `solidQuad`.

View source

string

function string(texture, x, y, text, scale, alpha)

Implements the `string` operation for `miniquake.render.draw2d` (string).

ParameterTypeDefaultDescription
texturedynamic—Texture resource processed by the operation.
xdynamic—The x input consumed by `string`.
ydynamic—The y input consumed by `string`.
textdynamic—Text to parse or process.
scaledynamic—The scale input consumed by `string`.
alphadynamic—The alpha input consumed by `string`.

View source

syncDrawCvars

function syncDrawCvars()

Update module state for draw cvars.

View source

texels

texels

Tracks the module-level texels state owned by `miniquake.render.draw2d`.

View source

texture_extension_number

texture_extension_number

Tracks the module-level texture extension number state owned by `miniquake.render.draw2d`.

View source

texturedQuad

function texturedQuad(texture, x, y, width, height, s0, t0, s1, t1, red, green, blue, alpha)

Implements the `texturedQuad` operation for `miniquake.render.draw2d` (textured quad).

ParameterTypeDefaultDescription
texturedynamic—Texture resource processed by the operation.
xdynamic—The x input consumed by `texturedQuad`.
ydynamic—The y input consumed by `texturedQuad`.
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
s0dynamic—The s0 input consumed by `texturedQuad`.
t0dynamic—The t0 input consumed by `texturedQuad`.
s1dynamic—The s1 input consumed by `texturedQuad`.
t1dynamic—The t1 input consumed by `texturedQuad`.
reddynamic—The red input consumed by `texturedQuad`.
greendynamic—The green input consumed by `texturedQuad`.
bluedynamic—The blue input consumed by `texturedQuad`.
alphadynamic—The alpha input consumed by `texturedQuad`.

View source

translate_texture

translate_texture

Tracks the module-level translate texture state owned by `miniquake.render.draw2d`.

View source

uploadFont

function uploadFont(conchars, palette)

Upload font to the active renderer.

ParameterTypeDefaultDescription
concharsdynamic—The conchars input consumed by `uploadFont`.
palettedynamic—The palette input consumed by `uploadFont`.

View source

uploadPicture

function uploadPicture(data, palette, name, transparent)

Quake qpic_t files store little-endian width/height followed by indexed pixels. Menu artwork uses palette index 255 as transparent.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
palettedynamic—The palette input consumed by `uploadPicture`.
namedynamic—Stable name that identifies the requested object or option.
transparentdynamic—The transparent input consumed by `uploadPicture`.

View source

wad_cachepics

wad_cachepics

Tracks the module-level wad cachepics state owned by `miniquake.render.draw2d`.

View source