MiniQuake2

src/miniquake2/runtime/product_host.ml

Provides miniquake2 runtime product host facilities for this project.

Package
miniquake2.runtime.product_host
Reachable
Yes

Imports

Declarations

applyProductGamma

function applyProductGamma(host, gamma, active)

Apply product gamma.

ParameterTypeDefaultDescription
hostdynamic—host value consumed by this operation.
gammadynamic—gamma value consumed by this operation.
activedynamic—active value consumed by this operation.

View source

closeProductHost

function closeProductHost(host)

Close product host.

ParameterTypeDefaultDescription
hostdynamic—host value consumed by this operation.

View source

openProductHost

function openProductHost(title, videoMode, fullScreen, rendererImports)

Open product host.

ParameterTypeDefaultDescription
titledynamic—Human-readable title presented to the user.
videoModedynamic—videoMode value consumed by this operation.
fullScreendynamic—fullScreen value consumed by this operation.
rendererImportsdynamic—rendererImports value consumed by this operation.

View source

openProductHostWith

function openProductHostWith(callbacks, title, videoMode, fullScreen, rendererImports)

Open product host with.

ParameterTypeDefaultDescription
callbacksdynamic—callbacks value consumed by this operation.
titledynamic—Human-readable title presented to the user.
videoModedynamic—videoMode value consumed by this operation.
fullScreendynamic—fullScreen value consumed by this operation.
rendererImportsdynamic—rendererImports value consumed by this operation.

View source

miniquake2.runtime.product_host.ProductHost struct

miniquake2.runtime.product_host.ProductHostCallbacks struct

productHostCreateRenderer

function productHostCreateRenderer(imports, contextActive)

Create product host renderer.

ParameterTypeDefaultDescription
importsdynamic—imports value consumed by this operation.
contextActivedynamic—contextActive value consumed by this operation.

View source

productHostCreateWindow

function productHostCreateWindow(title, width, height, fullScreen)

Create product host window.

ParameterTypeDefaultDescription
titledynamic—Human-readable title presented to the user.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
fullScreendynamic—fullScreen value consumed by this operation.

View source

productHostDefaultCallbacks

function productHostDefaultCallbacks()

Return the product host default callbacks value.

View source

productHostDestroyWindow

function productHostDestroyWindow(window)

Return the product host destroy window value.

ParameterTypeDefaultDescription
windowdynamic—window value consumed by this operation.

View source

productHostDimensions

function productHostDimensions(videoMode)

Return the product host dimensions.

ParameterTypeDefaultDescription
videoModedynamic—videoMode value consumed by this operation.

View source

productHostDrawText

function productHostDrawText(exports, x, y, text)

Draw product host text.

ParameterTypeDefaultDescription
exportsdynamic—exports value consumed by this operation.
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
textdynamic—Text consumed by the operation.

View source

productHostInitRenderer

function productHostInitRenderer(renderer)

Initialize product host renderer.

ParameterTypeDefaultDescription
rendererdynamic—renderer value consumed by this operation.

View source

productHostReconfigureWindow

function productHostReconfigureWindow(window, width, height, fullScreen)

Reconfigure product host window.

ParameterTypeDefaultDescription
windowdynamic—window value consumed by this operation.
widthdynamic—Width in the coordinate or storage units used by the caller.
heightdynamic—Height in the coordinate or storage units used by the caller.
fullScreendynamic—fullScreen value consumed by this operation.

View source

productHostRequireCallbacks

function productHostRequireCallbacks(callbacks)

Require product host callbacks.

ParameterTypeDefaultDescription
callbacksdynamic—callbacks value consumed by this operation.

View source

productHostRestartError

function productHostRestartError(host, title, rendererImports, oldVideoMode, oldFullScreen, gamma, restartFailure)

Restart product host error.

ParameterTypeDefaultDescription
hostdynamic—host value consumed by this operation.
titledynamic—Human-readable title presented to the user.
rendererImportsdynamic—rendererImports value consumed by this operation.
oldVideoModedynamic—oldVideoMode value consumed by this operation.
oldFullScreendynamic—oldFullScreen value consumed by this operation.
gammadynamic—gamma value consumed by this operation.
restartFailuredynamic—restartFailure value consumed by this operation.

View source

productHostShutdownRenderer

function productHostShutdownRenderer(renderer)

Shut down product host renderer.

ParameterTypeDefaultDescription
rendererdynamic—renderer value consumed by this operation.

View source

resetProductRenderer

function resetProductRenderer(host, rendererImports)

Rebuild renderer-owned managed state while preserving the native window and its OpenGL context. Media chains use this between heavyweight 3D steps.

ParameterTypeDefaultDescription
hostdynamic—host value consumed by this operation.
rendererImportsdynamic—rendererImports value consumed by this operation.

View source

restartProductHost

function restartProductHost(host, title, videoMode, fullScreen, rendererImports)

Restart product host.

ParameterTypeDefaultDescription
hostdynamic—host value consumed by this operation.
titledynamic—Human-readable title presented to the user.
videoModedynamic—videoMode value consumed by this operation.
fullScreendynamic—fullScreen value consumed by this operation.
rendererImportsdynamic—rendererImports value consumed by this operation.

View source

restoreProductHost

function restoreProductHost(host, title, videoMode, fullScreen, rendererImports, gamma)

Recreate the last known-good video host after a target mode, context or renderer initialization failure. The native backend owns one window at a time, so this rollback is necessarily performed after the old host closes.

ParameterTypeDefaultDescription
hostdynamic—host value consumed by this operation.
titledynamic—Human-readable title presented to the user.
videoModedynamic—videoMode value consumed by this operation.
fullScreendynamic—fullScreen value consumed by this operation.
rendererImportsdynamic—rendererImports value consumed by this operation.
gammadynamic—gamma value consumed by this operation.

View source

showProductLoading

function showProductLoading(host, label)

Return the show product loading value.

ParameterTypeDefaultDescription
hostdynamic—host value consumed by this operation.
labeldynamic—label value consumed by this operation.

View source