Header menu logo Nu

Hl Module

Functions and values

Function or value Description

Hl.Assert a

Full Usage: Hl.Assert a

Parameters:
    a : 'a

Returns: 'a

Assert a lack of Gl error. Has a generic parameter to enable value pass-through. Thread-safe after being initialized.

a : 'a
Returns: 'a

Hl.AttachDebugMessageCallback ()

Full Usage: Hl.AttachDebugMessageCallback ()

Parameters:
    () : unit

Listen to the OpenGL error stream.

() : unit

Hl.BeginFrame (windowSize, outerBounds)

Full Usage: Hl.BeginFrame (windowSize, outerBounds)

Parameters:

Begin an OpenGL frame.

windowSize : Vector2i
outerBounds : Box2i

Hl.CheckRenderFormat format

Full Usage: Hl.CheckRenderFormat format

Parameters:
Returns: InternalFormat

Check if an OpenGL internal format is supported for render buffers, falling back to a standard format where possible.

format : InternalFormat
Returns: InternalFormat

Hl.CreateSglContextInitial window

Full Usage: Hl.CreateSglContextInitial window

Parameters:
    window : nativeint

Returns: bool * nativeint

Create an SDL OpenGL context with the given window.

window : nativeint
Returns: bool * nativeint

Hl.CreateSglContextSharedWithCurrentContext (window, sharedContext)

Full Usage: Hl.CreateSglContextSharedWithCurrentContext (window, sharedContext)

Parameters:
    window : nativeint
    sharedContext : nativeint

Returns: nativeint

Create a SDL OpenGL context with the given window that shares the current context. Originating thread must wait on the given WaitOnce object before continuing processing.

window : nativeint
sharedContext : nativeint
Returns: nativeint

Hl.DestroySglContext (glContext, sglWindow)

Full Usage: Hl.DestroySglContext (glContext, sglWindow)

Parameters:
    glContext : nativeint
    sglWindow : nativeint

Delete an SDL-created OpenGL context.

glContext : nativeint
sglWindow : nativeint

Hl.EndFrame ()

Full Usage: Hl.EndFrame ()

Parameters:
    () : unit

End an OpenGL frame.

() : unit

Hl.GetDrawCallCount ()

Full Usage: Hl.GetDrawCallCount ()

Parameters:
    () : unit

Returns: int

Get the running number of draw calls.

() : unit
Returns: int

Hl.GetDrawInstanceCount ()

Full Usage: Hl.GetDrawInstanceCount ()

Parameters:
    () : unit

Returns: int

Get the running number of draw calls.

() : unit
Returns: int

Hl.InitAssert enabled

Full Usage: Hl.InitAssert enabled

Parameters:
    enabled : bool

Initialize OpenGL assertion mechanism.

enabled : bool

Hl.InitContext attach

Full Usage: Hl.InitContext attach

Parameters:
    attach : bool

Initialize OpenGL context once created.

attach : bool

Hl.ReportDrawCall drawInstances

Full Usage: Hl.ReportDrawCall drawInstances

Parameters:
    drawInstances : int

Report the fact that a draw call has just been made with the given number of instances.

drawInstances : int

Hl.ResetDrawCalls ()

Full Usage: Hl.ResetDrawCalls ()

Parameters:
    () : unit

Reset the running number of draw calls.

() : unit

Hl.SaveFramebufferRgbaToBitmap (width, height, filePath)

Full Usage: Hl.SaveFramebufferRgbaToBitmap (width, height, filePath)

Parameters:
    width : int
    height : int
    filePath : string

Save the current bound RGBA framebuffer to an image file. Only works on Windows platforms for now. TODO: make this work on non-Windows platforms!

width : int
height : int
filePath : string

Type something to start searching.