# alphaByte
function alphaByte(alpha)Return alpha byte derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
alpha | dynamic | — | The alpha input consumed by `alphaByte`. |
src/miniquake/render/draw2d.mlminiquake/array_util.ml as arrayutil → src/miniquake/array_util.mlminiquake/byteio.ml as bio → src/miniquake/byteio.mlminiquake/console.ml as console → src/miniquake/console.mlminiquake/constants.ml as c → src/miniquake/constants.mlminiquake/cvar.ml as cvar → src/miniquake/cvar.mlminiquake/filesystem.ml as qfs → src/miniquake/filesystem.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/render/gl11.ml as gl → src/miniquake/render/gl11.mlminiquake/render/texture_upscale.ml as textureUpscale → src/miniquake/render/texture_upscale.mlminiquake/types.ml as t → src/miniquake/types.mlminiquake/wad.ml as wad → src/miniquake/wad.mlstd/string.ml as string → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/string.ml external dependencyfunction alphaByte(alpha)Return alpha byte derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
alpha | dynamic | — | The alpha input consumed by `alphaByte`. |
function begin2d(width, height)Initialize state for begin2d.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
function BuildTranslatedPicPixels(picture, translation)Create and initialize translated pic pixels.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `BuildTranslatedPicPixels`. |
translation | dynamic | — | The translation input consumed by `BuildTranslatedPicPixels`. |
function BuildUpload32Levels(data, width, height, mipmap)Create and initialize upload32 levels.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
mipmap | dynamic | — | The mipmap input consumed by `BuildUpload32Levels`. |
char_textureTracks the module-level char texture state owned by `miniquake.render.draw2d`.
function character(texture, x, y, code, scale, alpha)Implements the `character` operation for `miniquake.render.draw2d` (character).
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
x | dynamic | — | The x input consumed by `character`. |
y | dynamic | — | The y input consumed by `character`. |
code | dynamic | — | The code input consumed by `character`. |
scale | dynamic | — | The scale input consumed by `character`. |
alpha | dynamic | — | The alpha input consumed by `character`. |
function CharTexture()Implements the `CharTexture` operation for `miniquake.render.draw2d` (char texture).
conbackTracks the module-level conback state owned by `miniquake.render.draw2d`.
function configureDraw(filesystem, palette, cvars)============================================================================= gl_draw.c compatibility surface =============================================================================
| Parameter | Type | Default | Description |
|---|---|---|---|
filesystem | dynamic | — | The filesystem input consumed by `configureDraw`. |
palette | dynamic | — | The palette input consumed by `configureDraw`. |
cvars | dynamic | — | The cvars input consumed by `configureDraw`. |
currenttextureTracks the module-level currenttexture state owned by `miniquake.render.draw2d`.
currentTextureSlotsTracks the module-level current texture slots state owned by `miniquake.render.draw2d`.
function Draw_AlphaPic(x, y, picture, alpha)Render alpha pic.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_AlphaPic`. |
y | dynamic | — | The y input consumed by `Draw_AlphaPic`. |
picture | dynamic | — | The picture input consumed by `Draw_AlphaPic`. |
alpha | dynamic | — | The alpha input consumed by `Draw_AlphaPic`. |
function Draw_AlphaPicSized(x, y, picture, width, height, alpha)Render alpha pic sized.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_AlphaPicSized`. |
y | dynamic | — | The y input consumed by `Draw_AlphaPicSized`. |
picture | dynamic | — | The picture input consumed by `Draw_AlphaPicSized`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
alpha | dynamic | — | The alpha input consumed by `Draw_AlphaPicSized`. |
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.
draw_backtileTracks the module-level draw backtile state owned by `miniquake.render.draw2d`.
function Draw_BeginDisc()Render begin disc.
function Draw_CachePic(path)Render cache pic.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | dynamic | — | Filesystem path to process. |
function Draw_Character(x, y, num)Render character.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_Character`. |
y | dynamic | — | The y input consumed by `Draw_Character`. |
num | dynamic | — | The num input consumed by `Draw_Character`. |
draw_charsTracks the module-level draw chars state owned by `miniquake.render.draw2d`.
function Draw_CharToConback(num, destination, destinationOffset)C's dest pointer is represented by an explicit destination byte offset.
| Parameter | Type | Default | Description |
|---|---|---|---|
num | dynamic | — | The num input consumed by `Draw_CharToConback`. |
destination | dynamic | — | Destination value or collection to update. |
destinationOffset | dynamic | — | Zero-based offset of the requested data. |
function Draw_ConsoleBackground(lines)Render console background.
| Parameter | Type | Default | Description |
|---|---|---|---|
lines | dynamic | — | The lines input consumed by `Draw_ConsoleBackground`. |
function Draw_DebugChar(num)Render debug char.
| Parameter | Type | Default | Description |
|---|---|---|---|
num | dynamic | — | The num input consumed by `Draw_DebugChar`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
palette | dynamic | — | The palette input consumed by `Draw_DifferentialReset`. |
function Draw_DifferentialResetPictureCaches()Render differential reset picture caches.
function Draw_DifferentialSetCaches(wadPictures, menuPictures, consolePicture)Render differential set caches.
| Parameter | Type | Default | Description |
|---|---|---|---|
wadPictures | dynamic | — | The wad pictures input consumed by `Draw_DifferentialSetCaches`. |
menuPictures | dynamic | — | The menu pictures input consumed by `Draw_DifferentialSetCaches`. |
consolePicture | dynamic | — | The console picture input consumed by `Draw_DifferentialSetCaches`. |
function Draw_DifferentialSetGlobals(characterTexture, translatedTexture, noBind, characters, menuPixels)Render differential set globals.
| Parameter | Type | Default | Description |
|---|---|---|---|
characterTexture | dynamic | — | The character texture input consumed by `Draw_DifferentialSetGlobals`. |
translatedTexture | dynamic | — | The translated texture input consumed by `Draw_DifferentialSetGlobals`. |
noBind | dynamic | — | The no bind input consumed by `Draw_DifferentialSetGlobals`. |
characters | dynamic | — | The characters input consumed by `Draw_DifferentialSetGlobals`. |
menuPixels | dynamic | — | The menu pixels input consumed by `Draw_DifferentialSetGlobals`. |
function Draw_DifferentialSetMultitexture(available, current, slot0, slot1)Render differential set multitexture.
| Parameter | Type | Default | Description |
|---|---|---|---|
available | dynamic | — | The available input consumed by `Draw_DifferentialSetMultitexture`. |
current | dynamic | — | The current input consumed by `Draw_DifferentialSetMultitexture`. |
slot0 | dynamic | — | The slot0 input consumed by `Draw_DifferentialSetMultitexture`. |
slot1 | dynamic | — | The slot1 input consumed by `Draw_DifferentialSetMultitexture`. |
function Draw_DifferentialSetPictures(disc, backtile, consolePicture)Render differential set pictures.
| Parameter | Type | Default | Description |
|---|---|---|---|
disc | dynamic | — | The disc input consumed by `Draw_DifferentialSetPictures`. |
backtile | dynamic | — | The backtile input consumed by `Draw_DifferentialSetPictures`. |
consolePicture | dynamic | — | The console picture input consumed by `Draw_DifferentialSetPictures`. |
function Draw_DifferentialSetTextureState(nextTexture, current, names, ids, widths, heights, mipmaps)Render differential set texture state.
| Parameter | Type | Default | Description |
|---|---|---|---|
nextTexture | dynamic | — | The next texture input consumed by `Draw_DifferentialSetTextureState`. |
current | dynamic | — | The current input consumed by `Draw_DifferentialSetTextureState`. |
names | dynamic | — | The names input consumed by `Draw_DifferentialSetTextureState`. |
ids | dynamic | — | The ids input consumed by `Draw_DifferentialSetTextureState`. |
widths | dynamic | — | The widths input consumed by `Draw_DifferentialSetTextureState`. |
heights | dynamic | — | The heights input consumed by `Draw_DifferentialSetTextureState`. |
mipmaps | dynamic | — | The mipmaps input consumed by `Draw_DifferentialSetTextureState`. |
function Draw_DifferentialState()Render differential state.
function Draw_DifferentialUseAssets(filesystem, wadArchive)Render differential use assets.
| Parameter | Type | Default | Description |
|---|---|---|---|
filesystem | dynamic | — | The filesystem input consumed by `Draw_DifferentialUseAssets`. |
wadArchive | dynamic | — | The wad archive input consumed by `Draw_DifferentialUseAssets`. |
draw_discTracks the module-level draw disc state owned by `miniquake.render.draw2d`.
function Draw_EndDisc()Render end disc.
function Draw_FadeScreen()Render fade screen.
function Draw_Fill(x, y, width, height, colorIndex)Render fill.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_Fill`. |
y | dynamic | — | The y input consumed by `Draw_Fill`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
colorIndex | dynamic | — | Zero-based index of the requested entry. |
function Draw_Init(filesystem, palette, width, height, cvars)Render init.
| Parameter | Type | Default | Description |
|---|---|---|---|
filesystem | dynamic | — | The filesystem input consumed by `Draw_Init`. |
palette | dynamic | — | The palette input consumed by `Draw_Init`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
cvars | dynamic | — | The cvars input consumed by `Draw_Init`. |
function Draw_Pic(x, y, picture)Render pic.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_Pic`. |
y | dynamic | — | The y input consumed by `Draw_Pic`. |
picture | dynamic | — | The picture input consumed by `Draw_Pic`. |
function Draw_PicFromWad(name)Render pic from wad.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
function Draw_PicScaled(picture, x, y, scale, alpha)Render pic scaled.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `Draw_PicScaled`. |
x | dynamic | — | The x input consumed by `Draw_PicScaled`. |
y | dynamic | — | The y input consumed by `Draw_PicScaled`. |
scale | dynamic | — | The scale input consumed by `Draw_PicScaled`. |
alpha | dynamic | — | The alpha input consumed by `Draw_PicScaled`. |
function Draw_PicSized(picture, x, y, width, height, alpha)Render pic sized.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `Draw_PicSized`. |
x | dynamic | — | The x input consumed by `Draw_PicSized`. |
y | dynamic | — | The y input consumed by `Draw_PicSized`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
alpha | dynamic | — | The alpha input consumed by `Draw_PicSized`. |
function Draw_PicSizedNearest(picture, x, y, width, height, alpha)Render pic sized nearest.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `Draw_PicSizedNearest`. |
x | dynamic | — | The x input consumed by `Draw_PicSizedNearest`. |
y | dynamic | — | The y input consumed by `Draw_PicSizedNearest`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
alpha | dynamic | — | The alpha input consumed by `Draw_PicSizedNearest`. |
function Draw_PicTrace(x, y, picture, width, height, alpha)Render pic trace.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_PicTrace`. |
y | dynamic | — | The y input consumed by `Draw_PicTrace`. |
picture | dynamic | — | The picture input consumed by `Draw_PicTrace`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
alpha | dynamic | — | The alpha input consumed by `Draw_PicTrace`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
palette | dynamic | — | The palette input consumed by `Draw_SetPalette`. |
function Draw_Shutdown()Render shutdown.
function Draw_String(x, y, text)Render string.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_String`. |
y | dynamic | — | The y input consumed by `Draw_String`. |
text | dynamic | — | Text to parse or process. |
function Draw_TextureMode_f(arguments)Render texture mode f.
| Parameter | Type | Default | Description |
|---|---|---|---|
arguments | dynamic | — | Command-line arguments to inspect or execute. |
function Draw_TileClear(x, y, width, height)Render tile clear.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_TileClear`. |
y | dynamic | — | The y input consumed by `Draw_TileClear`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
function Draw_TraceSetBacktile(picture)Render trace set backtile.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `Draw_TraceSetBacktile`. |
function Draw_TransPic(x, y, picture)Render trans pic.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_TransPic`. |
y | dynamic | — | The y input consumed by `Draw_TransPic`. |
picture | dynamic | — | The picture input consumed by `Draw_TransPic`. |
function Draw_TransPicTranslate(x, y, picture, translation)Render trans pic translate.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_TransPicTranslate`. |
y | dynamic | — | The y input consumed by `Draw_TransPicTranslate`. |
picture | dynamic | — | The picture input consumed by `Draw_TransPicTranslate`. |
translation | dynamic | — | The translation input consumed by `Draw_TransPicTranslate`. |
function Draw_TransPicTranslateSized(x, y, width, height, picture, translation)Render trans pic translate sized.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `Draw_TransPicTranslateSized`. |
y | dynamic | — | The y input consumed by `Draw_TransPicTranslateSized`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
picture | dynamic | — | The picture input consumed by `Draw_TransPicTranslateSized`. |
translation | dynamic | — | The translation input consumed by `Draw_TransPicTranslateSized`. |
function drawConsole(state, width, height, scale)Render console.
| Parameter | Type | Default | Description |
|---|---|---|---|
state | dynamic | — | Mutable `miniquake.render.draw2d` state used by `drawConsole`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
scale | dynamic | — | The scale input consumed by `drawConsole`. |
drawCvarsTracks the module-level draw cvars state owned by `miniquake.render.draw2d`.
drawFilesystemTracks the module-level draw filesystem state owned by `miniquake.render.draw2d`.
drawPaletteTracks the module-level draw palette state owned by `miniquake.render.draw2d`.
drawPictureCoordinatesTracks the module-level draw picture coordinates state owned by `miniquake.render.draw2d`.
drawPictureObjectsTracks the module-level draw picture objects state owned by `miniquake.render.draw2d`.
drawPicturePixelsTracks the module-level draw picture pixels state owned by `miniquake.render.draw2d`.
function drawPictureQuad(picture, x, y, width, height, alpha)Render picture quad.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `drawPictureQuad`. |
x | dynamic | — | The x input consumed by `drawPictureQuad`. |
y | dynamic | — | The y input consumed by `drawPictureQuad`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
alpha | dynamic | — | The alpha input consumed by `drawPictureQuad`. |
drawSbarChangesTracks the module-level draw sbar changes state owned by `miniquake.render.draw2d`.
function drawStatus(texture, width, height, text)Render status.
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
text | dynamic | — | Text to parse or process. |
drawVideoHeightTracks the module-level draw video height state owned by `miniquake.render.draw2d`.
drawVideoWidthTracks the module-level draw video width state owned by `miniquake.render.draw2d`.
drawViewportTracks the module-level draw viewport state owned by `miniquake.render.draw2d`.
drawWadTracks the module-level draw wad state owned by `miniquake.render.draw2d`.
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.
function end2d()Finalize state for end2d.
function ensureScrapState()Ensure sufficient storage or state for scrap state.
function filterModes()Implements the `filterModes` operation for `miniquake.render.draw2d` (filter modes).
gl_alpha_formatTracks the module-level gl alpha format state owned by `miniquake.render.draw2d`.
gl_anisotropyTracks the module-level gl anisotropy state owned by `miniquake.render.draw2d`.
function GL_Bind(texnum)Mirror Quake's GL_Bind routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
texnum | dynamic | — | The texnum input consumed by `GL_Bind`. |
gl_filter_maxTracks the module-level gl filter max state owned by `miniquake.render.draw2d`.
gl_filter_minTracks the module-level gl filter min state owned by `miniquake.render.draw2d`.
function GL_FindTexture(identifier)Mirror Quake's GL_FindTexture routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
identifier | dynamic | — | The identifier input consumed by `GL_FindTexture`. |
gl_lightmap_formatTracks the module-level gl lightmap format state owned by `miniquake.render.draw2d`.
function GL_LoadPicTexture(pic)Mirror Quake's GL_LoadPicTexture routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
pic | dynamic | — | The pic input consumed by `GL_LoadPicTexture`. |
function GL_LoadTexture(identifier, width, height, data, mipmap, alpha)Mirror Quake's GL_LoadTexture routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
identifier | dynamic | — | The identifier input consumed by `GL_LoadTexture`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
data | dynamic | — | Input data consumed by the operation. |
mipmap | dynamic | — | The mipmap input consumed by `GL_LoadTexture`. |
alpha | dynamic | — | The alpha input consumed by `GL_LoadTexture`. |
gl_max_sizeTracks the module-level gl max size state owned by `miniquake.render.draw2d`.
function GL_MipMap(input, width, height)Mirror Quake's GL_MipMap routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
input | dynamic | — | The input input consumed by `GL_MipMap`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
function GL_MipMap8Bit(input, width, height)Mirror Quake's GL_MipMap8Bit routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
input | dynamic | — | The input input consumed by `GL_MipMap8Bit`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
gl_nobindTracks the module-level gl nobind state owned by `miniquake.render.draw2d`.
gl_picmipTracks the module-level gl picmip state owned by `miniquake.render.draw2d`.
function GL_Resample8BitTexture(input, inputWidth, inputHeight, outputWidth, outputHeight)Mirror Quake's GL_Resample8BitTexture routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
input | dynamic | — | The input input consumed by `GL_Resample8BitTexture`. |
inputWidth | dynamic | — | The input width input consumed by `GL_Resample8BitTexture`. |
inputHeight | dynamic | — | The input height input consumed by `GL_Resample8BitTexture`. |
outputWidth | dynamic | — | The output width input consumed by `GL_Resample8BitTexture`. |
outputHeight | dynamic | — | The output height input consumed by `GL_Resample8BitTexture`. |
function GL_ResampleTexture(input, inputWidth, inputHeight, outputWidth, outputHeight)Mirror Quake's GL_ResampleTexture routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
input | dynamic | — | The input input consumed by `GL_ResampleTexture`. |
inputWidth | dynamic | — | The input width input consumed by `GL_ResampleTexture`. |
inputHeight | dynamic | — | The input height input consumed by `GL_ResampleTexture`. |
outputWidth | dynamic | — | The output width input consumed by `GL_ResampleTexture`. |
outputHeight | dynamic | — | The output height input consumed by `GL_ResampleTexture`. |
function GL_SelectTexture(target)Mirror Quake's GL_SelectTexture routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
target | dynamic | — | The target input consumed by `GL_SelectTexture`. |
function GL_Set2D()Mirror Quake's GL_Set2D routine and its observable state changes.
gl_solid_formatTracks the module-level gl solid format state owned by `miniquake.render.draw2d`.
gl_textureupscaleTracks the module-level gl textureupscale state owned by `miniquake.render.draw2d`.
function GL_TextureUpscaleMode()Return the active backend-neutral texture-upscale selection.
function GL_Upload32(data, width, height, mipmap, alpha)Mirror Quake's GL_Upload32 routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
mipmap | dynamic | — | The mipmap input consumed by `GL_Upload32`. |
alpha | dynamic | — | The alpha input consumed by `GL_Upload32`. |
function GL_Upload8(data, width, height, mipmap, alpha)Mirror Quake's GL_Upload8 routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
mipmap | dynamic | — | The mipmap input consumed by `GL_Upload8`. |
alpha | dynamic | — | The alpha input consumed by `GL_Upload8`. |
function GL_Upload8_EXT(data, width, height, mipmap, alpha)Mirror Quake's GL_Upload8_EXT routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
mipmap | dynamic | — | The mipmap input consumed by `GL_Upload8_EXT`. |
alpha | dynamic | — | The alpha input consumed by `GL_Upload8_EXT`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
glMultiTextureAvailableTracks the module-level gl multi texture available state owned by `miniquake.render.draw2d`.
glTextureHeightsTracks the module-level gl texture heights state owned by `miniquake.render.draw2d`.
glTextureIdsTracks the module-level gl texture ids state owned by `miniquake.render.draw2d`.
glTextureMipmapsTracks the module-level gl texture mipmaps state owned by `miniquake.render.draw2d`.
glTextureNamesTracks the module-level gl texture names state owned by `miniquake.render.draw2d`.
glTextureWidthsTracks the module-level gl texture widths state owned by `miniquake.render.draw2d`.
function indexedFontRgba(pixels, palette)Implements the `indexedFontRgba` operation for `miniquake.render.draw2d` (indexed font rgba).
| Parameter | Type | Default | Description |
|---|---|---|---|
pixels | dynamic | — | The pixels input consumed by `indexedFontRgba`. |
palette | dynamic | — | The palette input consumed by `indexedFontRgba`. |
function indexedPictureRgba(pixels, palette, transparent)Implements the `indexedPictureRgba` operation for `miniquake.render.draw2d` (indexed picture rgba).
| Parameter | Type | Default | Description |
|---|---|---|---|
pixels | dynamic | — | The pixels input consumed by `indexedPictureRgba`. |
palette | dynamic | — | The palette input consumed by `indexedPictureRgba`. |
transparent | dynamic | — | The transparent input consumed by `indexedPictureRgba`. |
function indexedToUploadRgba(data, width, height, alpha)Implements the `indexedToUploadRgba` operation for `miniquake.render.draw2d` (indexed to upload rgba).
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
alpha | dynamic | — | The alpha input consumed by `indexedToUploadRgba`. |
const MAX_CACHED_PICS = 128Defines the max cached pics value used by `miniquake.render.draw2d`.
const MAX_GLTEXTURES = 1024Defines the max gltextures value used by `miniquake.render.draw2d`.
const MAX_SCRAPS = 2Defines the max scraps value used by `miniquake.render.draw2d`.
menu_cachepicsTracks the module-level menu cachepics state owned by `miniquake.render.draw2d`.
menuplyr_pixelsTracks the module-level menuplyr pixels state owned by `miniquake.render.draw2d`.
function nearestPaletteIndex(red, green, blue)Return nearest palette index derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
red | dynamic | — | The red input consumed by `nearestPaletteIndex`. |
green | dynamic | — | The green input consumed by `nearestPaletteIndex`. |
blue | dynamic | — | The blue input consumed by `nearestPaletteIndex`. |
function nextPowerOfTwo(value)Return next power of two for the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `nextPowerOfTwo`. |
oldTextureTargetTracks the module-level old texture target state owned by `miniquake.render.draw2d`.
function parseQpic(data, name)Read and validate qpic.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
name | dynamic | — | Stable name that identifies the requested object or option. |
pic_countTracks the module-level pic count state owned by `miniquake.render.draw2d`.
pic_texelsTracks the module-level pic texels state owned by `miniquake.render.draw2d`.
function pictureCoordinates(picture)Implements the `pictureCoordinates` operation for `miniquake.render.draw2d` (picture coordinates).
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `pictureCoordinates`. |
function pictureFromPixels(name, width, height, pixels, texture, coordinates)Implements the `pictureFromPixels` operation for `miniquake.render.draw2d` (picture from pixels).
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
pixels | dynamic | — | The pixels input consumed by `pictureFromPixels`. |
texture | dynamic | — | Texture resource processed by the operation. |
coordinates | dynamic | — | The coordinates input consumed by `pictureFromPixels`. |
function pictureMetadataIndex(picture)Return picture metadata index derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `pictureMetadataIndex`. |
function picturePixels(picture)Implements the `picturePixels` operation for `miniquake.render.draw2d` (picture pixels).
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `picturePixels`. |
function PictureUsesScrap(picture)Implements the `PictureUsesScrap` operation for `miniquake.render.draw2d` (picture uses scrap).
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `PictureUsesScrap`. |
function registerDrawPicture(picture, coordinates, pixels)Update subsystem configuration for register draw picture.
| Parameter | Type | Default | Description |
|---|---|---|---|
picture | dynamic | — | The picture input consumed by `registerDrawPicture`. |
coordinates | dynamic | — | The coordinates input consumed by `registerDrawPicture`. |
pixels | dynamic | — | The pixels input consumed by `registerDrawPicture`. |
function ResetScrap(textureIds)Update module state for scrap.
| Parameter | Type | Default | Description |
|---|---|---|---|
textureIds | dynamic | — | The texture ids input consumed by `ResetScrap`. |
scrap_allocatedTracks the module-level scrap allocated state owned by `miniquake.render.draw2d`.
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].
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
scrap_dirtyTracks the module-level scrap dirty state owned by `miniquake.render.draw2d`.
const SCRAP_HEIGHT = 256Defines the scrap height value used by `miniquake.render.draw2d`.
scrap_texelsTracks the module-level scrap texels state owned by `miniquake.render.draw2d`.
scrap_texturesTracks the module-level scrap textures state owned by `miniquake.render.draw2d`.
function Scrap_Upload()Mirror Quake's Scrap_Upload routine and its observable state changes.
scrap_uploadsTracks the module-level scrap uploads state owned by `miniquake.render.draw2d`.
const SCRAP_WIDTH = 256Defines the scrap width value used by `miniquake.render.draw2d`.
function SetVideoSize(width, height)Update module state for video size.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
function solidQuad(x, y, width, height, red, green, blue, alpha)Implements the `solidQuad` operation for `miniquake.render.draw2d` (solid quad).
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | The x input consumed by `solidQuad`. |
y | dynamic | — | The y input consumed by `solidQuad`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
red | dynamic | — | The red input consumed by `solidQuad`. |
green | dynamic | — | The green input consumed by `solidQuad`. |
blue | dynamic | — | The blue input consumed by `solidQuad`. |
alpha | dynamic | — | The alpha input consumed by `solidQuad`. |
function string(texture, x, y, text, scale, alpha)Implements the `string` operation for `miniquake.render.draw2d` (string).
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
x | dynamic | — | The x input consumed by `string`. |
y | dynamic | — | The y input consumed by `string`. |
text | dynamic | — | Text to parse or process. |
scale | dynamic | — | The scale input consumed by `string`. |
alpha | dynamic | — | The alpha input consumed by `string`. |
function syncDrawCvars()Update module state for draw cvars.
texelsTracks the module-level texels state owned by `miniquake.render.draw2d`.
texture_extension_numberTracks the module-level texture extension number state owned by `miniquake.render.draw2d`.
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).
| Parameter | Type | Default | Description |
|---|---|---|---|
texture | dynamic | — | Texture resource processed by the operation. |
x | dynamic | — | The x input consumed by `texturedQuad`. |
y | dynamic | — | The y input consumed by `texturedQuad`. |
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
s0 | dynamic | — | The s0 input consumed by `texturedQuad`. |
t0 | dynamic | — | The t0 input consumed by `texturedQuad`. |
s1 | dynamic | — | The s1 input consumed by `texturedQuad`. |
t1 | dynamic | — | The t1 input consumed by `texturedQuad`. |
red | dynamic | — | The red input consumed by `texturedQuad`. |
green | dynamic | — | The green input consumed by `texturedQuad`. |
blue | dynamic | — | The blue input consumed by `texturedQuad`. |
alpha | dynamic | — | The alpha input consumed by `texturedQuad`. |
translate_textureTracks the module-level translate texture state owned by `miniquake.render.draw2d`.
function uploadFont(conchars, palette)Upload font to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
conchars | dynamic | — | The conchars input consumed by `uploadFont`. |
palette | dynamic | — | The palette input consumed by `uploadFont`. |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
palette | dynamic | — | The palette input consumed by `uploadPicture`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
transparent | dynamic | — | The transparent input consumed by `uploadPicture`. |
wad_cachepicsTracks the module-level wad cachepics state owned by `miniquake.render.draw2d`.