Skip to content

C API Reference

Functions

App

dvz_app_batch()

Return the app batch.

DvzBatch* dvz_app_batch(  // returns the batch
    DvzApp* app,  // the app
);
dvz.app_batch(  # returns the batch : DvzBatch*
    app,  # the app : DvzApp*
)

dvz_app_destroy()

Destroy the app.

void dvz_app_destroy(
    DvzApp* app,  // the app
);
dvz.app_destroy(
    app,  # the app : DvzApp*
)

dvz_app_frame()

Run one frame.

void dvz_app_frame(
    DvzApp* app,  // the app
);
dvz.app_frame(
    app,  # the app : DvzApp*
)

dvz_app_gui()

Register a GUI callback.

void dvz_app_gui(
    DvzApp* app,  // the app
    DvzId canvas_id,  // the canvas ID
    DvzAppGuiCallback callback,  // the GUI callback
    void* user_data,  // the user data
);
dvz.app_gui(
    app,  # the app : DvzApp*
    canvas_id,  # the canvas ID : DvzId
    callback,  # the GUI callback : DvzAppGuiCallback
    user_data,  # the user data : np.ndarray
)

dvz_app_keyboard()

Return the last keyboard key pressed.

void dvz_app_keyboard(
    DvzApp* app,  // the app
    DvzId canvas_id,  // the canvas id
    DvzKeyCode* key,  // a pointer to the last pressed key
);
dvz.app_keyboard(
    app,  # the app : DvzApp*
    canvas_id,  # the canvas id : DvzId
    key,  # a pointer to the last pressed key : Out[DvzKeyCode]
)

dvz_app_mouse()

Return the last mouse position and pressed button.

void dvz_app_mouse(
    DvzApp* app,  // the app
    DvzId canvas_id,  // the canvas id
    double* x,  // a pointer to the mouse x position
    double* y,  // a pointer to the mouse y position
    DvzMouseButton* button,  // a pointer to the pressed button
);
dvz.app_mouse(
    app,  # the app : DvzApp*
    canvas_id,  # the canvas id : DvzId
    x,  # a pointer to the mouse x position : Out[float]
    y,  # a pointer to the mouse y position : Out[float]
    button,  # a pointer to the pressed button : Out[DvzMouseButton]
)

dvz_app_on_frame()

Register a frame callback.

void dvz_app_on_frame(
    DvzApp* app,  // the app
    DvzAppFrameCallback callback,  // the callback
    void* user_data,  // the user data
);
dvz.app_on_frame(
    app,  # the app : DvzApp*
    callback,  # the callback : DvzAppFrameCallback
    user_data,  # the user data : np.ndarray
)

dvz_app_on_keyboard()

Register a keyboard callback.

void dvz_app_on_keyboard(
    DvzApp* app,  // the app
    DvzAppKeyboardCallback callback,  // the callback
    void* user_data,  // the user data
);
dvz.app_on_keyboard(
    app,  # the app : DvzApp*
    callback,  # the callback : DvzAppKeyboardCallback
    user_data,  # the user data : np.ndarray
)

dvz_app_on_mouse()

Register a mouse callback.

void dvz_app_on_mouse(
    DvzApp* app,  // the app
    DvzAppMouseCallback callback,  // the callback
    void* user_data,  // the user data
);
dvz.app_on_mouse(
    app,  # the app : DvzApp*
    callback,  # the callback : DvzAppMouseCallback
    user_data,  # the user data : np.ndarray
)

dvz_app_on_resize()

Register a resize callback.

void dvz_app_on_resize(
    DvzApp* app,  // the app
    DvzAppResizeCallback callback,  // the callback
    void* user_data,  // the user data
);
dvz.app_on_resize(
    app,  # the app : DvzApp*
    callback,  # the callback : DvzAppResizeCallback
    user_data,  # the user data : np.ndarray
)

dvz_app_on_timer()

Register a timer callback.

void dvz_app_on_timer(
    DvzApp* app,  // the app
    DvzAppTimerCallback callback,  // the timer callback
    void* user_data,  // the user data
);
dvz.app_on_timer(
    app,  # the app : DvzApp*
    callback,  # the timer callback : DvzAppTimerCallback
    user_data,  # the user data : np.ndarray
)

dvz_app_run()

Start the application event loop.

void dvz_app_run(
    DvzApp* app,  // the app
    uint64_t frame_count,  // the maximum number of frames, 0 for infinite loop
);
dvz.app_run(
    app,  # the app : DvzApp*
    frame_count,  # the maximum number of frames, 0 for infinite loop : int
)

dvz_app_screenshot()

Make a screenshot of a canvas.

void dvz_app_screenshot(
    DvzApp* app,  // the app
    DvzId canvas_id,  // the ID of the canvas
    char* filename,  // the path to the PNG file with the screenshot
);
dvz.app_screenshot(
    app,  # the app : DvzApp*
    canvas_id,  # the ID of the canvas : DvzId
    filename,  # the path to the PNG file with the screenshot : str
)

dvz_app_submit()

Submit the current batch to the application.

void dvz_app_submit(
    DvzApp* app,  // the app
);
dvz.app_submit(
    app,  # the app : DvzApp*
)

dvz_app_timer()

Create a timer.

DvzTimerItem* dvz_app_timer(  // returns the timer
    DvzApp* app,  // the app
    double delay,  // the delay, in seconds, until the first event
    double period,  // the period, in seconds, between two events
    uint64_t max_count,  // the maximum number of events
);
dvz.app_timer(  # returns the timer : DvzTimerItem*
    app,  # the app : DvzApp*
    delay,  # the delay, in seconds, until the first event : float
    period,  # the period, in seconds, between two events : float
    max_count,  # the maximum number of events : int
)

dvz_app_timestamps()

Return the precise display timestamps of the last count frames.

void dvz_app_timestamps(
    DvzApp* app,  // the app
    DvzId canvas_id,  // the ID of the canvas
    uint32_t count,  // number of frames
    uint64_t* seconds,  // (array) a buffer holding at least `count` uint64_t values (seconds)
    uint64_t* nanoseconds,  // (array) a buffer holding at least `count` uint64_t values (nanoseconds)
);
dvz.app_timestamps(
    app,  # the app : DvzApp*
    canvas_id,  # the ID of the canvas : DvzId
    count,  # number of frames : int
    seconds,  # (array) a buffer holding at least `count` uint64_t values (seconds) : Out[int]
    nanoseconds,  # (array) a buffer holding at least `count` uint64_t values (nanoseconds) : Out[int]
)

dvz_app_wait()

Wait until the GPU has finished processing.

void dvz_app_wait(
    DvzApp* app,  // the app
);
dvz.app_wait(
    app,  # the app : DvzApp*
)

Arcball

dvz_arcball_angles()

Get the current arcball angles.

void dvz_arcball_angles(
    DvzArcball* arcball,  // the arcball
    vec3 out_angles,  // the arcball angles
);
dvz.arcball_angles(
    arcball,  # the arcball : DvzArcball*
    out_angles,  # the arcball angles : Out[Tuple[float, float, float]]
)

dvz_arcball_constrain()

Add arcball constraints.

void dvz_arcball_constrain(
    DvzArcball* arcball,  // the arcball
    vec3 constrain,  // the constrain values
);
dvz.arcball_constrain(
    arcball,  # the arcball : DvzArcball*
    constrain,  # the constrain values : Tuple[float, float, float]
)

dvz_arcball_end()

Finalize arcball position update.

void dvz_arcball_end(
    DvzArcball* arcball,  // the arcball
);
dvz.arcball_end(
    arcball,  # the arcball : DvzArcball*
)

dvz_arcball_flags()

Set the arcball flags.

void dvz_arcball_flags(
    DvzArcball* arcball,  // the arcball
    int flags,  // the flags
);
dvz.arcball_flags(
    arcball,  # the arcball : DvzArcball*
    flags,  # the flags : int
)

dvz_arcball_gui()

Show a GUI with sliders controlling the three arcball angles.

void dvz_arcball_gui(
    DvzArcball* arcball,  // the arcball
    DvzApp* app,  // the app
    DvzId canvas_id,  // the canvas (or figure) ID
    DvzPanel* panel,  // the panel
);
dvz.arcball_gui(
    arcball,  # the arcball : DvzArcball*
    app,  # the app : DvzApp*
    canvas_id,  # the canvas (or figure) ID : DvzId
    panel,  # the panel : DvzPanel*
)

dvz_arcball_initial()

Set the initial arcball angles.

void dvz_arcball_initial(
    DvzArcball* arcball,  // the arcball
    vec3 angles,  // the initial angles
);
dvz.arcball_initial(
    arcball,  # the arcball : DvzArcball*
    angles,  # the initial angles : Tuple[float, float, float]
)

dvz_arcball_model()

Return the model matrix of an arcball.

void dvz_arcball_model(
    DvzArcball* arcball,  // the arcball
    mat4 model,  // the model
);
dvz.arcball_model(
    arcball,  # the arcball : DvzArcball*
    model,  # the model : Out[mat4]
)

dvz_arcball_mvp()

Apply an MVP matrix to an arcball (only the model matrix).

void dvz_arcball_mvp(
    DvzArcball* arcball,  // the arcball
    DvzMVP* mvp,  // the MVP
);
dvz.arcball_mvp(
    arcball,  # the arcball : DvzArcball*
    mvp,  # the MVP : DvzMVP*
)

dvz_arcball_print()

Display information about an arcball.

void dvz_arcball_print(
    DvzArcball* arcball,  // the arcball
);
dvz.arcball_print(
    arcball,  # the arcball : DvzArcball*
)

dvz_arcball_reset()

Reset an arcball to its initial position.

void dvz_arcball_reset(
    DvzArcball* arcball,  // the arcball
);
dvz.arcball_reset(
    arcball,  # the arcball : DvzArcball*
)

dvz_arcball_resize()

Inform an arcball of a panel resize.

void dvz_arcball_resize(
    DvzArcball* arcball,  // the arcball
    float width,  // the panel width
    float height,  // the panel height
);
dvz.arcball_resize(
    arcball,  # the arcball : DvzArcball*
    width,  # the panel width : float
    height,  # the panel height : float
)

dvz_arcball_rotate()

Apply a rotation to an arcball.

void dvz_arcball_rotate(
    DvzArcball* arcball,  // the arcball
    vec2 cur_pos,  // the initial position
    vec2 last_pos,  // the final position
);
dvz.arcball_rotate(
    arcball,  # the arcball : DvzArcball*
    cur_pos,  # the initial position : Tuple[float, float]
    last_pos,  # the final position : Tuple[float, float]
)

dvz_arcball_set()

Set the arcball angles.

void dvz_arcball_set(
    DvzArcball* arcball,  // the arcball
    vec3 angles,  // the angles
);
dvz.arcball_set(
    arcball,  # the arcball : DvzArcball*
    angles,  # the angles : Tuple[float, float, float]
)

Atlas

dvz_atlas_destroy()

Destroy an atlas.

void dvz_atlas_destroy(
    DvzAtlas* atlas,  // the atlas
);
dvz.atlas_destroy(
    atlas,  # the atlas : DvzAtlas*
)

dvz_atlas_font()

Load the default atlas and font.

void dvz_atlas_font(
    float font_size,  // the font size
    DvzAtlasFont* af,  // the returned DvzAtlasFont object with DvzAtlas and DvzFont objects.
);
dvz.atlas_font(
    font_size,  # the font size : float
    af,  # the returned DvzAtlasFont object with DvzAtlas and DvzFont objects. : Out[DvzAtlasFont]
)

Camera

dvz_camera_get_lookat()

Get the camera lookat position.

void dvz_camera_get_lookat(
    DvzCamera* camera,  // the camera
    vec3 lookat,  // the lookat position
);
dvz.camera_get_lookat(
    camera,  # the camera : DvzCamera*
    lookat,  # the lookat position : Out[Tuple[float, float, float]]
)

dvz_camera_get_position()

Get the camera position.

void dvz_camera_get_position(
    DvzCamera* camera,  // the camera
    vec3 pos,  // the pos
);
dvz.camera_get_position(
    camera,  # the camera : DvzCamera*
    pos,  # the pos : Out[Tuple[float, float, float]]
)

dvz_camera_get_up()

Get the camera up vector.

void dvz_camera_get_up(
    DvzCamera* camera,  // the camera
    vec3 up,  // the up vector
);
dvz.camera_get_up(
    camera,  # the camera : DvzCamera*
    up,  # the up vector : Out[Tuple[float, float, float]]
)

dvz_camera_initial()

Set the initial camera parameters.

void dvz_camera_initial(
    DvzCamera* camera,  // the camera
    vec3 pos,  // the initial position
    vec3 lookat,  // the lookat position
    vec3 up,  // the up vector
);
dvz.camera_initial(
    camera,  # the camera : DvzCamera*
    pos,  # the initial position : Tuple[float, float, float]
    lookat,  # the lookat position : Tuple[float, float, float]
    up,  # the up vector : Tuple[float, float, float]
)

dvz_camera_lookat()

Set a camera lookat position.

void dvz_camera_lookat(
    DvzCamera* camera,  // the camera
    vec3 lookat,  // the lookat position
);
dvz.camera_lookat(
    camera,  # the camera : DvzCamera*
    lookat,  # the lookat position : Tuple[float, float, float]
)

dvz_camera_mvp()

Apply an MVP to a camera.

void dvz_camera_mvp(
    DvzCamera* camera,  // the camera
    DvzMVP* mvp,  // the MVP
);
dvz.camera_mvp(
    camera,  # the camera : DvzCamera*
    mvp,  # the MVP : DvzMVP*
)

dvz_camera_ortho()

Make an orthographic camera.

void dvz_camera_ortho(
    DvzCamera* camera,  // the camera
    float left,  // the left value
    float right,  // the right value
    float bottom,  // the bottom value
    float top,  // the top value
);
dvz.camera_ortho(
    camera,  # the camera : DvzCamera*
    left,  # the left value : float
    right,  # the right value : float
    bottom,  # the bottom value : float
    top,  # the top value : float
)

dvz_camera_perspective()

Set a camera perspective.

void dvz_camera_perspective(
    DvzCamera* camera,  // the camera
    float fov,  // the field of view angle (in radians)
);
dvz.camera_perspective(
    camera,  # the camera : DvzCamera*
    fov,  # the field of view angle (in radians) : float
)

dvz_camera_position()

Set a camera position.

void dvz_camera_position(
    DvzCamera* camera,  // the camera
    vec3 pos,  // the pos
);
dvz.camera_position(
    camera,  # the camera : DvzCamera*
    pos,  # the pos : Tuple[float, float, float]
)

dvz_camera_print()

Display information about a camera.

void dvz_camera_print(
    DvzCamera* camera,  // the camera
);
dvz.camera_print(
    camera,  # the camera : DvzCamera*
)

dvz_camera_reset()

Reset a camera.

void dvz_camera_reset(
    DvzCamera* camera,  // the camera
);
dvz.camera_reset(
    camera,  # the camera : DvzCamera*
)

dvz_camera_resize()

Inform a camera of a panel resize.

void dvz_camera_resize(
    DvzCamera* camera,  // the camera
    float width,  // the panel width
    float height,  // the panel height
);
dvz.camera_resize(
    camera,  # the camera : DvzCamera*
    width,  # the panel width : float
    height,  # the panel height : float
)

dvz_camera_up()

Set a camera up vector.

void dvz_camera_up(
    DvzCamera* camera,  // the camera
    vec3 up,  // the up vector
);
dvz.camera_up(
    camera,  # the camera : DvzCamera*
    up,  # the up vector : Tuple[float, float, float]
)

dvz_camera_viewproj()

Return the view and proj matrices of the camera.

void dvz_camera_viewproj(
    DvzCamera* camera,  // the camera
    mat4 view,  // the view matrix
    mat4 proj,  // the proj matrix
);
dvz.camera_viewproj(
    camera,  # the camera : DvzCamera*
    view,  # the view matrix : Out[mat4]
    proj,  # the proj matrix : Out[mat4]
)

dvz_camera_zrange()

Set the camera zrange.

void dvz_camera_zrange(
    DvzCamera* camera,  // the camera
    float near,  // the near value
    float far,  // the far value
);
dvz.camera_zrange(
    camera,  # the camera : DvzCamera*
    near,  # the near value : float
    far,  # the far value : float
)

Circular

dvz_circular_2D()

Generate a 2D circular motion.

void dvz_circular_2D(
    vec2 center,  // the circle center
    float radius,  // the circle radius
    float angle,  // the initial angle
    float t,  // the normalized value
    vec2 out,  // the 2D position
);
dvz.circular_2D(
    center,  # the circle center : Tuple[float, float]
    radius,  # the circle radius : float
    angle,  # the initial angle : float
    t,  # the normalized value : float
    out,  # the 2D position : Out[Tuple[float, float]]
)

dvz_circular_3D()

Generate a 3D circular motion.

void dvz_circular_3D(
    vec3 center,  // the circle center
    vec3 u,  // the first 3D vector defining the plane containing the circle
    vec3 v,  // the second 3D vector defining the plane containing the circle
    float radius,  // the circle radius
    float angle,  // the initial angle
    float t,  // the normalized value
    vec3 out,  // the 3D position
);
dvz.circular_3D(
    center,  # the circle center : Tuple[float, float, float]
    u,  # the first 3D vector defining the plane containing the circle : Tuple[float, float, float]
    v,  # the second 3D vector defining the plane containing the circle : Tuple[float, float, float]
    radius,  # the circle radius : float
    angle,  # the initial angle : float
    t,  # the normalized value : float
    out,  # the 3D position : Out[Tuple[float, float, float]]
)

Colormap

dvz_colormap_8bit()

Fetch a color from a colormap and a value (8-bit version).

void dvz_colormap_8bit(
    DvzColormap cmap,  // the colormap
    uint8_t value,  // the value
    cvec4 color,  // the fetched color
);
dvz.colormap_8bit(
    cmap,  # the colormap : DvzColormap
    value,  # the value : uint8_t
    color,  # the fetched color : Out[cvec4]
)

dvz_colormap_array()

Fetch colors from a colormap and an array of values.

void dvz_colormap_array(
    DvzColormap cmap,  // the colormap
    uint32_t count,  // the number of values
    float* values,  // pointer to the array of float numbers
    float vmin,  // the minimum value
    float vmax,  // the maximum value
    DvzColor* out,  // (array) the fetched colors
);
dvz.colormap_array(
    cmap,  # the colormap : DvzColormap
    count,  # the number of values : int
    values,  # pointer to the array of float numbers : np.ndarray[float]
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
    out,  # (array) the fetched colors : Out[Tuple[int, int, int, int]]
)

dvz_colormap_scale()

Fetch a color from a colormap and an interpolated value.

void dvz_colormap_scale(
    DvzColormap cmap,  // the colormap
    float value,  // the value
    float vmin,  // the minimum value
    float vmax,  // the maximum value
    DvzColor color,  // the fetched color
);
dvz.colormap_scale(
    cmap,  # the colormap : DvzColormap
    value,  # the value : float
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
    color,  # the fetched color : Out[Tuple[int, int, int, int]]
)

Compute

dvz_compute_normals()

Compute face normals.

void dvz_compute_normals(
    uint32_t vertex_count,  // number of vertices
    uint32_t index_count,  // number of indices (triple of the number of faces)
    vec3* pos,  // array of vec3 positions
    DvzIndex* index,  // pos array of uint32_t indices
    vec3* normal,  // (array) the vec3 normals (to be overwritten by this function)
);
dvz.compute_normals(
    vertex_count,  # number of vertices : int
    index_count,  # number of indices (triple of the number of faces) : int
    pos,  # array of vec3 positions : np.ndarray[vec3]
    index,  # pos array of uint32_t indices : DvzIndex*
    normal,  # (array) the vec3 normals (to be overwritten by this function) : Out[Tuple[float, float, float]]
)

Demo

dvz_demo_panel_2D()

Demo panel (random scatter plot).

DvzVisual* dvz_demo_panel_2D(  // returns the marker visual
    DvzPanel* panel,  // the panel
);
dvz.demo_panel_2D(  # returns the marker visual : DvzVisual*
    panel,  # the panel : DvzPanel*
)

dvz_demo_panel_3D()

Demo panel (random scatter plot).

DvzVisual* dvz_demo_panel_3D(  // returns the marker visual
    DvzPanel* panel,  // the panel
);
dvz.demo_panel_3D(  # returns the marker visual : DvzVisual*
    panel,  # the panel : DvzPanel*
)

Error

dvz_error_callback()

Register an error callback, a C function taking as input a string.

void dvz_error_callback(
    DvzErrorCallback cb,  // the error callback
);
dvz.error_callback(
    cb,  # the error callback : DvzErrorCallback
)

External

dvz_external_dat()

Get an external memory handle of a dat.

int dvz_external_dat(  // returns the external memory handle of that buffer
    DvzRenderer* rd,  // the renderer
    DvzVisual* visual,  // the visual
    uint32_t slot_idx,  // the slot index of the dat
    DvzSize* offset,  // the offset, in bytes, of the dat, within the buffer containing that dat
);
dvz.external_dat(  # returns the external memory handle of that buffer : int
    rd,  # the renderer : DvzRenderer*
    visual,  # the visual : DvzVisual*
    slot_idx,  # the slot index of the dat : int
    offset,  # the offset, in bytes, of the dat, within the buffer containing that dat : Out[DvzSize]
)

dvz_external_index()

Get an external memory handle of an index dat.

int dvz_external_index(  // returns the external memory handle of that buffer
    DvzRenderer* rd,  // the renderer
    DvzVisual* visual,  // the visual
    DvzSize* offset,  // the offset, in bytes, of the dat, within the buffer containing that dat
);
dvz.external_index(  # returns the external memory handle of that buffer : int
    rd,  # the renderer : DvzRenderer*
    visual,  # the visual : DvzVisual*
    offset,  # the offset, in bytes, of the dat, within the buffer containing that dat : Out[DvzSize]
)

dvz_external_tex()

Get an external memory handle of a tex's staging buffer.

int dvz_external_tex(  // returns the external memory handle of that buffer
    DvzRenderer* rd,  // the renderer
    DvzVisual* visual,  // the visual
    uint32_t slot_idx,  // the slot index of the tex
    DvzSize* offset,  // the offset, in bytes, of the tex's staging dat, within the buffer containing
);
dvz.external_tex(  # returns the external memory handle of that buffer : int
    rd,  # the renderer : DvzRenderer*
    visual,  # the visual : DvzVisual*
    slot_idx,  # the slot index of the tex : int
    offset,  # the offset, in bytes, of the tex's staging dat, within the buffer containing : Out[DvzSize]
)

dvz_external_vertex()

Get an external memory handle of a vertex dat.

int dvz_external_vertex(  // returns the external memory handle of that buffer
    DvzRenderer* rd,  // the renderer
    DvzVisual* visual,  // the visual
    uint32_t binding_idx,  // the binding index of the dat that is being used as vertex buffer
    DvzSize* offset,  // the offset, in bytes, of the dat, within the buffer containing that dat
);
dvz.external_vertex(  # returns the external memory handle of that buffer : int
    rd,  # the renderer : DvzRenderer*
    visual,  # the visual : DvzVisual*
    binding_idx,  # the binding index of the dat that is being used as vertex buffer : int
    offset,  # the offset, in bytes, of the dat, within the buffer containing that dat : Out[DvzSize]
)

Figure

dvz_figure_destroy()

Destroy a figure.

void dvz_figure_destroy(
    DvzFigure* figure,  // the figure
);
dvz.figure_destroy(
    figure,  # the figure : DvzFigure*
)

dvz_figure_height()

Return a figure height.

uint32_t dvz_figure_height(  // returns the figure height
    DvzFigure* fig,  // the figure
);
dvz.figure_height(  # returns the figure height : uint32_t
    fig,  # the figure : DvzFigure*
)

dvz_figure_id()

Return a figure ID.

DvzId dvz_figure_id(  // returns the figure ID
    DvzFigure* figure,  // the figure
);
dvz.figure_id(  # returns the figure ID : DvzId
    figure,  # the figure : DvzFigure*
)

dvz_figure_resize()

Resize a figure.

void dvz_figure_resize(
    DvzFigure* fig,  // the figure
    uint32_t width,  // the window width
    uint32_t height,  // the window height
);
dvz.figure_resize(
    fig,  # the figure : DvzFigure*
    width,  # the window width : int
    height,  # the window height : int
)

dvz_figure_update()

Update a figure after the composition of the panels and visuals has changed.

void dvz_figure_update(
    DvzFigure* figure,  // the figure
);
dvz.figure_update(
    figure,  # the figure : DvzFigure*
)

dvz_figure_width()

Return a figure width.

uint32_t dvz_figure_width(  // returns the figure width
    DvzFigure* fig,  // the figure
);
dvz.figure_width(  # returns the figure width : uint32_t
    fig,  # the figure : DvzFigure*
)

Font

dvz_font_ascii()

Compute the shift of each glyph in an ASCII string, using the Freetype library.

void dvz_font_ascii(
    DvzFont* font,  // the font
    char* string,  // the ASCII string
    vec4* xywh,  // the returned array of (x,y,w,h) shifts
);
dvz.font_ascii(
    font,  # the font : DvzFont*
    string,  # the ASCII string : str
    xywh,  # the returned array of (x,y,w,h) shifts : np.ndarray[vec4]
)

dvz_font_destroy()

Destroy a font.

void dvz_font_destroy(
    DvzFont* font,  // the font
);
dvz.font_destroy(
    font,  # the font : DvzFont*
)

dvz_font_draw()

Render a string using Freetype. Note: the caller must free the output after use.

uint8_t* dvz_font_draw(  // returns an RGBA array allocated by this function and that MUST be freed by the caller
    DvzFont* font,  // the font
    uint32_t length,  // the number of glyphs
    uint32_t* codepoints,  // the Unicode codepoints of the glyphs
    vec4* xywh,  // an array of (x,y,w,h) shifts, returned by dvz_font_layout()
    int flags,  // the font flags
    uvec2 out_size,  // the number of bytes in the returned image
);
dvz.font_draw(  # returns an RGBA array allocated by this function and that MUST be freed by the caller : uint8_t*
    font,  # the font : DvzFont*
    length,  # the number of glyphs : int
    codepoints,  # the Unicode codepoints of the glyphs : np.ndarray[uint32_t]
    xywh,  # an array of (x,y,w,h) shifts, returned by dvz_font_layout() : np.ndarray[vec4]
    flags,  # the font flags : int
    out_size,  # the number of bytes in the returned image : Out[Tuple[int, int]]
)

dvz_font_layout()

Compute the shift of each glyph in a Unicode string, using the Freetype library.

void dvz_font_layout(
    DvzFont* font,  // the font
    uint32_t length,  // the number of glyphs
    uint32_t* codepoints,  // the Unicode codepoints of the glyphs
    vec4* xywh,  // an array of (x,y,w,h) shifts
);
dvz.font_layout(
    font,  # the font : DvzFont*
    length,  # the number of glyphs : int
    codepoints,  # the Unicode codepoints of the glyphs : np.ndarray[uint32_t]
    xywh,  # an array of (x,y,w,h) shifts : np.ndarray[vec4]
)

dvz_font_size()

Set the font size.

void dvz_font_size(
    DvzFont* font,  // the font
    double size,  // the font size
);
dvz.font_size(
    font,  # the font : DvzFont*
    size,  # the font size : float
)

dvz_font_texture()

Generate a texture with a rendered text.

DvzTexture* dvz_font_texture(  // returns the texture
    DvzFont* font,  // the font
    DvzBatch* batch,  // the batch
    uint32_t length,  // the number of Unicode codepoints
    uint32_t* codepoints,  // the Unicode codepoints
    uvec3 size,  // the generated texture size
);
dvz.font_texture(  # returns the texture : DvzTexture*
    font,  # the font : DvzFont*
    batch,  # the batch : DvzBatch*
    length,  # the number of Unicode codepoints : int
    codepoints,  # the Unicode codepoints : np.ndarray[uint32_t]
    size,  # the generated texture size : Out[Tuple[int, int, int]]
)

Interpolate

dvz_interpolate_2D()

Make a linear interpolation between two 2D points.

void dvz_interpolate_2D(
    vec2 p0,  // the first point
    vec2 p1,  // the second point
    float t,  // the normalized value
    vec2 out,  // the interpolated point
);
dvz.interpolate_2D(
    p0,  # the first point : Tuple[float, float]
    p1,  # the second point : Tuple[float, float]
    t,  # the normalized value : float
    out,  # the interpolated point : Out[Tuple[float, float]]
)

dvz_interpolate_3D()

Make a linear interpolation between two 3D points.

void dvz_interpolate_3D(
    vec3 p0,  // the first point
    vec3 p1,  // the second point
    float t,  // the normalized value
    vec3 out,  // the interpolated point
);
dvz.interpolate_3D(
    p0,  # the first point : Tuple[float, float, float]
    p1,  # the second point : Tuple[float, float, float]
    t,  # the normalized value : float
    out,  # the interpolated point : Out[Tuple[float, float, float]]
)

Min

dvz_min_max()

Compute the min and max of an array of float values.

void dvz_min_max(
    uint32_t n,  // the number of values
    float* values,  // an array of float numbers
    vec2 out_min_max,  // the min and max
);
dvz.min_max(
    n,  # the number of values : int
    values,  # an array of float numbers : np.ndarray[float]
    out_min_max,  # the min and max : Tuple[float, float]
)

Misc

dvz_app()

Create an app.

DvzApp* dvz_app(  // returns the app
    int flags,  // the app creation flags
);
dvz.app(  # returns the app : DvzApp*
    flags,  # the app creation flags : int
)

dvz_colormap()

Fetch a color from a colormap and a value (either 8-bit or float, depending on DVZ_COLOR_CVEC4).

void dvz_colormap(
    DvzColormap cmap,  // the colormap
    uint8_t value,  // the value
    DvzColor color,  // the fetched color
);
dvz.colormap(
    cmap,  # the colormap : DvzColormap
    value,  # the value : uint8_t
    color,  # the fetched color : Out[Tuple[int, int, int, int]]
)

dvz_demo()

Run a demo.

void dvz_demo(
);
dvz.demo(
)

dvz_earcut()

Compute a polygon triangulation with only indexing on the polygon contour vertices.

DvzIndex* dvz_earcut(  // returns the computed indices (must be FREED by the caller)
    uint32_t point_count,  // the number of points
    dvec2* polygon,  // the polygon 2D positions
    uint32_t* out_index_count,  // the computed index count
);
dvz.earcut(  # returns the computed indices (must be FREED by the caller) : DvzIndex*
    point_count,  # the number of points : int
    polygon,  # the polygon 2D positions : np.ndarray[dvec2]
    out_index_count,  # the computed index count : Out[int]
)

dvz_easing()

Apply an easing function to a normalized value.

double dvz_easing(  // returns the eased value
    DvzEasing easing,  // the easing mode
    double t,  // the normalized value
);
dvz.easing(  # returns the eased value : double
    easing,  # the easing mode : DvzEasing
    t,  # the normalized value : float
)

dvz_figure()

Create a figure, a desktop window with panels and visuals.

DvzFigure* dvz_figure(  // returns the figure
    DvzScene* scene,  // the scene
    uint32_t width,  // the window width
    uint32_t height,  // the window height
    int flags,  // the figure creation flags (not yet stabilized)
);
dvz.figure(  # returns the figure : DvzFigure*
    scene,  # the scene : DvzScene*
    width,  # the window width : int
    height,  # the window height : int
    flags,  # the figure creation flags (not yet stabilized) : int
)

dvz_font()

Create a font.

DvzFont* dvz_font(  // returns the font
    long ttf_size,  // size in bytes of a TTF font raw buffer
    char* ttf_bytes,  // TTF font raw buffer
);
dvz.font(  # returns the font : DvzFont*
    ttf_size,  # size in bytes of a TTF font raw buffer : long
    ttf_bytes,  # TTF font raw buffer : str
)

dvz_free()

Free a pointer.

void dvz_free(
    void* pointer,  // a pointer
);
dvz.free(
    pointer,  # a pointer : np.ndarray
)

dvz_interpolate()

Make a linear interpolation between two scalar value.

float dvz_interpolate(  // returns the interpolated value
    float p0,  // the first value
    float p1,  // the second value
    float t,  // the normalized value
);
dvz.interpolate(  # returns the interpolated value : float
    p0,  # the first value : float
    p1,  # the second value : float
    t,  # the normalized value : float
)

dvz_mean()

Compute the mean of an array of double values.

double dvz_mean(  // returns the mean
    uint32_t n,  // the number of values
    double* values,  // an array of double numbers
);
dvz.mean(  # returns the mean : double
    n,  # the number of values : int
    values,  # an array of double numbers : np.ndarray[double]
)

dvz_mouse()

Create a mouse object.

DvzMouse* dvz_mouse(  // returns the mouse
);
dvz.mouse(  # returns the mouse : DvzMouse*
)

dvz_panel()

Create a panel in a figure (partial or complete rectangular portion of a figure).

DvzPanel* dvz_panel(
    DvzFigure* fig,  // the figure
    float x,  // the x coordinate of the top left corner, in pixels
    float y,  // the y coordinate of the top left corner, in pixels
    float width,  // the panel width, in pixels
    float height,  // the panel height, in pixels
);
dvz.panel(
    fig,  # the figure : DvzFigure*
    x,  # the x coordinate of the top left corner, in pixels : float
    y,  # the y coordinate of the top left corner, in pixels : float
    width,  # the panel width, in pixels : float
    height,  # the panel height, in pixels : float
)

dvz_panzoom()

Create a panzoom object (usually you'd rather use dvz_panel_panzoom()).

DvzPanzoom* dvz_panzoom(  // returns the Panzoom object
    float width,  // the panel width
    float height,  // the panel height
    int flags,  // the panzoom creation flags
);
dvz.panzoom(  # returns the Panzoom object : DvzPanzoom*
    width,  # the panel width : float
    height,  # the panel height : float
    flags,  # the panzoom creation flags : int
)

dvz_range()

Compute the range of an array of double values.

void dvz_range(
    uint32_t n,  // the number of values
    double* values,  // an array of double numbers
    dvec2 min_max,  // the min and max values
);
dvz.range(
    n,  # the number of values : int
    values,  # an array of double numbers : np.ndarray[double]
    min_max,  # the min and max values : Out[dvec2]
)

dvz_ref()

Create a reference frame (wrapping a 3D box representing the data in its original coordinates).

DvzRef* dvz_ref(  // returns the reference frame
    int flags,  // the flags
);
dvz.ref(  # returns the reference frame : DvzRef*
    flags,  # the flags : int
)

dvz_resample()

Normalize a value in an interval.

double dvz_resample(  // returns the normalized value between 0 and 1
    double t0,  // the interval start
    double t1,  // the interval end
    double t,  // the value within the interval
);
dvz.resample(  # returns the normalized value between 0 and 1 : double
    t0,  # the interval start : float
    t1,  # the interval end : float
    t,  # the value within the interval : float
)

dvz_scene()

Create a scene.

DvzScene* dvz_scene(  // returns the scene
    DvzBatch* batch,  // the batch
);
dvz.scene(  # returns the scene : DvzScene*
    batch,  # the batch : DvzBatch*
)

dvz_server()

Placeholder.

DvzServer* dvz_server(
    int flags,  // placeholder
);
dvz.server(
    flags,  # placeholder : int
)

dvz_shape()

Create an empty shape.

DvzShape* dvz_shape(  // returns the shape
);
dvz.shape(  # returns the shape : DvzShape*
)

dvz_texture()

Create a texture.

DvzTexture* dvz_texture(  // returns the texture
    DvzBatch* batch,  // the batch
    DvzTexDims dims,  // the number of dimensions in the texture
    int flags,  // the texture creation flags
);
dvz.texture(  # returns the texture : DvzTexture*
    batch,  # the batch : DvzBatch*
    dims,  # the number of dimensions in the texture : DvzTexDims
    flags,  # the texture creation flags : int
)

dvz_time()

Get the current time.

void dvz_time(
    DvzTime* time,  // fill a structure with seconds and nanoseconds integers
);
dvz.time(
    time,  # fill a structure with seconds and nanoseconds integers : Out[DvzTime]
)

dvz_version()

Return the current version string.

char* dvz_version(  // returns the version string
);
dvz.version(  # returns the version string : char*
)

Mock

dvz_mock_band()

Generate points on a band.

vec3* dvz_mock_band(  // returns the positions
    uint32_t count,  // the number of positions to generate
    vec2 size,  // the size of the band
);
dvz.mock_band(  # returns the positions : vec3*
    count,  # the number of positions to generate : int
    size,  # the size of the band : Tuple[float, float]
)

dvz_mock_circle()

Generate points on a circle.

vec3* dvz_mock_circle(  // returns the positions
    uint32_t count,  // the number of positions to generate
    float radius,  // the radius of the circle
);
dvz.mock_circle(  # returns the positions : vec3*
    count,  # the number of positions to generate : int
    radius,  # the radius of the circle : float
)

dvz_mock_cmap()

Generate a set of colormap colors.

DvzColor* dvz_mock_cmap(  // returns colors
    uint32_t count,  // the number of colors to generate
    DvzColormap cmap,  // the colormap
    DvzAlpha alpha,  // the alpha value
);
dvz.mock_cmap(  # returns colors : DvzColor*
    count,  # the number of colors to generate : int
    cmap,  # the colormap : DvzColormap
    alpha,  # the alpha value : DvzAlpha
)

dvz_mock_color()

Generate a set of random colors.

DvzColor* dvz_mock_color(  // returns random colors
    uint32_t count,  // the number of colors to generate
    DvzAlpha alpha,  // the alpha value
);
dvz.mock_color(  # returns random colors : DvzColor*
    count,  # the number of colors to generate : int
    alpha,  # the alpha value : DvzAlpha
)

dvz_mock_fixed()

Generate identical 3D positions.

vec3* dvz_mock_fixed(  // returns the repeated positions
    uint32_t count,  // the number of positions to generate
    vec3 fixed,  // the position
);
dvz.mock_fixed(  # returns the repeated positions : vec3*
    count,  # the number of positions to generate : int
    fixed,  # the position : Tuple[float, float, float]
)

dvz_mock_full()

Generate an array with the same value.

float* dvz_mock_full(  // returns the values
    uint32_t count,  // the number of scalars to generate
    float value,  // the value
);
dvz.mock_full(  # returns the values : float*
    count,  # the number of scalars to generate : int
    value,  # the value : float
)

dvz_mock_line()

Generate 3D positions on a line.

vec3* dvz_mock_line(  // returns the positions
    uint32_t count,  // the number of positions to generate
    vec3 p0,  // initial position
    vec3 p1,  // terminal position
);
dvz.mock_line(  # returns the positions : vec3*
    count,  # the number of positions to generate : int
    p0,  # initial position : Tuple[float, float, float]
    p1,  # terminal position : Tuple[float, float, float]
)

dvz_mock_linspace()

Generate an array ranging from an initial value to a final value.

float* dvz_mock_linspace(  // returns the values
    uint32_t count,  // the number of scalars to generate
    float initial,  // the initial value
    float final,  // the final value
);
dvz.mock_linspace(  # returns the values : float*
    count,  # the number of scalars to generate : int
    initial,  # the initial value : float
    final,  # the final value : float
)

dvz_mock_monochrome()

Repeat a color in an array.

DvzColor* dvz_mock_monochrome(  // returns colors
    uint32_t count,  // the number of colors to generate
    DvzColor mono,  // the color to repeat
);
dvz.mock_monochrome(  # returns colors : DvzColor*
    count,  # the number of colors to generate : int
    mono,  # the color to repeat : Tuple[int, int, int, int]
)

dvz_mock_pos_2D()

Generate a set of random 2D positions.

vec3* dvz_mock_pos_2D(  // returns the positions
    uint32_t count,  // the number of positions to generate
    float std,  // the standard deviation
);
dvz.mock_pos_2D(  # returns the positions : vec3*
    count,  # the number of positions to generate : int
    std,  # the standard deviation : float
)

dvz_mock_pos_3D()

Generate a set of random 3D positions.

vec3* dvz_mock_pos_3D(  // returns the positions
    uint32_t count,  // the number of positions to generate
    float std,  // the standard deviation
);
dvz.mock_pos_3D(  # returns the positions : vec3*
    count,  # the number of positions to generate : int
    std,  # the standard deviation : float
)

dvz_mock_range()

Generate an array of consecutive positive numbers.

uint32_t* dvz_mock_range(  // returns the values
    uint32_t count,  // the number of consecutive integers to generate
    uint32_t initial,  // the initial value
);
dvz.mock_range(  # returns the values : uint32_t*
    count,  # the number of consecutive integers to generate : int
    initial,  # the initial value : int
)

dvz_mock_uniform()

Generate a set of uniformly random scalar values.

float* dvz_mock_uniform(  // returns the values
    uint32_t count,  // the number of values to generate
    float vmin,  // the minimum value of the interval
    float vmax,  // the maximum value of the interval
);
dvz.mock_uniform(  # returns the values : float*
    count,  # the number of values to generate : int
    vmin,  # the minimum value of the interval : float
    vmax,  # the maximum value of the interval : float
)

Mouse

dvz_mouse_destroy()

Destroy a mouse.

void dvz_mouse_destroy(
    DvzMouse* mouse,  // the mouse
);
dvz.mouse_destroy(
    mouse,  # the mouse : DvzMouse*
)

dvz_mouse_event()

Create a generic mouse event.

void dvz_mouse_event(
    DvzMouse* mouse,  // the mouse
    DvzMouseEvent* ev,  // the mouse event
);
dvz.mouse_event(
    mouse,  # the mouse : DvzMouse*
    ev,  # the mouse event : DvzMouseEvent*
)

dvz_mouse_move()

Create a mouse move event.

void dvz_mouse_move(
    DvzMouse* mouse,  // the mouse
    vec2 pos,  // the cursor position, in pixels
    int mods,  // the keyboard modifier flags
);
dvz.mouse_move(
    mouse,  # the mouse : DvzMouse*
    pos,  # the cursor position, in pixels : Tuple[float, float]
    mods,  # the keyboard modifier flags : int
)

dvz_mouse_press()

Create a mouse press event.

void dvz_mouse_press(
    DvzMouse* mouse,  // the mouse
    DvzMouseButton button,  // the mouse button (enum int)
    int mods,  // the keyboard modifier flags
);
dvz.mouse_press(
    mouse,  # the mouse : DvzMouse*
    button,  # the mouse button (enum int) : DvzMouseButton
    mods,  # the keyboard modifier flags : int
)

dvz_mouse_release()

Create a mouse release event.

void dvz_mouse_release(
    DvzMouse* mouse,  // the mouse
    DvzMouseButton button,  // the mouse button (enum int)
    int mods,  // the keyboard modifier flags
);
dvz.mouse_release(
    mouse,  # the mouse : DvzMouse*
    button,  # the mouse button (enum int) : DvzMouseButton
    mods,  # the keyboard modifier flags : int
)

dvz_mouse_wheel()

Create a mouse wheel event.

void dvz_mouse_wheel(
    DvzMouse* mouse,  // the mouse
    vec2 dir,  // the mouse wheel direction (x, y)
    int mods,  // the keyboard modifier flags
);
dvz.mouse_wheel(
    mouse,  # the mouse : DvzMouse*
    dir,  # the mouse wheel direction (x, y) : Tuple[float, float]
    mods,  # the keyboard modifier flags : int
)

Msdf

dvz_msdf_from_svg()

Generate a multichannel SDF from an SVG path.

float* dvz_msdf_from_svg(  // returns the generated texture as RGB floats
    char* svg_path,  // the SVG path
    uint32_t width,  // the width of the generated SDF, in pixels
    uint32_t height,  // the height of the generated SDF, in pixels
);
dvz.msdf_from_svg(  # returns the generated texture as RGB floats : float*
    svg_path,  # the SVG path : str
    width,  # the width of the generated SDF, in pixels : int
    height,  # the height of the generated SDF, in pixels : int
)

dvz_msdf_to_rgb()

Convert a multichannel SDF float texture to a byte texture.

uint8_t* dvz_msdf_to_rgb(  // returns the byte texture
    float* sdf,  // the SDF float texture
    uint32_t width,  // the width of the texture
    uint32_t height,  // the height of the texture
);
dvz.msdf_to_rgb(  # returns the byte texture : uint8_t*
    sdf,  # the SDF float texture : np.ndarray[float]
    width,  # the width of the texture : int
    height,  # the height of the texture : int
)

Next

dvz_next_pow2()

Return the smallest power of 2 larger or equal than a positive integer.

uint64_t dvz_next_pow2(  // returns the power of 2
    uint64_t x,  // the value
);
dvz.next_pow2(  # returns the power of 2 : uint64_t
    x,  # the value : int
)

Normalize

dvz_normalize_bytes()

Normalize the array.

void dvz_normalize_bytes(
    vec2 min_max,  // the minimum and maximum values, mapped to 0 and 255, the result will be clipped
    uint32_t count,  // the number of values
    float* values,  // an array of float numbers
    uint8_t* out,  // the out uint8 array
);
dvz.normalize_bytes(
    min_max,  # the minimum and maximum values, mapped to 0 and 255, the result will be clipped : Tuple[float, float]
    count,  # the number of values : int
    values,  # an array of float numbers : np.ndarray[float]
    out,  # the out uint8 array : np.ndarray[uint8_t]
)

Num

dvz_num_procs()

Return the number of processors on the current system.

int dvz_num_procs(  // returns the number of processors
);
dvz.num_procs(  # returns the number of processors : int
)

Ortho

dvz_ortho_end()

End an ortho interaction.

void dvz_ortho_end(
    DvzOrtho* ortho,  // the ortho
);
dvz.ortho_end(
    ortho,  # the ortho : DvzOrtho*
)

dvz_ortho_flags()

Set the ortho flags.

void dvz_ortho_flags(
    DvzOrtho* ortho,  // the ortho
    int flags,  // the flags
);
dvz.ortho_flags(
    ortho,  # the ortho : DvzOrtho*
    flags,  # the flags : int
)

dvz_ortho_mvp()

Apply an MVP matrix to an ortho.

void dvz_ortho_mvp(
    DvzOrtho* ortho,  // the ortho
    DvzMVP* mvp,  // the MVP
);
dvz.ortho_mvp(
    ortho,  # the ortho : DvzOrtho*
    mvp,  # the MVP : DvzMVP*
)

dvz_ortho_pan()

Apply a pan value to an ortho.

void dvz_ortho_pan(
    DvzOrtho* ortho,  // the ortho
    vec2 pan,  // the pan, in NDC
);
dvz.ortho_pan(
    ortho,  # the ortho : DvzOrtho*
    pan,  # the pan, in NDC : Tuple[float, float]
)

dvz_ortho_pan_shift()

Apply a pan shift to an ortho.

void dvz_ortho_pan_shift(
    DvzOrtho* ortho,  // the ortho
    vec2 shift_px,  // the shift value, in pixels
    vec2 center_px,  // the center position, in pixels
);
dvz.ortho_pan_shift(
    ortho,  # the ortho : DvzOrtho*
    shift_px,  # the shift value, in pixels : Tuple[float, float]
    center_px,  # the center position, in pixels : Tuple[float, float]
)

dvz_ortho_reset()

Reset an ortho.

void dvz_ortho_reset(
    DvzOrtho* ortho,  // the ortho
);
dvz.ortho_reset(
    ortho,  # the ortho : DvzOrtho*
)

dvz_ortho_resize()

Inform an ortho of a panel resize.

void dvz_ortho_resize(
    DvzOrtho* ortho,  // the ortho
    float width,  // the panel width
    float height,  // the panel height
);
dvz.ortho_resize(
    ortho,  # the ortho : DvzOrtho*
    width,  # the panel width : float
    height,  # the panel height : float
)

dvz_ortho_zoom()

Apply a zoom value to an ortho.

void dvz_ortho_zoom(
    DvzOrtho* ortho,  // the ortho
    float zoom,  // the zoom level
);
dvz.ortho_zoom(
    ortho,  # the ortho : DvzOrtho*
    zoom,  # the zoom level : float
)

dvz_ortho_zoom_shift()

Apply a zoom shift to an ortho.

void dvz_ortho_zoom_shift(
    DvzOrtho* ortho,  // the ortho
    vec2 shift_px,  // the shift value, in pixels
    vec2 center_px,  // the center position, in pixels
);
dvz.ortho_zoom_shift(
    ortho,  # the ortho : DvzOrtho*
    shift_px,  # the shift value, in pixels : Tuple[float, float]
    center_px,  # the center position, in pixels : Tuple[float, float]
)

dvz_ortho_zoom_wheel()

Apply a wheel zoom to an ortho.

void dvz_ortho_zoom_wheel(
    DvzOrtho* ortho,  // the ortho
    vec2 dir,  // the wheel direction
    vec2 center_px,  // the center position, in pixels
);
dvz.ortho_zoom_wheel(
    ortho,  # the ortho : DvzOrtho*
    dir,  # the wheel direction : Tuple[float, float]
    center_px,  # the center position, in pixels : Tuple[float, float]
)

Panel

dvz_panel_arcball()

Set arcball interactivity for a panel.

DvzArcball* dvz_panel_arcball(  // returns the arcball
    DvzPanel* panel,  // the panel
    int flags,  // the flags
);
dvz.panel_arcball(  # returns the arcball : DvzArcball*
    panel,  # the panel : DvzPanel*
    flags,  # the flags : int
)

dvz_panel_at()

Return the panel containing a given point.

DvzPanel* dvz_panel_at(  // returns the panel containing the point, or NULL if there is none
    DvzFigure* figure,  // the figure
    vec2 pos,  // the position
);
dvz.panel_at(  # returns the panel containing the point, or NULL if there is none : DvzPanel*
    figure,  # the figure : DvzFigure*
    pos,  # the position : Tuple[float, float]
)

dvz_panel_axes()

Get the axes.

DvzAxes* dvz_panel_axes(  // returns the axes
    DvzPanel* panel,  // the panel
);
dvz.panel_axes(  # returns the axes : DvzAxes*
    panel,  # the panel : DvzPanel*
)

dvz_panel_axes_2D()

Create 2D axes.

DvzAxes* dvz_panel_axes_2D(  // returns the axes
    DvzPanel* panel,  // the panel
    double xmin,  // xmin
    double xmax,  // xmax
    double ymin,  // ymin
    double ymax,  // ymax
);
dvz.panel_axes_2D(  # returns the axes : DvzAxes*
    panel,  # the panel : DvzPanel*
    xmin,  # xmin : float
    xmax,  # xmax : float
    ymin,  # ymin : float
    ymax,  # ymax : float
)

dvz_panel_background()

Set a colored background for a panel.

void dvz_panel_background(
    DvzPanel* panel,  // the panel
    cvec4* background,  // the colors of the four corners (top-left, top-right, bottom left
);
dvz.panel_background(
    panel,  # the panel : DvzPanel*
    background,  # the colors of the four corners (top-left, top-right, bottom left, : np.ndarray[cvec4]
)

dvz_panel_batch()

Return the batch from a panel.

DvzBatch* dvz_panel_batch(  // returns the batch
    DvzPanel* panel,  // the panel
);
dvz.panel_batch(  # returns the batch : DvzBatch*
    panel,  # the panel : DvzPanel*
)

dvz_panel_camera()

Set a camera for a panel.

DvzCamera* dvz_panel_camera(  // returns the camera
    DvzPanel* panel,  // the panel
    int flags,  // the camera flags
);
dvz.panel_camera(  # returns the camera : DvzCamera*
    panel,  # the panel : DvzPanel*
    flags,  # the camera flags : int
)

dvz_panel_contains()

Return whether a point is inside a panel.

bool dvz_panel_contains(  // returns true if the position lies within the panel
    DvzPanel* panel,  // the panel
    vec2 pos,  // the position
);
dvz.panel_contains(  # returns true if the position lies within the panel : bool
    panel,  # the panel : DvzPanel*
    pos,  # the position : Tuple[float, float]
)

dvz_panel_default()

Return the default full panel spanning an entire figure.

DvzPanel* dvz_panel_default(  // returns the panel spanning the entire figure
    DvzFigure* fig,  // the figure
);
dvz.panel_default(  # returns the panel spanning the entire figure : DvzPanel*
    fig,  # the figure : DvzFigure*
)

dvz_panel_destroy()

Destroy a panel.

void dvz_panel_destroy(
    DvzPanel* panel,  // the panel
);
dvz.panel_destroy(
    panel,  # the panel : DvzPanel*
)

dvz_panel_figure()

Return the figure from a panel.

DvzFigure* dvz_panel_figure(  // returns the figure
    DvzPanel* panel,  // the panel
);
dvz.panel_figure(  # returns the figure : DvzFigure*
    panel,  # the panel : DvzPanel*
)

dvz_panel_flags()

Set the panel flags

void dvz_panel_flags(
    DvzPanel* panel,  // the panel
    int flags,  // the panel flags
);
dvz.panel_flags(
    panel,  # the panel : DvzPanel*
    flags,  # the panel flags : int
)

dvz_panel_gui()

Set a panel as a GUI panel.

void dvz_panel_gui(
    DvzPanel* panel,  // the panel
    char* title,  // the GUI dialog title
    int flags,  // the GUI dialog flags (unused at the moment)
);
dvz.panel_gui(
    panel,  # the panel : DvzPanel*
    title,  # the GUI dialog title : str
    flags,  # the GUI dialog flags (unused at the moment) : int
)

Add or remove a link between two panels. At all times, the target panel's transform is copied from the source panel's transform.

void dvz_panel_link(
    DvzPanel* panel,  // the target panel
    DvzPanel* source,  // the source panel
    int flags,  // the panel link flags: 0 to remove, or a bit field with model, view, projection
);
dvz.panel_link(
    panel,  # the target panel : DvzPanel*
    source,  # the source panel : DvzPanel*
    flags,  # the panel link flags: 0 to remove, or a bit field with model, view, projection : int
)

dvz_panel_margins()

Set the margins of a panel.

void dvz_panel_margins(
    DvzPanel* panel,  // the panel
    float top,  // the top margin, in pixels
    float right,  // the right margin, in pixels
    float bottom,  // the bottom margin, in pixels
    float left,  // the left margin, in pixels
);
dvz.panel_margins(
    panel,  # the panel : DvzPanel*
    top,  # the top margin, in pixels : float
    right,  # the right margin, in pixels : float
    bottom,  # the bottom margin, in pixels : float
    left,  # the left margin, in pixels : float
)

dvz_panel_mvp()

Assign a MVP structure to a panel.

void dvz_panel_mvp(
    DvzPanel* panel,  // the panel
    DvzMVP* mvp,  // a pointer to the MVP structure
);
dvz.panel_mvp(
    panel,  # the panel : DvzPanel*
    mvp,  # a pointer to the MVP structure : DvzMVP*
)

dvz_panel_mvpmat()

Assign the model-view-proj matrices to a panel.

void dvz_panel_mvpmat(
    DvzPanel* panel,  // the panel
    mat4 model,  // the model matrix
    mat4 view,  // the view matrix
    mat4 proj,  // the projection matrix
);
dvz.panel_mvpmat(
    panel,  # the panel : DvzPanel*
    model,  # the model matrix : mat4
    view,  # the view matrix : mat4
    proj,  # the projection matrix : mat4
)

dvz_panel_ortho()

Set ortho interactivity for a panel.

DvzOrtho* dvz_panel_ortho(  // returns the ortho
    DvzPanel* panel,  // the panel
    int flags,  // the flags
);
dvz.panel_ortho(  # returns the ortho : DvzOrtho*
    panel,  # the panel : DvzPanel*
    flags,  # the flags : int
)

dvz_panel_panzoom()

Set panzoom interactivity for a panel.

DvzPanzoom* dvz_panel_panzoom(  // returns the panzoom
    DvzPanel* panel,  // the panel
    int flags,  // the flags
);
dvz.panel_panzoom(  # returns the panzoom : DvzPanzoom*
    panel,  # the panel : DvzPanel*
    flags,  # the flags : int
)

dvz_panel_ref()

Get the panel's reference.

DvzRef* dvz_panel_ref(  // returns the reference
    DvzPanel* panel,  // the panel
);
dvz.panel_ref(  # returns the reference : DvzRef*
    panel,  # the panel : DvzPanel*
)

dvz_panel_remove()

Remove a visual from a panel.

void dvz_panel_remove(
    DvzPanel* panel,  // the panel
    DvzVisual* visual,  // the visual
);
dvz.panel_remove(
    panel,  # the panel : DvzPanel*
    visual,  # the visual : DvzVisual*
)

dvz_panel_resize()

Resize a panel.

void dvz_panel_resize(
    DvzPanel* panel,  // the panel
    float x,  // the x coordinate of the top left corner, in pixels
    float y,  // the y coordinate of the top left corner, in pixels
    float width,  // the panel width, in pixels
    float height,  // the panel height, in pixels
);
dvz.panel_resize(
    panel,  # the panel : DvzPanel*
    x,  # the x coordinate of the top left corner, in pixels : float
    y,  # the y coordinate of the top left corner, in pixels : float
    width,  # the panel width, in pixels : float
    height,  # the panel height, in pixels : float
)

dvz_panel_show()

Show or hide a panel.

void dvz_panel_show(
    DvzPanel* panel,  // the panel
    bool is_visible,  // whether to show or hide the panel
);
dvz.panel_show(
    panel,  # the panel : DvzPanel*
    is_visible,  # whether to show or hide the panel : bool
)

dvz_panel_transform()

Assign a transform to a panel.

void dvz_panel_transform(
    DvzPanel* panel,  // the panel
    DvzTransform* tr,  // the transform
);
dvz.panel_transform(
    panel,  # the panel : DvzPanel*
    tr,  # the transform : DvzTransform*
)

dvz_panel_update()

Trigger a panel update.

void dvz_panel_update(
    DvzPanel* panel,  // the panel
);
dvz.panel_update(
    panel,  # the panel : DvzPanel*
)

dvz_panel_visual()

Add a visual to a panel.

void dvz_panel_visual(
    DvzPanel* panel,  // the panel
    DvzVisual* visual,  // the visual
    int flags,  // the flags
);
dvz.panel_visual(
    panel,  # the panel : DvzPanel*
    visual,  # the visual : DvzVisual*
    flags,  # the flags : int
)

Panzoom

dvz_panzoom_bounds()

Get x-y bounds.

void dvz_panzoom_bounds(
    DvzPanzoom* pz,  // the panzoom
    DvzRef* ref,  // the ref
    double* xmin,  // xmin
    double* xmax,  // xmax
    double* ymin,  // ymin
    double* ymax,  // ymax
);
dvz.panzoom_bounds(
    pz,  # the panzoom : DvzPanzoom*
    ref,  # the ref : DvzRef*
    xmin,  # xmin : Out[float]
    xmax,  # xmax : Out[float]
    ymin,  # ymin : Out[float]
    ymax,  # ymax : Out[float]
)

dvz_panzoom_destroy()

Destroy a panzoom.

void dvz_panzoom_destroy(
    DvzPanzoom* pz,  // the pz
);
dvz.panzoom_destroy(
    pz,  # the pz : DvzPanzoom*
)

dvz_panzoom_end()

End a panzoom interaction.

void dvz_panzoom_end(
    DvzPanzoom* pz,  // the panzoom
);
dvz.panzoom_end(
    pz,  # the panzoom : DvzPanzoom*
)

dvz_panzoom_extent()

Get the extent box.

void dvz_panzoom_extent(
    DvzPanzoom* pz,  // the panzoom
    DvzBox* extent,  // the extent box in normalized coordinates
);
dvz.panzoom_extent(
    pz,  # the panzoom : DvzPanzoom*
    extent,  # the extent box in normalized coordinates : Out[DvzBox]
)

dvz_panzoom_flags()

Set the panzoom flags.

void dvz_panzoom_flags(
    DvzPanzoom* pz,  // the panzoom
    int flags,  // the flags
);
dvz.panzoom_flags(
    pz,  # the panzoom : DvzPanzoom*
    flags,  # the flags : int
)

dvz_panzoom_level()

Get the current zoom level.

float dvz_panzoom_level(
    DvzPanzoom* pz,  // the panzoom
    DvzDim dim,  // the dimension
);
dvz.panzoom_level(
    pz,  # the panzoom : DvzPanzoom*
    dim,  # the dimension : DvzDim
)

dvz_panzoom_mouse()

Register a mouse event to a panzoom.

bool dvz_panzoom_mouse(  // returns whether the panzoom is affected by the mouse event
    DvzPanzoom* pz,  // the panzoom
    DvzMouseEvent* ev,  // the mouse event
);
dvz.panzoom_mouse(  # returns whether the panzoom is affected by the mouse event : bool
    pz,  # the panzoom : DvzPanzoom*
    ev,  # the mouse event : DvzMouseEvent*
)

dvz_panzoom_mvp()

Apply an MVP matrix to a panzoom.

void dvz_panzoom_mvp(
    DvzPanzoom* pz,  // the panzoom
    DvzMVP* mvp,  // the MVP
);
dvz.panzoom_mvp(
    pz,  # the panzoom : DvzPanzoom*
    mvp,  # the MVP : DvzMVP*
)

dvz_panzoom_pan()

Apply a pan value to a panzoom.

void dvz_panzoom_pan(
    DvzPanzoom* pz,  // the panzoom
    vec2 pan,  // the pan, in NDC
);
dvz.panzoom_pan(
    pz,  # the panzoom : DvzPanzoom*
    pan,  # the pan, in NDC : Tuple[float, float]
)

dvz_panzoom_pan_shift()

Apply a pan shift to a panzoom.

void dvz_panzoom_pan_shift(
    DvzPanzoom* pz,  // the panzoom
    vec2 shift_px,  // the shift value, in pixels
    vec2 center_px,  // the center position, in pixels
);
dvz.panzoom_pan_shift(
    pz,  # the panzoom : DvzPanzoom*
    shift_px,  # the shift value, in pixels : Tuple[float, float]
    center_px,  # the center position, in pixels : Tuple[float, float]
)

dvz_panzoom_reset()

Reset a panzoom.

void dvz_panzoom_reset(
    DvzPanzoom* pz,  // the panzoom
);
dvz.panzoom_reset(
    pz,  # the panzoom : DvzPanzoom*
)

dvz_panzoom_resize()

Inform a panzoom of a panel resize.

void dvz_panzoom_resize(
    DvzPanzoom* pz,  // the panzoom
    float width,  // the panel width
    float height,  // the panel height
);
dvz.panzoom_resize(
    pz,  # the panzoom : DvzPanzoom*
    width,  # the panel width : float
    height,  # the panel height : float
)

dvz_panzoom_set()

Set the extent box.

void dvz_panzoom_set(
    DvzPanzoom* pz,  // the panzoom
    DvzBox* extent,  // the extent box
);
dvz.panzoom_set(
    pz,  # the panzoom : DvzPanzoom*
    extent,  # the extent box : DvzBox*
)

dvz_panzoom_xlim()

Set x bounds.

void dvz_panzoom_xlim(
    DvzPanzoom* pz,  // the panzoom
    DvzRef* ref,  // the ref
    double xmin,  // xmin
    double xmax,  // xmax
);
dvz.panzoom_xlim(
    pz,  # the panzoom : DvzPanzoom*
    ref,  # the ref : DvzRef*
    xmin,  # xmin : float
    xmax,  # xmax : float
)

dvz_panzoom_ylim()

Set y bounds.

void dvz_panzoom_ylim(
    DvzPanzoom* pz,  // the panzoom
    DvzRef* ref,  // the ref
    double ymin,  // ymin
    double ymax,  // ymax
);
dvz.panzoom_ylim(
    pz,  # the panzoom : DvzPanzoom*
    ref,  # the ref : DvzRef*
    ymin,  # ymin : float
    ymax,  # ymax : float
)

dvz_panzoom_zoom()

Apply a zoom value to a panzoom.

void dvz_panzoom_zoom(
    DvzPanzoom* pz,  // the panzoom
    vec2 zoom,  // the zoom, in NDC
);
dvz.panzoom_zoom(
    pz,  # the panzoom : DvzPanzoom*
    zoom,  # the zoom, in NDC : Tuple[float, float]
)

dvz_panzoom_zoom_shift()

Apply a zoom shift to a panzoom.

void dvz_panzoom_zoom_shift(
    DvzPanzoom* pz,  // the panzoom
    vec2 shift_px,  // the shift value, in pixels
    vec2 center_px,  // the center position, in pixels
);
dvz.panzoom_zoom_shift(
    pz,  # the panzoom : DvzPanzoom*
    shift_px,  # the shift value, in pixels : Tuple[float, float]
    center_px,  # the center position, in pixels : Tuple[float, float]
)

dvz_panzoom_zoom_wheel()

Apply a wheel zoom to a panzoom.

void dvz_panzoom_zoom_wheel(
    DvzPanzoom* pz,  // the panzoom
    vec2 dir,  // the wheel direction
    vec2 center_px,  // the center position, in pixels
);
dvz.panzoom_zoom_wheel(
    pz,  # the panzoom : DvzPanzoom*
    dir,  # the wheel direction : Tuple[float, float]
    center_px,  # the center position, in pixels : Tuple[float, float]
)

Qt

dvz_qt_app()

Placeholder.

DvzQtApp* dvz_qt_app(
    QApplication* qapp,  // placeholder
    int flags,  // 
);
dvz.qt_app(
    qapp,  # placeholder : np.ndarray[QApplication]
    flags,  #  : int
)

dvz_qt_app_destroy()

Placeholder.

void dvz_qt_app_destroy(
    DvzQtApp* app,  // placeholder
);
dvz.qt_app_destroy(
    app,  # placeholder : DvzQtApp*
)

dvz_qt_batch()

Placeholder.

DvzBatch* dvz_qt_batch(
    DvzQtApp* app,  // placeholder
);
dvz.qt_batch(
    app,  # placeholder : DvzQtApp*
)

dvz_qt_submit()

Placeholder.

void dvz_qt_submit(
    DvzQtApp* app,  // placeholder
    DvzBatch* batch,  // 
);
dvz.qt_submit(
    app,  # placeholder : DvzQtApp*
    batch,  #  : DvzBatch*
)

dvz_qt_window()

Placeholder.

DvzQtWindow* dvz_qt_window(
    DvzQtApp* app,  // placeholder
);
dvz.qt_window(
    app,  # placeholder : DvzQtApp*
)

Rand

dvz_rand_byte()

Return a random integer number between 0 and 255.

uint8_t dvz_rand_byte(  // returns random number
);
dvz.rand_byte(  # returns random number : uint8_t
)

dvz_rand_double()

Return a random floating-point number between 0 and 1.

double dvz_rand_double(  // returns random number
);
dvz.rand_double(  # returns random number : double
)

dvz_rand_float()

Return a random floating-point number between 0 and 1.

float dvz_rand_float(  // returns random number
);
dvz.rand_float(  # returns random number : float
)

dvz_rand_int()

Return a random integer number.

int dvz_rand_int(  // returns random number
);
dvz.rand_int(  # returns random number : int
)

dvz_rand_normal()

Return a random normal floating-point number.

double dvz_rand_normal(  // returns random number
);
dvz.rand_normal(  # returns random number : double
)

Ref

dvz_ref_destroy()

Destroy a reference frame.

void dvz_ref_destroy(
    DvzRef* ref,  // the reference frame
);
dvz.ref_destroy(
    ref,  # the reference frame : DvzRef*
)

dvz_ref_expand()

Expand the reference by ensuring it contains the specified range.

void dvz_ref_expand(
    DvzRef* ref,  // the reference frame
    DvzDim dim,  // the dimension axis
    double vmin,  // the minimum value
    double vmax,  // the maximum value
);
dvz.ref_expand(
    ref,  # the reference frame : DvzRef*
    dim,  # the dimension axis : DvzDim
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
)

dvz_ref_expand_2D()

Expand the reference by ensuring it contains the specified 2D data.

void dvz_ref_expand_2D(
    DvzRef* ref,  // the reference frame
    uint32_t count,  // the number of positions
    dvec2* pos,  // the 2D positions
);
dvz.ref_expand_2D(
    ref,  # the reference frame : DvzRef*
    count,  # the number of positions : int
    pos,  # the 2D positions : np.ndarray[dvec2]
)

dvz_ref_expand_3D()

Expand the reference by ensuring it contains the specified 3D data.

void dvz_ref_expand_3D(
    DvzRef* ref,  // the reference frame
    uint32_t count,  // the number of positions
    dvec3* pos,  // the 3D positions
);
dvz.ref_expand_3D(
    ref,  # the reference frame : DvzRef*
    count,  # the number of positions : int
    pos,  # the 3D positions : np.ndarray[dvec3]
)

dvz_ref_get()

Get the range on a given axis.

void dvz_ref_get(
    DvzRef* ref,  // the reference frame
    DvzDim dim,  // the dimension axis
    double* vmin,  // the minimum value
    double* vmax,  // the maximum value
);
dvz.ref_get(
    ref,  # the reference frame : DvzRef*
    dim,  # the dimension axis : DvzDim
    vmin,  # the minimum value : Out[float]
    vmax,  # the maximum value : Out[float]
)

dvz_ref_inverse()

Inverse transform from normalized device coordinates [-1..+1] to the reference frame.

void dvz_ref_inverse(
    DvzRef* ref,  // the reference frame
    vec3 pos_tr,  // the 3D position in normalized device coordinates
    dvec3* pos,  // the original position
);
dvz.ref_inverse(
    ref,  # the reference frame : DvzRef*
    pos_tr,  # the 3D position in normalized device coordinates : Tuple[float, float, float]
    pos,  # the original position : Out[dvec3]
)

dvz_ref_is_set()

Indicate whether the reference is set on a given axis.

bool dvz_ref_is_set(  // returns whether the ref is set on this axis.
    DvzRef* ref,  // the reference frame
    DvzDim dim,  // the dimension axis
);
dvz.ref_is_set(  # returns whether the ref is set on this axis. : bool
    ref,  # the reference frame : DvzRef*
    dim,  # the dimension axis : DvzDim
)

dvz_ref_normalize_1D()

Transform 1D data from the reference frame to normalized device coordinates [-1..+1].

void dvz_ref_normalize_1D(
    DvzRef* ref,  // the reference frame
    DvzDim dim,  // which dimension
    uint32_t count,  // the number of positions
    double* pos,  // the 1D positions
    vec3* pos_tr,  // (array) the transformed positions
);
dvz.ref_normalize_1D(
    ref,  # the reference frame : DvzRef*
    dim,  # which dimension : DvzDim
    count,  # the number of positions : int
    pos,  # the 1D positions : np.ndarray[double]
    pos_tr,  # (array) the transformed positions : Out[Tuple[float, float, float]]
)

dvz_ref_normalize_2D()

Transform 2D data from the reference frame to normalized device coordinates [-1..+1].

void dvz_ref_normalize_2D(
    DvzRef* ref,  // the reference frame
    uint32_t count,  // the number of positions
    dvec2* pos,  // the 2D positions
    vec3* pos_tr,  // (array) the transformed 3D positions
);
dvz.ref_normalize_2D(
    ref,  # the reference frame : DvzRef*
    count,  # the number of positions : int
    pos,  # the 2D positions : np.ndarray[dvec2]
    pos_tr,  # (array) the transformed 3D positions : Out[Tuple[float, float, float]]
)

dvz_ref_normalize_3D()

Transform 3D data from the reference frame to normalized device coordinates [-1..+1].

void dvz_ref_normalize_3D(
    DvzRef* ref,  // the reference frame
    uint32_t count,  // the number of positions
    dvec3* pos,  // the 3D positions
    vec3* pos_tr,  // (array) the transformed positions
);
dvz.ref_normalize_3D(
    ref,  # the reference frame : DvzRef*
    count,  # the number of positions : int
    pos,  # the 3D positions : np.ndarray[dvec3]
    pos_tr,  # (array) the transformed positions : Out[Tuple[float, float, float]]
)

dvz_ref_normalize_polygon()

Transform 2D data from the reference frame to normalized device coordinates [-1..+1] in 2D.

void dvz_ref_normalize_polygon(
    DvzRef* ref,  // the reference frame
    uint32_t count,  // the number of positions
    dvec2* pos,  // the 2D positions
    dvec2* pos_tr,  // (array) the transformed 2D positions
);
dvz.ref_normalize_polygon(
    ref,  # the reference frame : DvzRef*
    count,  # the number of positions : int
    pos,  # the 2D positions : np.ndarray[dvec2]
    pos_tr,  # (array) the transformed 2D positions : Out[dvec2]
)

dvz_ref_set()

Set the range on a given axis.

void dvz_ref_set(
    DvzRef* ref,  // the reference frame
    DvzDim dim,  // the dimension axis
    double vmin,  // the minimum value
    double vmax,  // the maximum value
);
dvz.ref_set(
    ref,  # the reference frame : DvzRef*
    dim,  # the dimension axis : DvzDim
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
)

Rgb

dvz_rgb_to_rgba_char()

Convert an RGB byte texture to an RGBA one.

void dvz_rgb_to_rgba_char(
    uint32_t count,  // the number of pixels (and NOT the number of bytes) in the byte texture
    uint8_t* rgb,  // the RGB texture
    uint8_t* rgba,  // the returned RGBA texture
);
dvz.rgb_to_rgba_char(
    count,  # the number of pixels (and NOT the number of bytes) in the byte texture : int
    rgb,  # the RGB texture : np.ndarray[uint8_t]
    rgba,  # the returned RGBA texture : np.ndarray[uint8_t]
)

dvz_rgb_to_rgba_float()

Convert an RGB float texture to an RGBA one.

void dvz_rgb_to_rgba_float(
    uint32_t count,  // the number of pixels (and NOT the number of bytes) in the float texture
    float* rgb,  // the RGB texture
    float* rgba,  // the returned RGBA texture
);
dvz.rgb_to_rgba_float(
    count,  # the number of pixels (and NOT the number of bytes) in the float texture : int
    rgb,  # the RGB texture : np.ndarray[float]
    rgba,  # the returned RGBA texture : np.ndarray[float]
)

Scene

dvz_scene_batch()

Return the batch from a scene.

DvzBatch* dvz_scene_batch(  // returns the batch
    DvzScene* scene,  // the scene
);
dvz.scene_batch(  # returns the batch : DvzBatch*
    scene,  # the scene : DvzScene*
)

dvz_scene_destroy()

Destroy a scene.

void dvz_scene_destroy(
    DvzScene* scene,  // the scene
);
dvz.scene_destroy(
    scene,  # the scene : DvzScene*
)

dvz_scene_figure()

Get a figure from its id.

DvzFigure* dvz_scene_figure(  // returns the figure
    DvzScene* scene,  // the scene
    DvzId id,  // the figure id
);
dvz.scene_figure(  # returns the figure : DvzFigure*
    scene,  # the scene : DvzScene*
    id,  # the figure id : DvzId
)

dvz_scene_mouse()

Manually pass a mouse event to the scene.

void dvz_scene_mouse(
    DvzScene* scene,  // the scene
    DvzFigure* fig,  // the figure
    DvzMouseEvent* ev,  // the mouse event
);
dvz.scene_mouse(
    scene,  # the scene : DvzScene*
    fig,  # the figure : DvzFigure*
    ev,  # the mouse event : DvzMouseEvent*
)

dvz_scene_render()

Placeholder.

void dvz_scene_render(
    DvzScene* scene,  // placeholder
    DvzServer* server,  // 
);
dvz.scene_render(
    scene,  # placeholder : DvzScene*
    server,  #  : DvzServer*
)

dvz_scene_run()

Start the event loop and render the scene in a window.

void dvz_scene_run(
    DvzScene* scene,  // the scene
    DvzApp* app,  // the app
    uint64_t frame_count,  // the maximum number of frames, 0 for infinite loop
);
dvz.scene_run(
    scene,  # the scene : DvzScene*
    app,  # the app : DvzApp*
    frame_count,  # the maximum number of frames, 0 for infinite loop : int
)

Sdf

dvz_sdf_from_svg()

Generate an SDF from an SVG path.

float* dvz_sdf_from_svg(  // returns the generated texture as RGB floats
    char* svg_path,  // the SVG path
    uint32_t width,  // the width of the generated SDF, in pixels
    uint32_t height,  // the height of the generated SDF, in pixels
);
dvz.sdf_from_svg(  # returns the generated texture as RGB floats : float*
    svg_path,  # the SVG path : str
    width,  # the width of the generated SDF, in pixels : int
    height,  # the height of the generated SDF, in pixels : int
)

dvz_sdf_to_rgb()

Convert an SDF float texture to a byte texture.

uint8_t* dvz_sdf_to_rgb(  // returns the byte texture
    float* sdf,  // the SDF float texture
    uint32_t width,  // the width of the texture
    uint32_t height,  // the height of the texture
);
dvz.sdf_to_rgb(  # returns the byte texture : uint8_t*
    sdf,  # the SDF float texture : np.ndarray[float]
    width,  # the width of the texture : int
    height,  # the height of the texture : int
)

Server

dvz_server_destroy()

Placeholder.

void dvz_server_destroy(
    DvzServer* server,  // placeholder
);
dvz.server_destroy(
    server,  # placeholder : DvzServer*
)

dvz_server_grab()

Placeholder.

uint8_t* dvz_server_grab(
    DvzServer* server,  // placeholder
    DvzId canvas_id,  // 
    int flags,  // 
);
dvz.server_grab(
    server,  # placeholder : DvzServer*
    canvas_id,  #  : DvzId
    flags,  #  : int
)

dvz_server_keyboard()

Placeholder.

DvzKeyboard* dvz_server_keyboard(
    DvzServer* server,  // placeholder
);
dvz.server_keyboard(
    server,  # placeholder : DvzServer*
)

dvz_server_mouse()

Placeholder.

DvzMouse* dvz_server_mouse(
    DvzServer* server,  // placeholder
);
dvz.server_mouse(
    server,  # placeholder : DvzServer*
)

dvz_server_resize()

Placeholder.

void dvz_server_resize(
    DvzServer* server,  // placeholder
    DvzId canvas_id,  // 
    uint32_t width,  // 
    uint32_t height,  // 
);
dvz.server_resize(
    server,  # placeholder : DvzServer*
    canvas_id,  #  : DvzId
    width,  #  : int
    height,  #  : int
)

dvz_server_submit()

Placeholder.

void dvz_server_submit(
    DvzServer* server,  // placeholder
    DvzBatch* batch,  // 
);
dvz.server_submit(
    server,  # placeholder : DvzServer*
    batch,  #  : DvzBatch*
)

Shape

dvz_shape_arrow()

Create a 3D arrow using a cylinder and cone. The total length is 1.

void dvz_shape_arrow(
    DvzShape* shape,  // the shape
    uint32_t count,  // the number of sides to the shaft and head
    float head_length,  // the length of the head
    float head_radius,  // the radius of the head
    float shaft_radius,  // the radius of the shaft
    DvzColor color,  // the arrow color
);
dvz.shape_arrow(
    shape,  # the shape : DvzShape*
    count,  # the number of sides to the shaft and head : int
    head_length,  # the length of the head : float
    head_radius,  # the radius of the head : float
    shaft_radius,  # the radius of the shaft : float
    color,  # the arrow color : Tuple[int, int, int, int]
)

dvz_shape_begin()

Start a transformation sequence.

void dvz_shape_begin(
    DvzShape* shape,  // the shape
    uint32_t first,  // the first vertex to modify
    uint32_t count,  // the number of vertices to modify
);
dvz.shape_begin(
    shape,  # the shape : DvzShape*
    first,  # the first vertex to modify : int
    count,  # the number of vertices to modify : int
)

dvz_shape_cone()

Create a cone shape.

void dvz_shape_cone(
    DvzShape* shape,  // the shape
    uint32_t count,  // the number of points along the disc border
    DvzColor color,  // the cone color
);
dvz.shape_cone(
    shape,  # the shape : DvzShape*
    count,  # the number of points along the disc border : int
    color,  # the cone color : Tuple[int, int, int, int]
)

dvz_shape_cube()

Create a cube shape.

void dvz_shape_cube(
    DvzShape* shape,  // the shape
    DvzColor* colors,  // the colors of the six faces
);
dvz.shape_cube(
    shape,  # the shape : DvzShape*
    colors,  # the colors of the six faces : DvzColor*
)

dvz_shape_custom()

Create a shape out of an array of vertices and faces.

void dvz_shape_custom(
    DvzShape* shape,  // the shape
    uint32_t vertex_count,  // number of vertices
    vec3* positions,  // 3D positions of the vertices
    vec3* normals,  // normal vectors (optional, will be otherwise computed automatically)
    DvzColor* colors,  // vertex vectors (optional)
    vec4* texcoords,  // texture uv*a coordinates (optional)
    uint32_t index_count,  // number of indices (3x the number of triangular faces)
    DvzIndex* indices,  // vertex indices, three per face
);
dvz.shape_custom(
    shape,  # the shape : DvzShape*
    vertex_count,  # number of vertices : int
    positions,  # 3D positions of the vertices : np.ndarray[vec3]
    normals,  # normal vectors (optional, will be otherwise computed automatically) : np.ndarray[vec3]
    colors,  # vertex vectors (optional) : DvzColor*
    texcoords,  # texture uv*a coordinates (optional) : np.ndarray[vec4]
    index_count,  # number of indices (3x the number of triangular faces) : int
    indices,  # vertex indices, three per face : DvzIndex*
)

dvz_shape_cylinder()

Create a cylinder shape.

void dvz_shape_cylinder(
    DvzShape* shape,  // the shape
    uint32_t count,  // the number of points along the cylinder border
    DvzColor color,  // the cylinder color
);
dvz.shape_cylinder(
    shape,  # the shape : DvzShape*
    count,  # the number of points along the cylinder border : int
    color,  # the cylinder color : Tuple[int, int, int, int]
)

dvz_shape_destroy()

Destroy a shape.

void dvz_shape_destroy(
    DvzShape* shape,  // the shape
);
dvz.shape_destroy(
    shape,  # the shape : DvzShape*
)

dvz_shape_disc()

Create a disc shape.

void dvz_shape_disc(
    DvzShape* shape,  // the shape
    uint32_t count,  // the number of points along the disc border
    DvzColor color,  // the disc color
);
dvz.shape_disc(
    shape,  # the shape : DvzShape*
    count,  # the number of points along the disc border : int
    color,  # the disc color : Tuple[int, int, int, int]
)

dvz_shape_dodecahedron()

Create a dodecahedron.

void dvz_shape_dodecahedron(
    DvzShape* shape,  // the shape
    DvzColor color,  // the color
);
dvz.shape_dodecahedron(
    shape,  # the shape : DvzShape*
    color,  # the color : Tuple[int, int, int, int]
)

dvz_shape_end()

Apply the transformation sequence and reset it.

void dvz_shape_end(
    DvzShape* shape,  // the shape
);
dvz.shape_end(
    shape,  # the shape : DvzShape*
)

dvz_shape_guizmo()

Create a 3D guizmo with three arrows on the three axes.

void dvz_shape_guizmo(
    DvzShape* shape,  // the shape
);
dvz.shape_guizmo(
    shape,  # the shape : DvzShape*
)

dvz_shape_hexahedron()

Create a tetrahedron.

void dvz_shape_hexahedron(
    DvzShape* shape,  // the shape
    DvzColor color,  // the color
);
dvz.shape_hexahedron(
    shape,  # the shape : DvzShape*
    color,  # the color : Tuple[int, int, int, int]
)

dvz_shape_histogram()

Create a histogram shape.

void dvz_shape_histogram(
    DvzShape* shape,  // the shape
    uint32_t count,  // the number of bars
    float* heights,  // the height of each bar
    DvzColor color,  // the sector color
);
dvz.shape_histogram(
    shape,  # the shape : DvzShape*
    count,  # the number of bars : int
    heights,  # the height of each bar : np.ndarray[float]
    color,  # the sector color : Tuple[int, int, int, int]
)

dvz_shape_icosahedron()

Create a icosahedron.

void dvz_shape_icosahedron(
    DvzShape* shape,  // the shape
    DvzColor color,  // the color
);
dvz.shape_icosahedron(
    shape,  # the shape : DvzShape*
    color,  # the color : Tuple[int, int, int, int]
)

dvz_shape_index_count()

Return the number of index of a shape.

uint32_t dvz_shape_index_count(  // returns the number of index
    DvzShape* shape,  // the shape
);
dvz.shape_index_count(  # returns the number of index : uint32_t
    shape,  # the shape : DvzShape*
)

dvz_shape_merge()

Merge several shapes.

void dvz_shape_merge(
    DvzShape* shape,  // the merged shape
    uint32_t count,  // the number of shapes to merge
    DvzShape** shapes,  // the shapes to merge
);
dvz.shape_merge(
    shape,  # the merged shape : DvzShape*
    count,  # the number of shapes to merge : int
    shapes,  # the shapes to merge : DvzShape**
)

dvz_shape_normalize()

Normalize a shape.

void dvz_shape_normalize(
    DvzShape* shape,  // the shape
);
dvz.shape_normalize(
    shape,  # the shape : DvzShape*
)

dvz_shape_normals()

Recompute the face normals.

void dvz_shape_normals(
    DvzShape* shape,  // the shape
);
dvz.shape_normals(
    shape,  # the shape : DvzShape*
)

dvz_shape_obj()

Load a .obj shape.

void dvz_shape_obj(
    DvzShape* shape,  // the shape
    char* file_path,  // the path to the .obj file
);
dvz.shape_obj(
    shape,  # the shape : DvzShape*
    file_path,  # the path to the .obj file : str
)

dvz_shape_octahedron()

Create a octahedron.

void dvz_shape_octahedron(
    DvzShape* shape,  // the shape
    DvzColor color,  // the color
);
dvz.shape_octahedron(
    shape,  # the shape : DvzShape*
    color,  # the color : Tuple[int, int, int, int]
)

dvz_shape_polygon()

Create a polygon shape using the simple earcut polygon triangulation algorithm.

void dvz_shape_polygon(
    DvzShape* shape,  // the shape
    uint32_t count,  // the number of points along the polygon border
    dvec2* points,  // the points 2D coordinates
    DvzColor color,  // the polygon color
);
dvz.shape_polygon(
    shape,  # the shape : DvzShape*
    count,  # the number of points along the polygon border : int
    points,  # the points 2D coordinates : np.ndarray[dvec2]
    color,  # the polygon color : Tuple[int, int, int, int]
)

dvz_shape_print()

Show information about a shape.

void dvz_shape_print(
    DvzShape* shape,  // the shape
);
dvz.shape_print(
    shape,  # the shape : DvzShape*
)

dvz_shape_rescaling()

Compute the rescaling factor to renormalize a shape.

float dvz_shape_rescaling(
    DvzShape* shape,  // the shape
    int flags,  // the rescaling flags
    vec3 out_scale,  // the computed scaling factors
);
dvz.shape_rescaling(
    shape,  # the shape : DvzShape*
    flags,  # the rescaling flags : int
    out_scale,  # the computed scaling factors : Out[Tuple[float, float, float]]
)

dvz_shape_rotate()

Append a rotation to a shape.

void dvz_shape_rotate(
    DvzShape* shape,  // the shape
    float angle,  // the rotation angle
    vec3 axis,  // the rotation axis
);
dvz.shape_rotate(
    shape,  # the shape : DvzShape*
    angle,  # the rotation angle : float
    axis,  # the rotation axis : Tuple[float, float, float]
)

dvz_shape_scale()

Append a scaling transform to a shape.

void dvz_shape_scale(
    DvzShape* shape,  // the shape
    vec3 scale,  // the scaling factors
);
dvz.shape_scale(
    shape,  # the shape : DvzShape*
    scale,  # the scaling factors : Tuple[float, float, float]
)

dvz_shape_sector()

Create a sector shape.

void dvz_shape_sector(
    DvzShape* shape,  // the shape
    uint32_t count,  // the number of points along the sector border
    float angle_start,  // the initial angle
    float angle_stop,  // the final angle
    DvzColor color,  // the sector color
);
dvz.shape_sector(
    shape,  # the shape : DvzShape*
    count,  # the number of points along the sector border : int
    angle_start,  # the initial angle : float
    angle_stop,  # the final angle : float
    color,  # the sector color : Tuple[int, int, int, int]
)

dvz_shape_sphere()

Create a sphere shape.

void dvz_shape_sphere(
    DvzShape* shape,  // the shape
    uint32_t rows,  // the number of rows
    uint32_t cols,  // the number of columns
    DvzColor color,  // the sphere color
);
dvz.shape_sphere(
    shape,  # the shape : DvzShape*
    rows,  # the number of rows : int
    cols,  # the number of columns : int
    color,  # the sphere color : Tuple[int, int, int, int]
)

dvz_shape_square()

Create a square shape.

void dvz_shape_square(
    DvzShape* shape,  // the shape
    DvzColor color,  // the square color
);
dvz.shape_square(
    shape,  # the shape : DvzShape*
    color,  # the square color : Tuple[int, int, int, int]
)

dvz_shape_surface()

Create a grid shape.

void dvz_shape_surface(
    DvzShape* shape,  // the shape
    uint32_t row_count,  // number of rows
    uint32_t col_count,  // number of cols
    float* heights,  // a pointer to row_count*col_count height values (floats)
    DvzColor* colors,  // a pointer to row_count*col_count color values (DvzColor: cvec4 or vec4)
    vec3 o,  // the origin
    vec3 u,  // the unit vector parallel to each column
    vec3 v,  // the unit vector parallel to each row
    int flags,  // the grid creation flags
);
dvz.shape_surface(
    shape,  # the shape : DvzShape*
    row_count,  # number of rows : int
    col_count,  # number of cols : int
    heights,  # a pointer to row_count*col_count height values (floats) : np.ndarray[float]
    colors,  # a pointer to row_count*col_count color values (DvzColor: cvec4 or vec4) : DvzColor*
    o,  # the origin : Tuple[float, float, float]
    u,  # the unit vector parallel to each column : Tuple[float, float, float]
    v,  # the unit vector parallel to each row : Tuple[float, float, float]
    flags,  # the grid creation flags : int
)

dvz_shape_tetrahedron()

Create a tetrahedron.

void dvz_shape_tetrahedron(
    DvzShape* shape,  // the shape
    DvzColor color,  // the color
);
dvz.shape_tetrahedron(
    shape,  # the shape : DvzShape*
    color,  # the color : Tuple[int, int, int, int]
)

dvz_shape_torus()

Create a torus shape. The radius of the ring is 0.5.

void dvz_shape_torus(
    DvzShape* shape,  // the shape
    uint32_t count_radial,  // the number of points around the ring
    uint32_t count_tubular,  // the number of points in each cross-section
    float tube_radius,  // the radius of the tube.
    DvzColor color,  // the torus color
);
dvz.shape_torus(
    shape,  # the shape : DvzShape*
    count_radial,  # the number of points around the ring : int
    count_tubular,  # the number of points in each cross-section : int
    tube_radius,  # the radius of the tube. : float
    color,  # the torus color : Tuple[int, int, int, int]
)

dvz_shape_transform()

Append an arbitrary transformation.

void dvz_shape_transform(
    DvzShape* shape,  // the shape
    mat4 transform,  // the transform mat4 matrix
);
dvz.shape_transform(
    shape,  # the shape : DvzShape*
    transform,  # the transform mat4 matrix : mat4
)

dvz_shape_translate()

Append a translation to a shape.

void dvz_shape_translate(
    DvzShape* shape,  // the shape
    vec3 translate,  // the translation vector
);
dvz.shape_translate(
    shape,  # the shape : DvzShape*
    translate,  # the translation vector : Tuple[float, float, float]
)

dvz_shape_unindex()

Convert an indexed shape to a non-indexed one by duplicating the vertex values according to the indices. This is used by the mesh wireframe option, as a given vertex may have distinct barycentric coordinates depending on its index.

void dvz_shape_unindex(
    DvzShape* shape,  // the shape
    int flags,  // the flags
);
dvz.shape_unindex(
    shape,  # the shape : DvzShape*
    flags,  # the flags : int
)

dvz_shape_vertex_count()

Return the number of vertices of a shape.

uint32_t dvz_shape_vertex_count(  // returns the number of vertices
    DvzShape* shape,  // the shape
);
dvz.shape_vertex_count(  # returns the number of vertices : uint32_t
    shape,  # the shape : DvzShape*
)

Texture

dvz_texture_1D()

Create a 1D texture.

DvzTexture* dvz_texture_1D(  // returns the texture
    DvzBatch* batch,  // the batch
    DvzFormat format,  // the texture format
    DvzFilter filter,  // the filter
    DvzSamplerAddressMode address_mode,  // the address mode
    uint32_t width,  // the texture width
    void* data,  // the texture data to upload
    int flags,  // the texture creation flags
);
dvz.texture_1D(  # returns the texture : DvzTexture*
    batch,  # the batch : DvzBatch*
    format,  # the texture format : DvzFormat
    filter,  # the filter : DvzFilter
    address_mode,  # the address mode : DvzSamplerAddressMode
    width,  # the texture width : int
    data,  # the texture data to upload : np.ndarray
    flags,  # the texture creation flags : int
)

dvz_texture_2D()

Create a 2D texture to be used in an image visual.

DvzTexture* dvz_texture_2D(  // returns the texture
    DvzBatch* batch,  // the batch
    DvzFormat format,  // the texture format
    DvzFilter filter,  // the filter
    DvzSamplerAddressMode address_mode,  // the address mode
    uint32_t width,  // the texture width
    uint32_t height,  // the texture height
    void* data,  // the texture data to upload
    int flags,  // the texture creation flags
);
dvz.texture_2D(  # returns the texture : DvzTexture*
    batch,  # the batch : DvzBatch*
    format,  # the texture format : DvzFormat
    filter,  # the filter : DvzFilter
    address_mode,  # the address mode : DvzSamplerAddressMode
    width,  # the texture width : int
    height,  # the texture height : int
    data,  # the texture data to upload : np.ndarray
    flags,  # the texture creation flags : int
)

dvz_texture_3D()

Create a 3D texture to be used in a volume visual.

DvzTexture* dvz_texture_3D(  // returns the texture
    DvzBatch* batch,  // the batch
    DvzFormat format,  // the texture format
    DvzFilter filter,  // the filter
    DvzSamplerAddressMode address_mode,  // the address mode
    uint32_t width,  // the texture width
    uint32_t height,  // the texture height
    uint32_t depth,  // the texture depth
    void* data,  // the texture data to upload
    int flags,  // the texture creation flags
);
dvz.texture_3D(  # returns the texture : DvzTexture*
    batch,  # the batch : DvzBatch*
    format,  # the texture format : DvzFormat
    filter,  # the filter : DvzFilter
    address_mode,  # the address mode : DvzSamplerAddressMode
    width,  # the texture width : int
    height,  # the texture height : int
    depth,  # the texture depth : int
    data,  # the texture data to upload : np.ndarray
    flags,  # the texture creation flags : int
)

dvz_texture_address_mode()

Set the texture's associated sampler's address mode.

void dvz_texture_address_mode(
    DvzTexture* texture,  // the texture
    DvzSamplerAddressMode address_mode,  // the address mode
);
dvz.texture_address_mode(
    texture,  # the texture : DvzTexture*
    address_mode,  # the address mode : DvzSamplerAddressMode
)

dvz_texture_create()

Create the texture once set.

void dvz_texture_create(
    DvzTexture* texture,  // the texture
);
dvz.texture_create(
    texture,  # the texture : DvzTexture*
)

dvz_texture_data()

Upload all or part of the the texture data.

void dvz_texture_data(
    DvzTexture* texture,  // the texture
    uint32_t xoffset,  // the x offset inside the texture
    uint32_t yoffset,  // the y offset inside the texture
    uint32_t zoffset,  // the z offset inside the texture
    uint32_t width,  // the width of the uploaded image
    uint32_t height,  // the height of the uploaded image
    uint32_t depth,  // the depth of the uploaded image
    DvzSize size,  // the size of the data buffer
    void* data,  // the data buffer
);
dvz.texture_data(
    texture,  # the texture : DvzTexture*
    xoffset,  # the x offset inside the texture : int
    yoffset,  # the y offset inside the texture : int
    zoffset,  # the z offset inside the texture : int
    width,  # the width of the uploaded image : int
    height,  # the height of the uploaded image : int
    depth,  # the depth of the uploaded image : int
    size,  # the size of the data buffer : DvzSize
    data,  # the data buffer : np.ndarray
)

dvz_texture_destroy()

Destroy a texture.

void dvz_texture_destroy(
    DvzTexture* texture,  // the texture
);
dvz.texture_destroy(
    texture,  # the texture : DvzTexture*
)

dvz_texture_filter()

Set the texture's associated sampler's filter (nearest or linear).

void dvz_texture_filter(
    DvzTexture* texture,  // the texture
    DvzFilter filter,  // the filter
);
dvz.texture_filter(
    texture,  # the texture : DvzTexture*
    filter,  # the filter : DvzFilter
)

dvz_texture_format()

Set the texture format.

void dvz_texture_format(
    DvzTexture* texture,  // the texture
    DvzFormat format,  // the format
);
dvz.texture_format(
    texture,  # the texture : DvzTexture*
    format,  # the format : DvzFormat
)

dvz_texture_shape()

Set the texture shape.

void dvz_texture_shape(
    DvzTexture* texture,  // the texture
    uint32_t width,  // the width
    uint32_t height,  // the height
    uint32_t depth,  // the depth
);
dvz.texture_shape(
    texture,  # the texture : DvzTexture*
    width,  # the width : int
    height,  # the height : int
    depth,  # the depth : int
)

Threads

dvz_threads_default()

Set the number of threads to use in OpenMP-aware functions based on DVZ_NUM_THREADS, or take half of dvz_num_procs().

void dvz_threads_default(
);
dvz.threads_default(
)

dvz_threads_get()

Get the number of threads to use in OpenMP-aware functions.

int dvz_threads_get(  // returns the current number of threads specified to OpenMP
);
dvz.threads_get(  # returns the current number of threads specified to OpenMP : int
)

dvz_threads_set()

Set the number of threads to use in OpenMP-aware functions.

void dvz_threads_set(
    int num_threads,  // the requested number of threads
);
dvz.threads_set(
    num_threads,  # the requested number of threads : int
)

Time

dvz_time_print()

Display a time.

void dvz_time_print(
    DvzTime* time,  // a time structure
);
dvz.time_print(
    time,  # a time structure : DvzTime*
)

Visual

dvz_visual_alloc()

Allocate a visual.

void dvz_visual_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the number of items
    uint32_t vertex_count,  // the number of vertices
    uint32_t index_count,  // the number of indices
);
dvz.visual_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the number of items : int
    vertex_count,  # the number of vertices : int
    index_count,  # the number of indices : int
)

dvz_visual_attr()

Declare a visual attribute.

void dvz_visual_attr(
    DvzVisual* visual,  // the visual
    uint32_t attr_idx,  // the attribute index
    DvzSize offset,  // the attribute offset within the vertex buffer, in bytes
    DvzSize item_size,  // the attribute size, in bytes
    DvzFormat format,  // the attribute data format
    int flags,  // the attribute flags
);
dvz.visual_attr(
    visual,  # the visual : DvzVisual*
    attr_idx,  # the attribute index : int
    offset,  # the attribute offset within the vertex buffer, in bytes : DvzSize
    item_size,  # the attribute size, in bytes : DvzSize
    format,  # the attribute data format : DvzFormat
    flags,  # the attribute flags : int
)

dvz_visual_blend()

Set the blend type of a visual.

void dvz_visual_blend(
    DvzVisual* visual,  // the visual
    DvzBlendType blend_type,  // the blend type
);
dvz.visual_blend(
    visual,  # the visual : DvzVisual*
    blend_type,  # the blend type : DvzBlendType
)

dvz_visual_clip()

Set the visual clipping.

void dvz_visual_clip(
    DvzVisual* visual,  // the visual
    DvzViewportClip clip,  // the viewport clipping
);
dvz.visual_clip(
    visual,  # the visual : DvzVisual*
    clip,  # the viewport clipping : DvzViewportClip
)

dvz_visual_cull()

Set the cull mode of a visual.

void dvz_visual_cull(
    DvzVisual* visual,  // the visual
    DvzCullMode cull_mode,  // the cull mode
);
dvz.visual_cull(
    visual,  # the visual : DvzVisual*
    cull_mode,  # the cull mode : DvzCullMode
)

dvz_visual_dat()

Bind a dat to a visual slot.

void dvz_visual_dat(
    DvzVisual* visual,  // the visual
    uint32_t slot_idx,  // the slot index
    DvzId dat,  // the dat ID
);
dvz.visual_dat(
    visual,  # the visual : DvzVisual*
    slot_idx,  # the slot index : int
    dat,  # the dat ID : DvzId
)

dvz_visual_data()

Set visual data.

void dvz_visual_data(
    DvzVisual* visual,  // the visual
    uint32_t attr_idx,  // the attribute index
    uint32_t first,  // the index of the first item to set
    uint32_t count,  // the number of items to set
    void* data,  // a pointer to the data buffer
);
dvz.visual_data(
    visual,  # the visual : DvzVisual*
    attr_idx,  # the attribute index : int
    first,  # the index of the first item to set : int
    count,  # the number of items to set : int
    data,  # a pointer to the data buffer : np.ndarray
)

dvz_visual_depth()

Set the visual depth.

void dvz_visual_depth(
    DvzVisual* visual,  // the visual
    DvzDepthTest depth_test,  // whether to activate the depth test
);
dvz.visual_depth(
    visual,  # the visual : DvzVisual*
    depth_test,  # whether to activate the depth test : DvzDepthTest
)

dvz_visual_dynamic()

Declare a dynamic attribute, meaning that it is stored in a separate dat rather than being interleaved with the other attributes in the same vertex buffer.

void dvz_visual_dynamic(
    DvzVisual* visual,  // the visual
    uint32_t attr_idx,  // the attribute index
    uint32_t binding_idx,  // the binding index (0 = common vertex buffer, use 1 or 2, 3... for each
);
dvz.visual_dynamic(
    visual,  # the visual : DvzVisual*
    attr_idx,  # the attribute index : int
    binding_idx,  # the binding index (0 = common vertex buffer, use 1 or 2, 3... for each : int
)

dvz_visual_fixed()

Fix some axes in a visual.

void dvz_visual_fixed(
    DvzVisual* visual,  // the visual
    bool fixed_x,  // whether the x axis should be fixed
    bool fixed_y,  // whether the y axis should be fixed
    bool fixed_z,  // whether the z axis should be fixed
);
dvz.visual_fixed(
    visual,  # the visual : DvzVisual*
    fixed_x,  # whether the x axis should be fixed : bool
    fixed_y,  # whether the y axis should be fixed : bool
    fixed_z,  # whether the z axis should be fixed : bool
)

dvz_visual_front()

Set the front face mode of a visual.

void dvz_visual_front(
    DvzVisual* visual,  // the visual
    DvzFrontFace front_face,  // the front face mode
);
dvz.visual_front(
    visual,  # the visual : DvzVisual*
    front_face,  # the front face mode : DvzFrontFace
)

dvz_visual_groups()

Set groups in a visual.

void dvz_visual_groups(
    DvzVisual* visual,  // the visual
    uint32_t group_count,  // the number of groups
    uint32_t* group_sizes,  // the size of each group
);
dvz.visual_groups(
    visual,  # the visual : DvzVisual*
    group_count,  # the number of groups : int
    group_sizes,  # the size of each group : np.ndarray[uint32_t]
)

dvz_visual_index()

Set the visual index data.

void dvz_visual_index(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first index to set
    uint32_t count,  // the number of indices
    DvzIndex* data,  // a pointer to a buffer of DvzIndex (uint32_t) values with the indices
);
dvz.visual_index(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first index to set : int
    count,  # the number of indices : int
    data,  # a pointer to a buffer of DvzIndex (uint32_t) values with the indices : DvzIndex*
)

dvz_visual_param()

Set a visual parameter value.

void dvz_visual_param(
    DvzVisual* visual,  // the visual
    uint32_t slot_idx,  // the slot index
    uint32_t attr_idx,  // the index of the parameter attribute within the params structure
    void* item,  // a pointer to the value to use for that parameter
);
dvz.visual_param(
    visual,  # the visual : DvzVisual*
    slot_idx,  # the slot index : int
    attr_idx,  # the index of the parameter attribute within the params structure : int
    item,  # a pointer to the value to use for that parameter : np.ndarray
)

dvz_visual_params()

Declare a set of visual parameters.

DvzParams* dvz_visual_params(
    DvzVisual* visual,  // the visual
    uint32_t slot_idx,  // the slot index of the uniform buffer storing the parameter values
    DvzSize size,  // the size, in bytes, of that uniform buffer
);
dvz.visual_params(
    visual,  # the visual : DvzVisual*
    slot_idx,  # the slot index of the uniform buffer storing the parameter values : int
    size,  # the size, in bytes, of that uniform buffer : DvzSize
)

dvz_visual_polygon()

Set the polygon mode of a visual.

void dvz_visual_polygon(
    DvzVisual* visual,  // the visual
    DvzPolygonMode polygon_mode,  // the polygon mode
);
dvz.visual_polygon(
    visual,  # the visual : DvzVisual*
    polygon_mode,  # the polygon mode : DvzPolygonMode
)

dvz_visual_primitive()

Set the primitive topology of a visual.

void dvz_visual_primitive(
    DvzVisual* visual,  // the visual
    DvzPrimitiveTopology primitive,  // the primitive topology
);
dvz.visual_primitive(
    visual,  # the visual : DvzVisual*
    primitive,  # the primitive topology : DvzPrimitiveTopology
)

dvz_visual_push()

Set a push constant of a visual.

void dvz_visual_push(
    DvzVisual* visual,  // the visual
    DvzShaderStageFlags shader_stages,  // the shader stage flags
    DvzSize offset,  // the offset, in bytes
    DvzSize size,  // the size, in bytes
);
dvz.visual_push(
    visual,  # the visual : DvzVisual*
    shader_stages,  # the shader stage flags : DvzShaderStageFlags
    offset,  # the offset, in bytes : DvzSize
    size,  # the size, in bytes : DvzSize
)

dvz_visual_quads()

Set visual data as quads.

void dvz_visual_quads(
    DvzVisual* visual,  // the visual
    uint32_t attr_idx,  // the attribute index
    uint32_t first,  // the index of the first item to set
    uint32_t count,  // the number of items to set
    vec4* tl_br,  // a pointer to a buffer of vec4 with the 2D coordinates of the top-left and
);
dvz.visual_quads(
    visual,  # the visual : DvzVisual*
    attr_idx,  # the attribute index : int
    first,  # the index of the first item to set : int
    count,  # the number of items to set : int
    tl_br,  # a pointer to a buffer of vec4 with the 2D coordinates of the top-left and : np.ndarray[vec4]
)

dvz_visual_resize()

Resize a visual allocation.

void dvz_visual_resize(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the number of items
    uint32_t vertex_count,  // the number of vertices
    uint32_t index_count,  // the number of indices (0 if there is no index buffer)
);
dvz.visual_resize(
    visual,  # the visual : DvzVisual*
    item_count,  # the number of items : int
    vertex_count,  # the number of vertices : int
    index_count,  # the number of indices (0 if there is no index buffer) : int
)

dvz_visual_shader()

Set the shader SPIR-V name of a visual.

void dvz_visual_shader(
    DvzVisual* visual,  // the visual
    char* name,  // the built-in resource name of the shader (_vert and _frag are appended)
);
dvz.visual_shader(
    visual,  # the visual : DvzVisual*
    name,  # the built-in resource name of the shader (_vert and _frag are appended) : str
)

dvz_visual_show()

Set the visibility of a visual.

void dvz_visual_show(
    DvzVisual* visual,  // the visual
    bool is_visible,  // the visual visibility
);
dvz.visual_show(
    visual,  # the visual : DvzVisual*
    is_visible,  # the visual visibility : bool
)

dvz_visual_slot()

Declare a visual slot.

void dvz_visual_slot(
    DvzVisual* visual,  // the visual
    uint32_t slot_idx,  // the slot index
    DvzSlotType type,  // the slot type
);
dvz.visual_slot(
    visual,  # the visual : DvzVisual*
    slot_idx,  # the slot index : int
    type,  # the slot type : DvzSlotType
)

dvz_visual_specialization()

Set a specialization constant of a visual.

void dvz_visual_specialization(
    DvzVisual* visual,  // the visual
    DvzShaderType shader,  // the shader type
    uint32_t idx,  // the specialization constant index
    DvzSize size,  // the size, in bytes, of the value passed to this function
    void* value,  // a pointer to the value to use for that specialization constant
);
dvz.visual_specialization(
    visual,  # the visual : DvzVisual*
    shader,  # the shader type : DvzShaderType
    idx,  # the specialization constant index : int
    size,  # the size, in bytes, of the value passed to this function : DvzSize
    value,  # a pointer to the value to use for that specialization constant : np.ndarray
)

dvz_visual_spirv()

Set the shader SPIR-V code of a visual.

void dvz_visual_spirv(
    DvzVisual* visual,  // the visual
    DvzShaderType type,  // the shader type
    DvzSize size,  // the size, in bytes, of the SPIR-V buffer
    char* buffer,  // a pointer to the SPIR-V buffer
);
dvz.visual_spirv(
    visual,  # the visual : DvzVisual*
    type,  # the shader type : DvzShaderType
    size,  # the size, in bytes, of the SPIR-V buffer : DvzSize
    buffer,  # a pointer to the SPIR-V buffer : str
)

dvz_visual_stride()

Declare a visual binding.

void dvz_visual_stride(
    DvzVisual* visual,  // the visual
    uint32_t binding_idx,  // the binding index
    DvzSize stride,  // the binding stride, in bytes
);
dvz.visual_stride(
    visual,  # the visual : DvzVisual*
    binding_idx,  # the binding index : int
    stride,  # the binding stride, in bytes : DvzSize
)

dvz_visual_tex()

Bind a tex to a visual slot.

void dvz_visual_tex(
    DvzVisual* visual,  // the visual
    uint32_t slot_idx,  // the slot index
    DvzId tex,  // the tex ID
    DvzId sampler,  // the sampler ID
    uvec3 offset,  // the texture offset
);
dvz.visual_tex(
    visual,  # the visual : DvzVisual*
    slot_idx,  # the slot index : int
    tex,  # the tex ID : DvzId
    sampler,  # the sampler ID : DvzId
    offset,  # the texture offset : Tuple[int, int, int]
)

dvz_visual_transform()

Set a visual transform.

void dvz_visual_transform(
    DvzVisual* visual,  // the visual
    DvzTransform* tr,  // the transform
    uint32_t vertex_attr,  // the vertex attribute on which the transform applies to
);
dvz.visual_transform(
    visual,  # the visual : DvzVisual*
    tr,  # the transform : DvzTransform*
    vertex_attr,  # the vertex attribute on which the transform applies to : int
)

dvz_visual_update()

Update a visual after its data has changed. Note: this function is automatically called in the event loop internally, so you should not need to use it in most cases.

void dvz_visual_update(
    DvzVisual* visual,  // the visual
);
dvz.visual_update(
    visual,  # the visual : DvzVisual*
)

Visual functions

Basic

dvz_basic_alloc()

Allocate memory for a visual.

void dvz_basic_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of items to allocate for this visual
);
dvz.basic_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of items to allocate for this visual : int
)

dvz_basic_color()

Set the vertex colors.

void dvz_basic_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.basic_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_basic_group()

Set the vertex group index.

void dvz_basic_group(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the group index of each vertex
    int flags,  // the data update flags
);
dvz.basic_group(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the group index of each vertex : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_basic_position()

Set the vertex positions.

void dvz_basic_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D positions of the items to update
    int flags,  // the data update flags
);
dvz.basic_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D positions of the items to update : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_basic_shape()

Create a basic visual from a DvzShape instance.

DvzVisual* dvz_basic_shape(  // returns the visual
    DvzBatch* batch,  // the batch
    DvzShape* shape,  // the shape
    int flags,  // the visual creation flags
);
dvz.basic_shape(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    shape,  # the shape : DvzShape*
    flags,  # the visual creation flags : int
)

dvz_basic_size()

Set the point size (for POINT_LIST topology only).

void dvz_basic_size(
    DvzVisual* visual,  // the visual
    float size,  // the point size in pixels
);
dvz.basic_size(
    visual,  # the visual : DvzVisual*
    size,  # the point size in pixels : float
)

Glyph

dvz_glyph_alloc()

Allocate memory for a visual.

void dvz_glyph_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of items to allocate for this visual
);
dvz.glyph_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of items to allocate for this visual : int
)

dvz_glyph_anchor()

Set the glyph anchors. The anchor should be the same for each glyph in a given string. In addition, it is important to set dvz_glyph_group_size() (the size of each string in pixels) for the anchor computation to be correct. The anchor determines the relationship between the glyph 3D position, and the position of the string bounding box. Each string comes with a local coordinate system extending from (-1, -1) (bottom-left corner) to (+1, +1) (top-right corner), and (0, 0) refers to the center of the string. The anchor is the point, in this local coordinate system, that matches the glyph 3D position. For example, to center a string around the glyph 3D position, use (0, 0) as anchor. To align the string to the right of the glyph 3D position, use (-1, -1) for example.

void dvz_glyph_anchor(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec2* values,  // the anchors (x and y) of the items to update
    int flags,  // the data update flags
);
dvz.glyph_anchor(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the anchors (x and y) of the items to update : np.ndarray[vec2]
    flags,  # the data update flags : int
)

dvz_glyph_angle()

Set the glyph angles.

void dvz_glyph_angle(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the angles of the items to update
    int flags,  // the data update flags
);
dvz.glyph_angle(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the angles of the items to update : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_glyph_ascii()

Set the glyph ascii characters.

void dvz_glyph_ascii(
    DvzVisual* visual,  // the visual
    char* string,  // the characters
);
dvz.glyph_ascii(
    visual,  # the visual : DvzVisual*
    string,  # the characters : str
)

dvz_glyph_atlas_font()

Associate an atlas and font with a glyph visual.

void dvz_glyph_atlas_font(
    DvzVisual* visual,  // the visual
    DvzAtlasFont* af,  // the atlas font
);
dvz.glyph_atlas_font(
    visual,  # the visual : DvzVisual*
    af,  # the atlas font : DvzAtlasFont*
)

dvz_glyph_axis()

Set the glyph axes.

void dvz_glyph_axis(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D axis vectors of the items to update
    int flags,  // the data update flags
);
dvz.glyph_axis(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D axis vectors of the items to update : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_glyph_bgcolor()

Set the glyph background color.

void dvz_glyph_bgcolor(
    DvzVisual* visual,  // the visual
    DvzColor bgcolor,  // the background color
);
dvz.glyph_bgcolor(
    visual,  # the visual : DvzVisual*
    bgcolor,  # the background color : Tuple[int, int, int, int]
)

dvz_glyph_color()

Set the glyph colors.

void dvz_glyph_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.glyph_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_glyph_group_size()

Set the glyph group size, in pixels (size of each string).

void dvz_glyph_group_size(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec2* values,  // the glyph group shapes (width and height, in pixels)
    int flags,  // the data update flags
);
dvz.glyph_group_size(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the glyph group shapes (width and height, in pixels) : np.ndarray[vec2]
    flags,  # the data update flags : int
)

dvz_glyph_position()

Set the glyph positions.

void dvz_glyph_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D positions of the items to update
    int flags,  // the data update flags
);
dvz.glyph_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D positions of the items to update : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_glyph_scale()

Set the glyph scaling applied to the size of all individual glyphs. We assume that the scaling is the same within each string (group of glyphs).

void dvz_glyph_scale(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the scaling of the items to update
    int flags,  // the data update flags
);
dvz.glyph_scale(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the scaling of the items to update : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_glyph_shift()

Set the glyph shifts.

void dvz_glyph_shift(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec2* values,  // the shifts (x and y) of the items to update
    int flags,  // the data update flags
);
dvz.glyph_shift(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the shifts (x and y) of the items to update : np.ndarray[vec2]
    flags,  # the data update flags : int
)

dvz_glyph_size()

Set the glyph sizes, in pixels.

void dvz_glyph_size(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec2* values,  // the sizes (width and height) of the items to update
    int flags,  // the data update flags
);
dvz.glyph_size(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the sizes (width and height) of the items to update : np.ndarray[vec2]
    flags,  # the data update flags : int
)

dvz_glyph_strings()

Helper function to easily set multiple strings of the same size and color on a glyph visual.

void dvz_glyph_strings(
    DvzVisual* visual,  // the visual
    uint32_t string_count,  // the number of strings
    char** strings,  // the strings
    vec3* positions,  // the positions of each string
    float* scales,  // the scaling of each string
    DvzColor color,  // the same color for all strings
    vec2 offset,  // the same offset for all strings
    vec2 anchor,  // the same anchor for all strings
);
dvz.glyph_strings(
    visual,  # the visual : DvzVisual*
    string_count,  # the number of strings : int
    strings,  # the strings : List[str]
    positions,  # the positions of each string : np.ndarray[vec3]
    scales,  # the scaling of each string : np.ndarray[float]
    color,  # the same color for all strings : Tuple[int, int, int, int]
    offset,  # the same offset for all strings : Tuple[float, float]
    anchor,  # the same anchor for all strings : Tuple[float, float]
)

dvz_glyph_texcoords()

Set the glyph texture coordinates.

void dvz_glyph_texcoords(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec4* coords,  // the x,y,w,h texture coordinates
    int flags,  // the data update flags
);
dvz.glyph_texcoords(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    coords,  # the x,y,w,h texture coordinates : np.ndarray[vec4]
    flags,  # the data update flags : int
)

dvz_glyph_texture()

Assign a texture to a glyph visual.

void dvz_glyph_texture(
    DvzVisual* visual,  // the visual
    DvzTexture* texture,  // the texture
);
dvz.glyph_texture(
    visual,  # the visual : DvzVisual*
    texture,  # the texture : DvzTexture*
)

dvz_glyph_unicode()

Set the glyph unicode code points.

void dvz_glyph_unicode(
    DvzVisual* visual,  // the visual
    uint32_t count,  // the number of glyphs
    uint32_t* codepoints,  // the unicode codepoints
);
dvz.glyph_unicode(
    visual,  # the visual : DvzVisual*
    count,  # the number of glyphs : int
    codepoints,  # the unicode codepoints : np.ndarray[uint32_t]
)

dvz_glyph_xywh()

Set the xywh parameters of each glyph.

void dvz_glyph_xywh(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec4* values,  // the xywh values of each glyph
    vec2 offset,  // the xy offsets of each glyph
    int flags,  // the data update flags
);
dvz.glyph_xywh(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the xywh values of each glyph : np.ndarray[vec4]
    offset,  # the xy offsets of each glyph : Tuple[float, float]
    flags,  # the data update flags : int
)

Image

dvz_image_alloc()

Allocate memory for a visual.

void dvz_image_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of images to allocate for this visual
);
dvz.image_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of images to allocate for this visual : int
)

dvz_image_anchor()

Set the image anchors. The anchor determines the relationship between the image 3D position, and the position of the image on the screen. Each images comes with a local coordinate system extending from (-1, -1) (bottom-left corner) to (+1, +1) (top-right corner), and (0, 0) refers to the center of the image. The anchor is the point, in this local coordinate system, that matches the image 3D position. For example, to center an image around the image 3D position, use (0, 0) as anchor. To align the image to the right and bottom of the image 3D position, so that this position refers to the top-left corner, use (-1, +1) as anchor.

void dvz_image_anchor(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec2* values,  // the relative anchors of each image, (0,0 = position pertains to top left corner)
    int flags,  // the data update flags
);
dvz.image_anchor(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the relative anchors of each image, (0,0 = position pertains to top left corner) : np.ndarray[vec2]
    flags,  # the data update flags : int
)

dvz_image_colormap()

Specify the colormap when using DVZ_IMAGE_FLAGS_MODE_COLORMAP. Only the following colormaps are available on the GPU at the moment: CMAP_BINARY CMAP_HSV CMAP_CIVIDIS CMAP_INFERNO CMAP_MAGMA CMAP_PLASMA CMAP_VIRIDIS CMAP_AUTUMN CMAP_BONE CMAP_COOL CMAP_COPPER CMAP_HOT CMAP_SPRING CMAP_SUMMER CMAP_WINTER CMAP_JET

void dvz_image_colormap(
    DvzVisual* visual,  // the visual
    DvzColormap cmap,  // the colormap
);
dvz.image_colormap(
    visual,  # the visual : DvzVisual*
    cmap,  # the colormap : DvzColormap
)

dvz_image_edgecolor()

Set the edge color.

void dvz_image_edgecolor(
    DvzVisual* visual,  // the visual
    DvzColor color,  // the edge color
);
dvz.image_edgecolor(
    visual,  # the visual : DvzVisual*
    color,  # the edge color : Tuple[int, int, int, int]
)

dvz_image_facecolor()

Set the image colors (only when using DVZ_IMAGE_FLAGS_FILL).

void dvz_image_facecolor(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the image colors
    int flags,  // the data update flags
);
dvz.image_facecolor(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the image colors : DvzColor*
    flags,  # the data update flags : int
)

dvz_image_linewidth()

Set the edge width.

void dvz_image_linewidth(
    DvzVisual* visual,  // the visual
    float width,  // the edge width
);
dvz.image_linewidth(
    visual,  # the visual : DvzVisual*
    width,  # the edge width : float
)

dvz_image_permutation()

Set the texture coordinates index permutation.

void dvz_image_permutation(
    DvzVisual* visual,  // the visual
    ivec2 ij,  // index permutation
);
dvz.image_permutation(
    visual,  # the visual : DvzVisual*
    ij,  # index permutation : Tuple[int, int]
)

dvz_image_position()

Set the image positions.

void dvz_image_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D positions of the top left corner
    int flags,  // the data update flags
);
dvz.image_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D positions of the top left corner : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_image_radius()

Use a rounded rectangle for images, with a given radius in pixels.

void dvz_image_radius(
    DvzVisual* visual,  // the visual
    float radius,  // the rounded corner radius, in pixel
);
dvz.image_radius(
    visual,  # the visual : DvzVisual*
    radius,  # the rounded corner radius, in pixel : float
)

dvz_image_size()

Set the image sizes.

void dvz_image_size(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec2* values,  // the sizes of each image, in pixels
    int flags,  // the data update flags
);
dvz.image_size(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the sizes of each image, in pixels : np.ndarray[vec2]
    flags,  # the data update flags : int
)

dvz_image_texcoords()

Set the image texture coordinates.

void dvz_image_texcoords(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec4* tl_br,  // the tex coordinates of the top left and bottom right corners (vec4 u0,v0,u1,v1)
    int flags,  // the data update flags
);
dvz.image_texcoords(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    tl_br,  # the tex coordinates of the top left and bottom right corners (vec4 u0,v0,u1,v1) : np.ndarray[vec4]
    flags,  # the data update flags : int
)

dvz_image_texture()

Assign a texture to an image visual.

void dvz_image_texture(
    DvzVisual* visual,  // the visual
    DvzTexture* texture,  // the texture
);
dvz.image_texture(
    visual,  # the visual : DvzVisual*
    texture,  # the texture : DvzTexture*
)

Marker

dvz_marker_alloc()

Allocate memory for a visual.

void dvz_marker_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of items to allocate for this visual
);
dvz.marker_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of items to allocate for this visual : int
)

dvz_marker_angle()

Set the marker angles.

void dvz_marker_angle(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the angles of the items to update
    int flags,  // the data update flags
);
dvz.marker_angle(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the angles of the items to update : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_marker_aspect()

Set the marker aspect.

void dvz_marker_aspect(
    DvzVisual* visual,  // the visual
    DvzMarkerAspect aspect,  // the marker aspect, one of DVZ_MARKER_ASPECT_FILLED, DVZ_MARKER_ASPECT_STROKE
);
dvz.marker_aspect(
    visual,  # the visual : DvzVisual*
    aspect,  # the marker aspect, one of DVZ_MARKER_ASPECT_FILLED, DVZ_MARKER_ASPECT_STROKE, : DvzMarkerAspect
)

dvz_marker_color()

Set the marker colors.

void dvz_marker_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.marker_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_marker_edgecolor()

Set the marker edge color.

void dvz_marker_edgecolor(
    DvzVisual* visual,  // the visual
    DvzColor color,  // the edge color
);
dvz.marker_edgecolor(
    visual,  # the visual : DvzVisual*
    color,  # the edge color : Tuple[int, int, int, int]
)

dvz_marker_linewidth()

Set the marker edge width.

void dvz_marker_linewidth(
    DvzVisual* visual,  // the visual
    float width,  // the edge width
);
dvz.marker_linewidth(
    visual,  # the visual : DvzVisual*
    width,  # the edge width : float
)

dvz_marker_mode()

Set the marker mode.

void dvz_marker_mode(
    DvzVisual* visual,  // the visual
    DvzMarkerMode mode,  // the marker mode, one of DVZ_MARKER_MODE_CODE, DVZ_MARKER_MODE_BITMAP
);
dvz.marker_mode(
    visual,  # the visual : DvzVisual*
    mode,  # the marker mode, one of DVZ_MARKER_MODE_CODE, DVZ_MARKER_MODE_BITMAP, : DvzMarkerMode
)

dvz_marker_position()

Set the marker positions.

void dvz_marker_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D positions of the items to update
    int flags,  // the data update flags
);
dvz.marker_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D positions of the items to update : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_marker_shape()

Set the marker shape.

void dvz_marker_shape(
    DvzVisual* visual,  // the visual
    DvzMarkerShape shape,  // the marker shape
);
dvz.marker_shape(
    visual,  # the visual : DvzVisual*
    shape,  # the marker shape : DvzMarkerShape
)

dvz_marker_size()

Set the marker sizes.

void dvz_marker_size(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.marker_size(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_marker_tex_scale()

Set the texture scale.

void dvz_marker_tex_scale(
    DvzVisual* visual,  // the visual
    float scale,  // the texture scale
);
dvz.marker_tex_scale(
    visual,  # the visual : DvzVisual*
    scale,  # the texture scale : float
)

dvz_marker_texture()

Set the marker texture.

void dvz_marker_texture(
    DvzVisual* visual,  // the visual
    DvzTexture* texture,  // the texture
);
dvz.marker_texture(
    visual,  # the visual : DvzVisual*
    texture,  # the texture : DvzTexture*
)

Mesh

dvz_mesh_alloc()

Allocate memory for a visual.

void dvz_mesh_alloc(
    DvzVisual* visual,  // the visual
    uint32_t vertex_count,  // the number of vertices
    uint32_t index_count,  // the number of indices
);
dvz.mesh_alloc(
    visual,  # the visual : DvzVisual*
    vertex_count,  # the number of vertices : int
    index_count,  # the number of indices : int
)

dvz_mesh_color()

Set the mesh colors.

void dvz_mesh_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the vertex colors
    int flags,  // the data update flags
);
dvz.mesh_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the vertex colors : DvzColor*
    flags,  # the data update flags : int
)

dvz_mesh_contour()

Set the contour information for polygon contours.

void dvz_mesh_contour(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    cvec4* values,  // for vertex A, B, C, the least significant bit is 1 if the opposite edge is a
    int flags,  // the data update flags
);
dvz.mesh_contour(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # for vertex A, B, C, the least significant bit is 1 if the opposite edge is a : np.ndarray[cvec4]
    flags,  # the data update flags : int
)

dvz_mesh_density()

Set the number of isolines

void dvz_mesh_density(
    DvzVisual* visual,  // the mesh
    uint32_t count,  // the number of isolines
);
dvz.mesh_density(
    visual,  # the mesh : DvzVisual*
    count,  # the number of isolines : int
)

dvz_mesh_edgecolor()

Set the marker edge color. Note: the alpha component is currently unused.

void dvz_mesh_edgecolor(
    DvzVisual* visual,  // the mesh
    DvzColor rgba,  // the rgba components
);
dvz.mesh_edgecolor(
    visual,  # the mesh : DvzVisual*
    rgba,  # the rgba components : Tuple[int, int, int, int]
)

dvz_mesh_emit()

Set the mesh surface emission level.

void dvz_mesh_emit(
    DvzVisual* visual,  // the mesh
    float emit,  // the emission level
);
dvz.mesh_emit(
    visual,  # the mesh : DvzVisual*
    emit,  # the emission level : float
)

dvz_mesh_index()

Set the mesh indices.

void dvz_mesh_index(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzIndex* values,  // the face indices (three vertex indices per triangle)
    int flags,  // the data update flags
);
dvz.mesh_index(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the face indices (three vertex indices per triangle) : DvzIndex*
    flags,  # the data update flags : int
)

dvz_mesh_isoline()

Set the isolines values.

void dvz_mesh_isoline(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the scalar field for which to draw isolines
    int flags,  // the data update flags
);
dvz.mesh_isoline(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the scalar field for which to draw isolines : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_mesh_left()

Set the distance between the current vertex to the left edge at corner A, B, or C in triangle ABC.

void dvz_mesh_left(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the distance to the left edge adjacent to each triangle vertex
    int flags,  // the data update flags
);
dvz.mesh_left(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the distance to the left edge adjacent to each triangle vertex : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_mesh_light_color()

Set the light color.

void dvz_mesh_light_color(
    DvzVisual* visual,  // the mesh
    uint32_t idx,  // the light index (0, 1, 2, or 3)
    DvzColor rgba,  // the light color (a>0 indicates light is on.)
);
dvz.mesh_light_color(
    visual,  # the mesh : DvzVisual*
    idx,  # the light index (0, 1, 2, or 3) : int
    rgba,  # the light color (a>0 indicates light is on.) : Tuple[int, int, int, int]
)

dvz_mesh_light_pos()

Set the light direction.

void dvz_mesh_light_pos(
    DvzVisual* visual,  // the mesh
    uint32_t idx,  // the light index (0, 1, 2, or 3)
    vec4 pos,  // the light position (w=0 indicates it is a direction.)
);
dvz.mesh_light_pos(
    visual,  # the mesh : DvzVisual*
    idx,  # the light index (0, 1, 2, or 3) : int
    pos,  # the light position (w=0 indicates it is a direction.) : Tuple[float, float, float, float]
)

dvz_mesh_linewidth()

Set the mesh contour linewidth (wireframe or isoline).

void dvz_mesh_linewidth(
    DvzVisual* visual,  // the mesh
    float linewidth,  // the line width
);
dvz.mesh_linewidth(
    visual,  # the mesh : DvzVisual*
    linewidth,  # the line width : float
)

dvz_mesh_material_params()

Set the mesh material parameters.

void dvz_mesh_material_params(
    DvzVisual* visual,  // the mesh
    uint32_t idx,  // the material index (0, 1, 2, or 3) for (ambient, diffuse, specular, exponent)
    vec3 params,  // the material parameters (vec3 r, g, b)
);
dvz.mesh_material_params(
    visual,  # the mesh : DvzVisual*
    idx,  # the material index (0, 1, 2, or 3) for (ambient, diffuse, specular, exponent) : int
    params,  # the material parameters (vec3 r, g, b) : Tuple[float, float, float]
)

dvz_mesh_normal()

Set the mesh normals.

void dvz_mesh_normal(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the vertex normal vectors
    int flags,  // the data update flags
);
dvz.mesh_normal(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the vertex normal vectors : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_mesh_position()

Set the mesh vertex positions.

void dvz_mesh_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D vertex positions
    int flags,  // the data update flags
);
dvz.mesh_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D vertex positions : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_mesh_reshape()

Update a mesh once a shape has been updated.

void dvz_mesh_reshape(
    DvzVisual* visual,  // the mesh
    DvzShape* shape,  // the shape
);
dvz.mesh_reshape(
    visual,  # the mesh : DvzVisual*
    shape,  # the shape : DvzShape*
)

dvz_mesh_right()

Set the distance between the current vertex to the right edge at corner A, B, or C in triangle ABC.

void dvz_mesh_right(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the distance to the right edge adjacent to each triangle vertex
    int flags,  // the data update flags
);
dvz.mesh_right(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the distance to the right edge adjacent to each triangle vertex : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_mesh_shape()

Create a mesh out of a shape.

DvzVisual* dvz_mesh_shape(  // returns the mesh
    DvzBatch* batch,  // the batch
    DvzShape* shape,  // the shape
    int flags,  // the visual creation flags
);
dvz.mesh_shape(  # returns the mesh : DvzVisual*
    batch,  # the batch : DvzBatch*
    shape,  # the shape : DvzShape*
    flags,  # the visual creation flags : int
)

dvz_mesh_shine()

Set the mesh surface shine level.

void dvz_mesh_shine(
    DvzVisual* visual,  // the mesh
    float shine,  // the surface shininess
);
dvz.mesh_shine(
    visual,  # the mesh : DvzVisual*
    shine,  # the surface shininess : float
)

dvz_mesh_texcoords()

Set the mesh texture coordinates.

void dvz_mesh_texcoords(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec4* values,  // the vertex texture coordinates (vec4 u,v,*,alpha)
    int flags,  // the data update flags
);
dvz.mesh_texcoords(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the vertex texture coordinates (vec4 u,v,*,alpha) : np.ndarray[vec4]
    flags,  # the data update flags : int
)

dvz_mesh_texture()

Assign a 2D texture to a mesh visual.

void dvz_mesh_texture(
    DvzVisual* visual,  // the visual
    DvzTexture* texture,  // the texture
);
dvz.mesh_texture(
    visual,  # the visual : DvzVisual*
    texture,  # the texture : DvzTexture*
)

Misc

dvz_basic()

Create a basic visual using the few GPU visual primitives (point, line, triangles).

DvzVisual* dvz_basic(  // returns the visual
    DvzBatch* batch,  // the batch
    DvzPrimitiveTopology topology,  // the primitive topology
    int flags,  // the visual creation flags
);
dvz.basic(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    topology,  # the primitive topology : DvzPrimitiveTopology
    flags,  # the visual creation flags : int
)

dvz_glyph()

Create a glyph visual.

DvzVisual* dvz_glyph(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.glyph(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_image()

Create an image visual.

DvzVisual* dvz_image(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.image(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_marker()

Create a marker visual.

DvzVisual* dvz_marker(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.marker(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_mesh()

Create a mesh visual.

DvzVisual* dvz_mesh(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.mesh(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_monoglyph()

Create a monoglyph visual.

DvzVisual* dvz_monoglyph(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.monoglyph(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_path()

Create a path visual.

DvzVisual* dvz_path(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.path(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_pixel()

Create a pixel visual.

DvzVisual* dvz_pixel(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.pixel(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_point()

Create a point visual.

DvzVisual* dvz_point(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.point(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_segment()

Create a segment visual.

DvzVisual* dvz_segment(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.segment(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_slice()

Create a slice visual (multiple 2D images with slices of a 3D texture).

DvzVisual* dvz_slice(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.slice(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_sphere()

Create a sphere visual.

DvzVisual* dvz_sphere(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.sphere(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_volume()

Create a volume visual.

DvzVisual* dvz_volume(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.volume(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

dvz_wiggle()

Create a wiggle visual.

DvzVisual* dvz_wiggle(  // returns the visual
    DvzBatch* batch,  // the batch
    int flags,  // the visual creation flags
);
dvz.wiggle(  # returns the visual : DvzVisual*
    batch,  # the batch : DvzBatch*
    flags,  # the visual creation flags : int
)

Monoglyph

dvz_monoglyph_alloc()

Allocate memory for a visual.

void dvz_monoglyph_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of items to allocate for this visual
);
dvz.monoglyph_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of items to allocate for this visual : int
)

dvz_monoglyph_anchor()

Set the glyph anchor (relative to the glyph size).

void dvz_monoglyph_anchor(
    DvzVisual* visual,  // the visual
    vec2 anchor,  // the anchor
);
dvz.monoglyph_anchor(
    visual,  # the visual : DvzVisual*
    anchor,  # the anchor : Tuple[float, float]
)

dvz_monoglyph_color()

Set the glyph colors.

void dvz_monoglyph_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.monoglyph_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_monoglyph_glyph()

Set the text.

void dvz_monoglyph_glyph(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the first item
    char* text,  // the ASCII test (string length without the null terminal byte = number of glyphs)
    int flags,  // the upload flags
);
dvz.monoglyph_glyph(
    visual,  # the visual : DvzVisual*
    first,  # the first item : int
    text,  # the ASCII test (string length without the null terminal byte = number of glyphs) : str
    flags,  # the upload flags : int
)

dvz_monoglyph_offset()

Set the glyph offsets.

void dvz_monoglyph_offset(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    ivec2* values,  // the glyph offsets (ivec2 integers: row,column)
    int flags,  // the data update flags
);
dvz.monoglyph_offset(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the glyph offsets (ivec2 integers: row,column) : np.ndarray[ivec2]
    flags,  # the data update flags : int
)

dvz_monoglyph_position()

Set the glyph positions.

void dvz_monoglyph_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D positions of the items to update
    int flags,  // the data update flags
);
dvz.monoglyph_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D positions of the items to update : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_monoglyph_size()

Set the glyph size (relative to the initial glyph size).

void dvz_monoglyph_size(
    DvzVisual* visual,  // the visual
    float size,  // the glyph size
);
dvz.monoglyph_size(
    visual,  # the visual : DvzVisual*
    size,  # the glyph size : float
)

dvz_monoglyph_textarea()

All-in-one function for multiline text.

void dvz_monoglyph_textarea(
    DvzVisual* visual,  // the visual
    vec3 pos,  // the text position
    DvzColor color,  // the text color
    float size,  // the glyph size
    char* text,  // the text, can contain `\n` new lines
);
dvz.monoglyph_textarea(
    visual,  # the visual : DvzVisual*
    pos,  # the text position : Tuple[float, float, float]
    color,  # the text color : Tuple[int, int, int, int]
    size,  # the glyph size : float
    text,  # the text, can contain `\n` new lines : str
)

Path

dvz_path_alloc()

Allocate memory for a visual.

void dvz_path_alloc(
    DvzVisual* visual,  // the visual
    uint32_t total_point_count,  // the total number of points to allocate for this visual
);
dvz.path_alloc(
    visual,  # the visual : DvzVisual*
    total_point_count,  # the total number of points to allocate for this visual : int
)

dvz_path_cap()

Set the path cap.

void dvz_path_cap(
    DvzVisual* visual,  // the visual
    DvzCapType cap,  // the cap
);
dvz.path_cap(
    visual,  # the visual : DvzVisual*
    cap,  # the cap : DvzCapType
)

dvz_path_color()

Set the path colors.

void dvz_path_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.path_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_path_join()

Set the path join.

void dvz_path_join(
    DvzVisual* visual,  // the visual
    DvzJoinType join,  // the join
);
dvz.path_join(
    visual,  # the visual : DvzVisual*
    join,  # the join : DvzJoinType
)

dvz_path_linewidth()

Set the path line width (may be variable along a path).

void dvz_path_linewidth(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the line width of the vertex, in pixels
    int flags,  // the data update flags
);
dvz.path_linewidth(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the line width of the vertex, in pixels : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_path_position()

Set the path positions. Note: all path point positions must be updated at once for now.

void dvz_path_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t point_count,  // the total number of points across all paths
    vec3* positions,  // the path point positions
    uint32_t path_count,  // the number of different paths
    uint32_t* path_lengths,  // the number of points in each path
    int flags,  // the data update flags
);
dvz.path_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    point_count,  # the total number of points across all paths : int
    positions,  # the path point positions : np.ndarray[vec3]
    path_count,  # the number of different paths : int
    path_lengths,  # the number of points in each path : np.ndarray[uint32_t]
    flags,  # the data update flags : int
)

Pixel

dvz_pixel_alloc()

Allocate memory for a visual.

void dvz_pixel_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of items to allocate for this visual
);
dvz.pixel_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of items to allocate for this visual : int
)

dvz_pixel_color()

Set the pixel colors.

void dvz_pixel_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.pixel_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_pixel_position()

Set the pixel positions.

void dvz_pixel_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D positions of the items to update
    int flags,  // the data update flags
);
dvz.pixel_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D positions of the items to update : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_pixel_size()

Set the pixel size.

void dvz_pixel_size(
    DvzVisual* visual,  // the visual
    float size,  // the point size in pixels
);
dvz.pixel_size(
    visual,  # the visual : DvzVisual*
    size,  # the point size in pixels : float
)

Point

dvz_point_alloc()

Allocate memory for a visual.

void dvz_point_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of items to allocate for this visual
);
dvz.point_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of items to allocate for this visual : int
)

dvz_point_color()

Set the point colors.

void dvz_point_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.point_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_point_position()

Set the point positions.

void dvz_point_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* values,  // the 3D positions of the items to update
    int flags,  // the data update flags
);
dvz.point_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the 3D positions of the items to update : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_point_size()

Set the point sizes.

void dvz_point_size(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the sizes of the items to update
    int flags,  // the data update flags
);
dvz.point_size(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the sizes of the items to update : np.ndarray[float]
    flags,  # the data update flags : int
)

Segment

dvz_segment_alloc()

Allocate memory for a visual.

void dvz_segment_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of items to allocate for this visual
);
dvz.segment_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of items to allocate for this visual : int
)

dvz_segment_cap()

Set the segment cap types.

void dvz_segment_cap(
    DvzVisual* visual,  // the visual
    DvzCapType initial,  // the initial segment cap type
    DvzCapType terminal,  // the terminal segment cap type
);
dvz.segment_cap(
    visual,  # the visual : DvzVisual*
    initial,  # the initial segment cap type : DvzCapType
    terminal,  # the terminal segment cap type : DvzCapType
)

dvz_segment_color()

Set the segment colors.

void dvz_segment_color(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* values,  // the colors of the items to update
    int flags,  // the data update flags
);
dvz.segment_color(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the colors of the items to update : DvzColor*
    flags,  # the data update flags : int
)

dvz_segment_linewidth()

Set the segment line widths.

void dvz_segment_linewidth(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* values,  // the segment line widths
    int flags,  // the data update flags
);
dvz.segment_linewidth(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the segment line widths : np.ndarray[float]
    flags,  # the data update flags : int
)

dvz_segment_position()

Set the segment positions.

void dvz_segment_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* initial,  // the initial 3D positions of the segments
    vec3* terminal,  // the terminal 3D positions of the segments
    int flags,  // the data update flags
);
dvz.segment_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    initial,  # the initial 3D positions of the segments : np.ndarray[vec3]
    terminal,  # the terminal 3D positions of the segments : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_segment_shift()

Set the segment shift.

void dvz_segment_shift(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec4* values,  // the dx0,dy0,dx1,dy1 shift quadriplets of the segments to update
    int flags,  // the data update flags
);
dvz.segment_shift(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    values,  # the dx0,dy0,dx1,dy1 shift quadriplets of the segments to update : np.ndarray[vec4]
    flags,  # the data update flags : int
)

Slice

dvz_slice_alloc()

Allocate memory for a visual.

void dvz_slice_alloc(
    DvzVisual* visual,  // the visual
    uint32_t item_count,  // the total number of slices to allocate for this visual
);
dvz.slice_alloc(
    visual,  # the visual : DvzVisual*
    item_count,  # the total number of slices to allocate for this visual : int
)

dvz_slice_alpha()

Set the slice transparency alpha value.

void dvz_slice_alpha(
    DvzVisual* visual,  // the visual
    float alpha,  // the alpha value
);
dvz.slice_alpha(
    visual,  # the visual : DvzVisual*
    alpha,  # the alpha value : float
)

dvz_slice_position()

Set the slice positions.

void dvz_slice_position(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* p0,  // the 3D positions of the top left corner
    vec3* p1,  // the 3D positions of the top right corner
    vec3* p2,  // the 3D positions of the bottom left corner
    vec3* p3,  // the 3D positions of the bottom right corner
    int flags,  // the data update flags
);
dvz.slice_position(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    p0,  # the 3D positions of the top left corner : np.ndarray[vec3]
    p1,  # the 3D positions of the top right corner : np.ndarray[vec3]
    p2,  # the 3D positions of the bottom left corner : np.ndarray[vec3]
    p3,  # the 3D positions of the bottom right corner : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_slice_texcoords()

Set the slice texture coordinates.

void dvz_slice_texcoords(
    DvzVisual* visual,  // the visual
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* uvw0,  // the 3D texture coordinates of the top left corner
    vec3* uvw1,  // the 3D texture coordinates of the top right corner
    vec3* uvw2,  // the 3D texture coordinates of the bottom left corner
    vec3* uvw3,  // the 3D texture coordinates of the bottom right corner
    int flags,  // the data update flags
);
dvz.slice_texcoords(
    visual,  # the visual : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    uvw0,  # the 3D texture coordinates of the top left corner : np.ndarray[vec3]
    uvw1,  # the 3D texture coordinates of the top right corner : np.ndarray[vec3]
    uvw2,  # the 3D texture coordinates of the bottom left corner : np.ndarray[vec3]
    uvw3,  # the 3D texture coordinates of the bottom right corner : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_slice_texture()

Assign a texture to a slice visual.

void dvz_slice_texture(
    DvzVisual* visual,  // the visual
    DvzTexture* texture,  // the texture
);
dvz.slice_texture(
    visual,  # the visual : DvzVisual*
    texture,  # the texture : DvzTexture*
)

Sphere

dvz_sphere_alloc()

Allocate memory for a visual.

void dvz_sphere_alloc(
    DvzVisual* visual,  // the sphere
    uint32_t item_count,  // the total number of spheres to allocate for this visual
);
dvz.sphere_alloc(
    visual,  # the sphere : DvzVisual*
    item_count,  # the total number of spheres to allocate for this visual : int
)

dvz_sphere_color()

Set the sphere colors.

void dvz_sphere_color(
    DvzVisual* visual,  // the sphere
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    DvzColor* color,  // the sphere colors
    int flags,  // the data update flags
);
dvz.sphere_color(
    visual,  # the sphere : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    color,  # the sphere colors : DvzColor*
    flags,  # the data update flags : int
)

dvz_sphere_emit()

Set the mesh surface emission level.

void dvz_sphere_emit(
    DvzVisual* visual,  // the sphere
    float emit,  // the emission level
);
dvz.sphere_emit(
    visual,  # the sphere : DvzVisual*
    emit,  # the emission level : float
)

dvz_sphere_light_color()

Set the light color.

void dvz_sphere_light_color(
    DvzVisual* visual,  // the sphere
    uint32_t idx,  // the light index (0, 1, 2, or 3)
    DvzColor rgba,  // the light color (a>0 indicates light is on.)
);
dvz.sphere_light_color(
    visual,  # the sphere : DvzVisual*
    idx,  # the light index (0, 1, 2, or 3) : int
    rgba,  # the light color (a>0 indicates light is on.) : Tuple[int, int, int, int]
)

dvz_sphere_light_pos()

Set the sphere light position.

void dvz_sphere_light_pos(
    DvzVisual* visual,  // the sphere
    uint32_t idx,  // the light index (0, 1, 2, or 3)
    vec4 pos,  // the light position (w=0 indicates it is a direction.)
);
dvz.sphere_light_pos(
    visual,  # the sphere : DvzVisual*
    idx,  # the light index (0, 1, 2, or 3) : int
    pos,  # the light position (w=0 indicates it is a direction.) : Tuple[float, float, float, float]
)

dvz_sphere_material_params()

Set the sphere material parameters.

void dvz_sphere_material_params(
    DvzVisual* visual,  // the sphere
    uint32_t idx,  // the material index (0, 1, 2, or 3) for (ambient, diffuse, specular, exponent)
    vec3 params,  // the material parameters (vec3 r, g, b)
);
dvz.sphere_material_params(
    visual,  # the sphere : DvzVisual*
    idx,  # the material index (0, 1, 2, or 3) for (ambient, diffuse, specular, exponent) : int
    params,  # the material parameters (vec3 r, g, b) : Tuple[float, float, float]
)

dvz_sphere_position()

Set the sphere positions.

void dvz_sphere_position(
    DvzVisual* visual,  // the sphere
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    vec3* pos,  // the 3D positions of the sphere centers
    int flags,  // the data update flags
);
dvz.sphere_position(
    visual,  # the sphere : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    pos,  # the 3D positions of the sphere centers : np.ndarray[vec3]
    flags,  # the data update flags : int
)

dvz_sphere_shine()

Set the sphere surface shininess.

void dvz_sphere_shine(
    DvzVisual* visual,  // the sphere
    float shine,  // the surface shininess
);
dvz.sphere_shine(
    visual,  # the sphere : DvzVisual*
    shine,  # the surface shininess : float
)

dvz_sphere_size()

Set the sphere sizes.

void dvz_sphere_size(
    DvzVisual* visual,  // the sphere
    uint32_t first,  // the index of the first item to update
    uint32_t count,  // the number of items to update
    float* size,  // the radius of the spheres
    int flags,  // the data update flags
);
dvz.sphere_size(
    visual,  # the sphere : DvzVisual*
    first,  # the index of the first item to update : int
    count,  # the number of items to update : int
    size,  # the radius of the spheres : np.ndarray[float]
    flags,  # the data update flags : int
)

Tex

dvz_tex_slice()

Create a 3D texture to be used in a slice visual.

DvzId dvz_tex_slice(  // returns the texture ID
    DvzBatch* batch,  // the batch
    DvzFormat format,  // the texture format
    uint32_t width,  // the texture width
    uint32_t height,  // the texture height
    uint32_t depth,  // the texture depth
    void* data,  // the texture data to upload
);
dvz.tex_slice(  # returns the texture ID : DvzId
    batch,  # the batch : DvzBatch*
    format,  # the texture format : DvzFormat
    width,  # the texture width : int
    height,  # the texture height : int
    depth,  # the texture depth : int
    data,  # the texture data to upload : np.ndarray
)

Volume

dvz_volume_bounds()

Set the volume bounds.

void dvz_volume_bounds(
    DvzVisual* visual,  // the visual
    vec2 xlim,  // xmin and xmax
    vec2 ylim,  // ymin and ymax
    vec2 zlim,  // zmin and zmax
);
dvz.volume_bounds(
    visual,  # the visual : DvzVisual*
    xlim,  # xmin and xmax : Tuple[float, float]
    ylim,  # ymin and ymax : Tuple[float, float]
    zlim,  # zmin and zmax : Tuple[float, float]
)

dvz_volume_permutation()

Set the texture coordinates index permutation.

void dvz_volume_permutation(
    DvzVisual* visual,  // the visual
    ivec3 ijk,  // index permutation
);
dvz.volume_permutation(
    visual,  # the visual : DvzVisual*
    ijk,  # index permutation : Tuple[int, int, int]
)

dvz_volume_slice()

Set the bounding box face index on which to slice (showing the texture itself).

void dvz_volume_slice(
    DvzVisual* visual,  // the visual
    int32_t face_index,  // -1 to disable, or the face index between 0 and 5 included
);
dvz.volume_slice(
    visual,  # the visual : DvzVisual*
    face_index,  # -1 to disable, or the face index between 0 and 5 included : int
)

dvz_volume_texcoords()

Set the texture coordinates of two corner points.

void dvz_volume_texcoords(
    DvzVisual* visual,  // the visual
    vec3 uvw0,  // coordinates of one of the corner points
    vec3 uvw1,  // coordinates of one of the corner points
);
dvz.volume_texcoords(
    visual,  # the visual : DvzVisual*
    uvw0,  # coordinates of one of the corner points : Tuple[float, float, float]
    uvw1,  # coordinates of one of the corner points : Tuple[float, float, float]
)

dvz_volume_texture()

Assign a 3D texture to a volume visual.

void dvz_volume_texture(
    DvzVisual* visual,  // the visual
    DvzTexture* texture,  // the 3D texture
);
dvz.volume_texture(
    visual,  # the visual : DvzVisual*
    texture,  # the 3D texture : DvzTexture*
)

dvz_volume_transfer()

Set the volume size.

void dvz_volume_transfer(
    DvzVisual* visual,  // the visual
    vec4 transfer,  // transfer function, for now `vec4(x, 0, 0, 0)` where x is a scaling factor
);
dvz.volume_transfer(
    visual,  # the visual : DvzVisual*
    transfer,  # transfer function, for now `vec4(x, 0, 0, 0)` where x is a scaling factor : Tuple[float, float, float, float]
)

Wiggle

dvz_wiggle_bounds()

Set the wiggle bounds.

void dvz_wiggle_bounds(
    DvzVisual* visual,  // the visual
    vec2 xlim,  // xmin and xmax
    vec2 ylim,  // ymin and ymax
);
dvz.wiggle_bounds(
    visual,  # the visual : DvzVisual*
    xlim,  # xmin and xmax : Tuple[float, float]
    ylim,  # ymin and ymax : Tuple[float, float]
)

dvz_wiggle_color()

Set the color of the negative and positive sections.

void dvz_wiggle_color(
    DvzVisual* visual,  // the visual
    DvzColor negative_color,  // the color of the negative section
    DvzColor positive_color,  // the color of the positive section
);
dvz.wiggle_color(
    visual,  # the visual : DvzVisual*
    negative_color,  # the color of the negative section : Tuple[int, int, int, int]
    positive_color,  # the color of the positive section : Tuple[int, int, int, int]
)

dvz_wiggle_edgecolor()

Set the edge color.

void dvz_wiggle_edgecolor(
    DvzVisual* visual,  // the visual
    DvzColor color,  // the edge color
);
dvz.wiggle_edgecolor(
    visual,  # the visual : DvzVisual*
    color,  # the edge color : Tuple[int, int, int, int]
)

dvz_wiggle_scale()

Set the texture scaling factor.

void dvz_wiggle_scale(
    DvzVisual* visual,  // the visual
    float scale,  // the scaling factor
);
dvz.wiggle_scale(
    visual,  # the visual : DvzVisual*
    scale,  # the scaling factor : float
)

dvz_wiggle_texture()

Assign a texture to an wiggle visual.

void dvz_wiggle_texture(
    DvzVisual* visual,  // the visual
    DvzTexture* texture,  // the texture
);
dvz.wiggle_texture(
    visual,  # the visual : DvzVisual*
    texture,  # the texture : DvzTexture*
)

dvz_wiggle_xrange()

Set the range of the wiggle on the x axis, in normalized coordinates ([0, 1]).

void dvz_wiggle_xrange(
    DvzVisual* visual,  // the visual
    vec2 xrange,  // the x0 and xl in the quad, the channels will be in the interval [x0, xl]
);
dvz.wiggle_xrange(
    visual,  # the visual : DvzVisual*
    xrange,  # the x0 and xl in the quad, the channels will be in the interval [x0, xl] : Tuple[float, float]
)

GUI functions

Gui

dvz_gui_alpha()

Set the alpha transparency of the next GUI dialog.

void dvz_gui_alpha(
    float alpha,  // the alpha transparency value
);
dvz.gui_alpha(
    alpha,  # the alpha transparency value : float
)

dvz_gui_begin()

Start a new dialog.

void dvz_gui_begin(
    char* title,  // the dialog title
    int flags,  // the flags
);
dvz.gui_begin(
    title,  # the dialog title : str
    flags,  # the flags : int
)

dvz_gui_button()

Add a button.

bool dvz_gui_button(  // returns whether the button was pressed
    char* name,  // the button name
    float width,  // the button width
    float height,  // the button height
);
dvz.gui_button(  # returns whether the button was pressed : bool
    name,  # the button name : str
    width,  # the button width : float
    height,  # the button height : float
)

dvz_gui_checkbox()

Add a checkbox.

bool dvz_gui_checkbox(  // returns whether the checkbox's state has changed
    char* name,  // the button name
    bool* checked,  // whether the checkbox is checked
);
dvz.gui_checkbox(  # returns whether the checkbox's state has changed : bool
    name,  # the button name : str
    checked,  # whether the checkbox is checked : Out[bool]
)

dvz_gui_clicked()

Close the current tree node.

bool dvz_gui_clicked(
);
dvz.gui_clicked(
)

dvz_gui_collapse_changed()

Return whether a dialog has just been collapsed or uncollapsed.

bool dvz_gui_collapse_changed(  // returns whether the dialog has just been collapsed or uncollapsed.
);
dvz.gui_collapse_changed(  # returns whether the dialog has just been collapsed or uncollapsed. : bool
)

dvz_gui_collapsed()

Return whether a dialog is collapsed.

bool dvz_gui_collapsed(  // returns whether the dialog is collapsed
);
dvz.gui_collapsed(  # returns whether the dialog is collapsed : bool
)

dvz_gui_color()

Set the color of an element.

void dvz_gui_color(
    int type,  // the element type for which to change the color
    DvzColor color,  // the color
);
dvz.gui_color(
    type,  # the element type for which to change the color : int
    color,  # the color : Tuple[int, int, int, int]
)

dvz_gui_colorpicker()

Add a color picker

bool dvz_gui_colorpicker(
    char* name,  // the widget name
    vec3 color,  // the color
    int flags,  // the widget flags
);
dvz.gui_colorpicker(
    name,  # the widget name : str
    color,  # the color : Tuple[float, float, float]
    flags,  # the widget flags : int
)

dvz_gui_corner()

Set the corner position of the next GUI dialog.

void dvz_gui_corner(
    DvzCorner corner,  // which corner
    vec2 pad,  // the pad
);
dvz.gui_corner(
    corner,  # which corner : DvzCorner
    pad,  # the pad : Tuple[float, float]
)

dvz_gui_demo()

Show the demo GUI.

void dvz_gui_demo(
);
dvz.gui_demo(
)

dvz_gui_dragging()

Return whether mouse is dragging.

bool dvz_gui_dragging(  // returns whether the mouse is dragging
);
dvz.gui_dragging(  # returns whether the mouse is dragging : bool
)

dvz_gui_dropdown()

Add a dropdown menu.

bool dvz_gui_dropdown(
    char* name,  // the menu name
    uint32_t count,  // the number of menu items
    char** items,  // the item labels
    uint32_t* selected,  // a pointer to the selected index
    int flags,  // the dropdown menu flags
);
dvz.gui_dropdown(
    name,  # the menu name : str
    count,  # the number of menu items : int
    items,  # the item labels : List[str]
    selected,  # a pointer to the selected index : Out[int]
    flags,  # the dropdown menu flags : int
)

dvz_gui_end()

Stop the creation of the dialog.

void dvz_gui_end(
);
dvz.gui_end(
)

dvz_gui_fixed()

Set a fixed position for a GUI dialog.

void dvz_gui_fixed(
    vec2 pos,  // the dialog position
    vec2 pivot,  // the pivot
);
dvz.gui_fixed(
    pos,  # the dialog position : Tuple[float, float]
    pivot,  # the pivot : Tuple[float, float]
)

dvz_gui_flags()

Set the flags of the next GUI dialog.

int dvz_gui_flags(
    int flags,  // the flags
);
dvz.gui_flags(
    flags,  # the flags : int
)

dvz_gui_image()

Add an image in a GUI dialog.

void dvz_gui_image(
    DvzTex* tex,  // the texture
    float width,  // the image width
    float height,  // the image height
);
dvz.gui_image(
    tex,  # the texture : DvzTex*
    width,  # the image width : float
    height,  # the image height : float
)

dvz_gui_moved()

Return whether a dialog has just moved.

bool dvz_gui_moved(  // returns whether the dialog has just moved
);
dvz.gui_moved(  # returns whether the dialog has just moved : bool
)

dvz_gui_moving()

Return whether a dialog is being moved.

bool dvz_gui_moving(  // returns whether the dialog is being moved
);
dvz.gui_moving(  # returns whether the dialog is being moved : bool
)

dvz_gui_node()

Start a new tree node.

bool dvz_gui_node(
    char* name,  // the widget name
);
dvz.gui_node(
    name,  # the widget name : str
)

dvz_gui_pop()

Close the current tree node.

void dvz_gui_pop(
);
dvz.gui_pop(
)

dvz_gui_pos()

Set the position of the next GUI dialog.

void dvz_gui_pos(
    vec2 pos,  // the dialog position
    vec2 pivot,  // the pivot
);
dvz.gui_pos(
    pos,  # the dialog position : Tuple[float, float]
    pivot,  # the pivot : Tuple[float, float]
)

dvz_gui_progress()

Add a progress widget.

void dvz_gui_progress(
    float fraction,  // the fraction between 0 and 1
    float width,  // the widget width
    float height,  // the widget height
    char* fmt,  // the format string
);
dvz.gui_progress(
    fraction,  # the fraction between 0 and 1 : float
    width,  # the widget width : float
    height,  # the widget height : float
    fmt,  # the format string : str
)

dvz_gui_resized()

Return whether a dialog has just been resized.

bool dvz_gui_resized(  // returns whether the dialog has just been resized
);
dvz.gui_resized(  # returns whether the dialog has just been resized : bool
)

dvz_gui_resizing()

Return whether a dialog is being resized

bool dvz_gui_resizing(  // returns whether the dialog is being resized
);
dvz.gui_resizing(  # returns whether the dialog is being resized : bool
)

dvz_gui_selectable()

Close the current tree node.

bool dvz_gui_selectable(
    char* name,  // the widget name
);
dvz.gui_selectable(
    name,  # the widget name : str
)

dvz_gui_size()

Set the size of the next GUI dialog.

void dvz_gui_size(
    vec2 size,  // the size
);
dvz.gui_size(
    size,  # the size : Tuple[float, float]
)

dvz_gui_slider()

Add a slider.

bool dvz_gui_slider(  // returns whether the value has changed
    char* name,  // the slider name
    float vmin,  // the minimum value
    float vmax,  // the maximum value
    float* value,  // the pointer to the value
);
dvz.gui_slider(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
    value,  # the pointer to the value : Out[float]
)

dvz_gui_slider_int()

Add an integer slider.

bool dvz_gui_slider_int(  // returns whether the value has changed
    char* name,  // the slider name
    int vmin,  // the minimum value
    int vmax,  // the maximum value
    int* value,  // the pointer to the value
);
dvz.gui_slider_int(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : int
    vmax,  # the maximum value : int
    value,  # the pointer to the value : Out[int]
)

dvz_gui_slider_ivec2()

Add an integer slider with 2 values.

bool dvz_gui_slider_ivec2(  // returns whether the value has changed
    char* name,  // the slider name
    int vmin,  // the minimum value
    int vmax,  // the maximum value
    ivec2 value,  // the pointer to the value
);
dvz.gui_slider_ivec2(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : int
    vmax,  # the maximum value : int
    value,  # the pointer to the value : Out[Tuple[int, int]]
)

dvz_gui_slider_ivec3()

Add an integer slider with 3 values.

bool dvz_gui_slider_ivec3(  // returns whether the value has changed
    char* name,  // the slider name
    int vmin,  // the minimum value
    int vmax,  // the maximum value
    ivec3 value,  // the pointer to the value
);
dvz.gui_slider_ivec3(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : int
    vmax,  # the maximum value : int
    value,  # the pointer to the value : Out[Tuple[int, int, int]]
)

dvz_gui_slider_ivec4()

Add an integer slider with 4 values.

bool dvz_gui_slider_ivec4(  // returns whether the value has changed
    char* name,  // the slider name
    int vmin,  // the minimum value
    int vmax,  // the maximum value
    ivec4 value,  // the pointer to the value
);
dvz.gui_slider_ivec4(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : int
    vmax,  # the maximum value : int
    value,  # the pointer to the value : Out[Tuple[int, int, int, int]]
)

dvz_gui_slider_vec2()

Add a slider with 2 values.

bool dvz_gui_slider_vec2(  // returns whether the value has changed
    char* name,  // the slider name
    float vmin,  // the minimum value
    float vmax,  // the maximum value
    vec2 value,  // the pointer to the value
);
dvz.gui_slider_vec2(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
    value,  # the pointer to the value : Out[Tuple[float, float]]
)

dvz_gui_slider_vec3()

Add a slider with 3 values.

bool dvz_gui_slider_vec3(  // returns whether the value has changed
    char* name,  // the slider name
    float vmin,  // the minimum value
    float vmax,  // the maximum value
    vec3 value,  // the pointer to the value
);
dvz.gui_slider_vec3(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
    value,  # the pointer to the value : Out[Tuple[float, float, float]]
)

dvz_gui_slider_vec4()

Add a slider with 4 values.

bool dvz_gui_slider_vec4(  // returns whether the value has changed
    char* name,  // the slider name
    float vmin,  // the minimum value
    float vmax,  // the maximum value
    vec4 value,  // the pointer to the value
);
dvz.gui_slider_vec4(  # returns whether the value has changed : bool
    name,  # the slider name : str
    vmin,  # the minimum value : float
    vmax,  # the maximum value : float
    value,  # the pointer to the value : Out[Tuple[float, float, float, float]]
)

dvz_gui_style()

Set the style of an element.

void dvz_gui_style(
    int type,  // the element type for which to change the style
    float value,  // the value
);
dvz.gui_style(
    type,  # the element type for which to change the style : int
    value,  # the value : float
)

dvz_gui_table()

Display a table with selectable rows.

bool dvz_gui_table(  // returns whether the row selection has changed (in the selected array)
    char* name,  // the widget name
    uint32_t row_count,  // the number of rows
    uint32_t column_count,  // the number of columns
    char** labels,  // all cell labels
    bool* selected,  // a pointer to an array of boolean indicated which rows are selected
    int flags,  // the Dear ImGui flags
);
dvz.gui_table(  # returns whether the row selection has changed (in the selected array) : bool
    name,  # the widget name : str
    row_count,  # the number of rows : int
    column_count,  # the number of columns : int
    labels,  # all cell labels : List[str]
    selected,  # a pointer to an array of boolean indicated which rows are selected : np.ndarray[bool]
    flags,  # the Dear ImGui flags : int
)

dvz_gui_text()

Add a text item in a dialog.

void dvz_gui_text(
    char* fmt,  // the format string
);
dvz.gui_text(
    fmt,  # the format string : str
)

dvz_gui_textbox()

Add a text box in a dialog.

bool dvz_gui_textbox(  // returns whether the text has changed
    char* label,  // the label
    uint32_t str_len,  // the size of the str buffer
    char* str,  // the modified string
    int flags,  // the flags
);
dvz.gui_textbox(  # returns whether the text has changed : bool
    label,  # the label : str
    str_len,  # the size of the str buffer : int
    str,  # the modified string : str
    flags,  # the flags : int
)

dvz_gui_tree()

Display a collapsible tree. Assumes the data is in the right order, with level encoding the depth of each row within the tree. Filtering can be implemented with the "visible" parameter. Note that this function automatically propagates the visibility of each node to all its descendents and ascendents, without modifying in-place the "visible" array.

bool dvz_gui_tree(  // returns whether the selection has changed
    uint32_t count,  // the number of rows
    char** ids,  // short id of each row
    char** labels,  // full label of each row
    uint32_t* levels,  // a positive integer indicate
    DvzColor* colors,  // the color of each square in each row
    bool* folded,  // whether each row is currently folded (modified by this function)
    bool* selected,  // whether each row is currently selected (modified by this function)
    bool* visible,  // whether each row is visible (used for filtering)
);
dvz.gui_tree(  # returns whether the selection has changed : bool
    count,  # the number of rows : int
    ids,  # short id of each row : List[str]
    labels,  # full label of each row : List[str]
    levels,  # a positive integer indicate : np.ndarray[uint32_t]
    colors,  # the color of each square in each row : DvzColor*
    folded,  # whether each row is currently folded (modified by this function) : np.ndarray[bool]
    selected,  # whether each row is currently selected (modified by this function) : np.ndarray[bool]
    visible,  # whether each row is visible (used for filtering) : np.ndarray[bool]
)

dvz_gui_viewport()

Get the position and size of the current dialog.

void dvz_gui_viewport(
    vec4 viewport,  // the x, y, w, h values
);
dvz.gui_viewport(
    viewport,  # the x, y, w, h values : Tuple[float, float, float, float]
)

dvz_gui_window_capture()

Capture a GUI window.

void dvz_gui_window_capture(
    DvzGuiWindow* gui_window,  // the GUI window
    bool is_captured,  // whether the windows should be captured
);
dvz.gui_window_capture(
    gui_window,  # the GUI window : DvzGuiWindow*
    is_captured,  # whether the windows should be captured : bool
)

Datoviz Rendering Protocol functions

Batch

dvz_batch_add()

Add a request to a batch.

void dvz_batch_add(
    DvzBatch* batch,  // the batch
    DvzRequest req,  // the request
);
dvz.batch_add(
    batch,  # the batch : DvzBatch*
    req,  # the request : DvzRequest
)

dvz_batch_clear()

Remove all requests in a batch.

void dvz_batch_clear(
    DvzBatch* batch,  // the batch
);
dvz.batch_clear(
    batch,  # the batch : DvzBatch*
)

dvz_batch_copy()

Create a copy of a batch.

DvzBatch* dvz_batch_copy(
    DvzBatch* batch,  // the batch
);
dvz.batch_copy(
    batch,  # the batch : DvzBatch*
)

dvz_batch_desc()

Set the description of the last added request.

void dvz_batch_desc(
    DvzBatch* batch,  // the batch
    char* desc,  // the description
);
dvz.batch_desc(
    batch,  # the batch : DvzBatch*
    desc,  # the description : str
)

dvz_batch_destroy()

Destroy a batch.

void dvz_batch_destroy(
    DvzBatch* batch,  // the batch
);
dvz.batch_destroy(
    batch,  # the batch : DvzBatch*
)

dvz_batch_dump()

Dump all batch requests in raw binary file.

int dvz_batch_dump(
    DvzBatch* batch,  // the batch
    char* filename,  // the dump filename
);
dvz.batch_dump(
    batch,  # the batch : DvzBatch*
    filename,  # the dump filename : str
)

dvz_batch_load()

Load a dump of batch requests into an existing batch object.

void dvz_batch_load(
    DvzBatch* batch,  // the batch
    char* filename,  // the dump filename
);
dvz.batch_load(
    batch,  # the batch : DvzBatch*
    filename,  # the dump filename : str
)

dvz_batch_print()

Display information about all requests in the batch.

void dvz_batch_print(
    DvzBatch* batch,  // the batch
    int flags,  // the flags
);
dvz.batch_print(
    batch,  # the batch : DvzBatch*
    flags,  # the flags : int
)

dvz_batch_requests()

Return a pointer to the array of all requests in the batch.

DvzRequest* dvz_batch_requests(
    DvzBatch* batch,  // the batch
);
dvz.batch_requests(
    batch,  # the batch : DvzBatch*
)

dvz_batch_size()

Return the number of requests in the batch.

uint32_t dvz_batch_size(
    DvzBatch* batch,  // the batch
);
dvz.batch_size(
    batch,  # the batch : DvzBatch*
)

dvz_batch_yaml()

Export requests in a YAML file.

void dvz_batch_yaml(
    DvzBatch* batch,  // the batch
    char* filename,  // the YAML filename
);
dvz.batch_yaml(
    batch,  # the batch : DvzBatch*
    filename,  # the YAML filename : str
)

Bind

dvz_bind_dat()

Create a request for associating a dat to a pipe's slot.

DvzRequest dvz_bind_dat(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId pipe,  // the id of the pipe
    uint32_t slot_idx,  // the index of the descriptor slot
    DvzId dat,  // the id of the dat to bind to the pipe
    DvzSize offset,  // the offset
);
dvz.bind_dat(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    pipe,  # the id of the pipe : DvzId
    slot_idx,  # the index of the descriptor slot : int
    dat,  # the id of the dat to bind to the pipe : DvzId
    offset,  # the offset : DvzSize
)

dvz_bind_index()

Create a request for associating an index dat to a graphics pipe.

DvzRequest dvz_bind_index(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the id of the graphics pipe
    DvzId dat,  // the id of the dat with the index data
    DvzSize offset,  // the offset within the dat
);
dvz.bind_index(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the id of the graphics pipe : DvzId
    dat,  # the id of the dat with the index data : DvzId
    offset,  # the offset within the dat : DvzSize
)

dvz_bind_tex()

Create a request for associating a tex to a pipe's slot.

DvzRequest dvz_bind_tex(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId pipe,  // the id of the pipe
    uint32_t slot_idx,  // the index of the descriptor slot
    DvzId tex,  // the id of the tex to bind to the pipe
    DvzId sampler,  // the id of the sampler
    uvec3 offset,  // the offset
);
dvz.bind_tex(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    pipe,  # the id of the pipe : DvzId
    slot_idx,  # the index of the descriptor slot : int
    tex,  # the id of the tex to bind to the pipe : DvzId
    sampler,  # the id of the sampler : DvzId
    offset,  # the offset : Tuple[int, int, int]
)

dvz_bind_vertex()

Create a request for associating a vertex dat to a graphics pipe.

DvzRequest dvz_bind_vertex(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the id of the graphics pipe
    uint32_t binding_idx,  // the vertex binding index
    DvzId dat,  // the id of the dat with the vertex data
    DvzSize offset,  // the offset within the dat
);
dvz.bind_vertex(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the id of the graphics pipe : DvzId
    binding_idx,  # the vertex binding index : int
    dat,  # the id of the dat with the vertex data : DvzId
    offset,  # the offset within the dat : DvzSize
)

Create

dvz_create_canvas()

Create a request for canvas creation. A canvas is a live window on which to render. NOTE: background color not implemented yet

DvzRequest dvz_create_canvas(  // returns the request, containing a newly-generated id for the canvas to be created
    DvzBatch* batch,  // the batch
    uint32_t width,  // the canvas width (in screen pixels)
    uint32_t height,  // the canvas height (in screen pixels)
    cvec4 background,  // the background color
    int flags,  // the canvas creation flags
);
dvz.create_canvas(  # returns the request, containing a newly-generated id for the canvas to be created : DvzRequest
    batch,  # the batch : DvzBatch*
    width,  # the canvas width (in screen pixels) : int
    height,  # the canvas height (in screen pixels) : int
    background,  # the background color : cvec4
    flags,  # the canvas creation flags : int
)

dvz_create_dat()

Create a request for a dat creation.

DvzRequest dvz_create_dat(  // returns the request, containing a newly-generated id for the dat to be created
    DvzBatch* batch,  // the batch
    DvzBufferType type,  // the buffer type
    DvzSize size,  // the dat size, in bytes
    int flags,  // the dat creation flags
);
dvz.create_dat(  # returns the request, containing a newly-generated id for the dat to be created : DvzRequest
    batch,  # the batch : DvzBatch*
    type,  # the buffer type : DvzBufferType
    size,  # the dat size, in bytes : DvzSize
    flags,  # the dat creation flags : int
)

dvz_create_glsl()

Create a request for GLSL shader creation.

DvzRequest dvz_create_glsl(  // returns the request
    DvzBatch* batch,  // the batch
    DvzShaderType shader_type,  // the shader type
    char* code,  // an ASCII string with the GLSL code
);
dvz.create_glsl(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    shader_type,  # the shader type : DvzShaderType
    code,  # an ASCII string with the GLSL code : str
)

dvz_create_graphics()

Create a request for a builtin graphics pipe creation.

DvzRequest dvz_create_graphics(  // returns the request, containing a newly-generated id for the graphics pipe to be created
    DvzBatch* batch,  // the batch
    DvzGraphicsType type,  // the graphics type
    int flags,  // the graphics creation flags
);
dvz.create_graphics(  # returns the request, containing a newly-generated id for the graphics pipe to be created : DvzRequest
    batch,  # the batch : DvzBatch*
    type,  # the graphics type : DvzGraphicsType
    flags,  # the graphics creation flags : int
)

dvz_create_sampler()

Create a request for a sampler creation.

DvzRequest dvz_create_sampler(  // returns the request, containing a newly-generated id for the sampler to be created
    DvzBatch* batch,  // the batch
    DvzFilter filter,  // the sampler filter
    DvzSamplerAddressMode mode,  // the sampler address mode
);
dvz.create_sampler(  # returns the request, containing a newly-generated id for the sampler to be created : DvzRequest
    batch,  # the batch : DvzBatch*
    filter,  # the sampler filter : DvzFilter
    mode,  # the sampler address mode : DvzSamplerAddressMode
)

dvz_create_spirv()

Create a request for SPIR-V shader creation.

DvzRequest dvz_create_spirv(  // returns the request
    DvzBatch* batch,  // the batch
    DvzShaderType shader_type,  // the shader type
    DvzSize size,  // the size in bytes of the SPIR-V buffer
    char* buffer,  // pointer to a buffer with the SPIR-V bytecode
);
dvz.create_spirv(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    shader_type,  # the shader type : DvzShaderType
    size,  # the size in bytes of the SPIR-V buffer : DvzSize
    buffer,  # pointer to a buffer with the SPIR-V bytecode : str
)

dvz_create_tex()

Create a request for a tex creation.

DvzRequest dvz_create_tex(  // returns the request, containing a newly-generated id for the tex to be created
    DvzBatch* batch,  // the batch
    DvzTexDims dims,  // the number of dimensions, 1, 2, or 3
    DvzFormat format,  // the image format
    uvec3 shape,  // the texture shape
    int flags,  // the dat creation flags
);
dvz.create_tex(  # returns the request, containing a newly-generated id for the tex to be created : DvzRequest
    batch,  # the batch : DvzBatch*
    dims,  # the number of dimensions, 1, 2, or 3 : DvzTexDims
    format,  # the image format : DvzFormat
    shape,  # the texture shape : Tuple[int, int, int]
    flags,  # the dat creation flags : int
)

Delete

dvz_delete_canvas()

Create a request for a canvas deletion.

DvzRequest dvz_delete_canvas(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId id,  // the canvas id
);
dvz.delete_canvas(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    id,  # the canvas id : DvzId
)

dvz_delete_dat()

Create a request for dat deletion.

DvzRequest dvz_delete_dat(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId id,  // the dat id
);
dvz.delete_dat(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    id,  # the dat id : DvzId
)

dvz_delete_graphics()

Create a request for graphics deletion.

DvzRequest dvz_delete_graphics(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId id,  // the graphics id
);
dvz.delete_graphics(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    id,  # the graphics id : DvzId
)

dvz_delete_sampler()

Create a request for sampler deletion.

DvzRequest dvz_delete_sampler(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId id,  // the sampler id
);
dvz.delete_sampler(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    id,  # the sampler id : DvzId
)

dvz_delete_tex()

Create a request for tex deletion.

DvzRequest dvz_delete_tex(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId id,  // the tex id
);
dvz.delete_tex(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    id,  # the tex id : DvzId
)

Misc

dvz_batch()

Create a batch holding a number of requests.

DvzBatch* dvz_batch(
);
dvz.batch(
)

dvz_mvp()

Create a MVP structure.

void dvz_mvp(
    mat4 model,  // the model matrix
    mat4 view,  // the view matrix
    mat4 proj,  // the projection matrix
    DvzMVP* mvp,  // the MVP structure
);
dvz.mvp(
    model,  # the model matrix : mat4
    view,  # the view matrix : mat4
    proj,  # the projection matrix : mat4
    mvp,  # the MVP structure : Out[DvzMVP]
)

dvz_requester()

Create a requester, used to create requests.

DvzRequester* dvz_requester(  // returns the requester struct
);
dvz.requester(  # returns the requester struct : DvzRequester*
)

Mvp

dvz_mvp_default()

Return a default DvzMVP struct

void dvz_mvp_default(
    DvzMVP* mvp,  // the DvzMVP struct
);
dvz.mvp_default(
    mvp,  # the DvzMVP struct : Out[DvzMVP]
)

Record

dvz_record_begin()

Create a request for starting recording of command buffer.

DvzRequest dvz_record_begin(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
);
dvz.record_begin(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
)

dvz_record_draw()

Create a request for a direct draw of a graphics during command buffer recording.

DvzRequest dvz_record_draw(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
    DvzId graphics,  // the id of the graphics pipe to draw
    uint32_t first_vertex,  // the index of the first vertex to draw
    uint32_t vertex_count,  // the number of vertices to draw
    uint32_t first_instance,  // the index of the first instance to draw
    uint32_t instance_count,  // the number of instances to draw
);
dvz.record_draw(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
    graphics,  # the id of the graphics pipe to draw : DvzId
    first_vertex,  # the index of the first vertex to draw : int
    vertex_count,  # the number of vertices to draw : int
    first_instance,  # the index of the first instance to draw : int
    instance_count,  # the number of instances to draw : int
)

dvz_record_draw_indexed()

Create a request for an indexed draw of a graphics during command buffer recording.

DvzRequest dvz_record_draw_indexed(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
    DvzId graphics,  // the id of the graphics pipe to draw
    uint32_t first_index,  // the index of the first index to draw
    uint32_t vertex_offset,  // the vertex offset within the vertices indexed by the indexes
    uint32_t index_count,  // the number of indexes to draw
    uint32_t first_instance,  // the index of the first instance to draw
    uint32_t instance_count,  // the number of instances to draw
);
dvz.record_draw_indexed(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
    graphics,  # the id of the graphics pipe to draw : DvzId
    first_index,  # the index of the first index to draw : int
    vertex_offset,  # the vertex offset within the vertices indexed by the indexes : int
    index_count,  # the number of indexes to draw : int
    first_instance,  # the index of the first instance to draw : int
    instance_count,  # the number of instances to draw : int
)

dvz_record_draw_indexed_indirect()

Create a request for an indexed indirect draw of a graphics during command buffer recording.

DvzRequest dvz_record_draw_indexed_indirect(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
    DvzId graphics,  // the id of the graphics pipe to draw
    DvzId indirect,  // the id of the dat containing the indirect draw data
    uint32_t draw_count,  // the number of draws to make
);
dvz.record_draw_indexed_indirect(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
    graphics,  # the id of the graphics pipe to draw : DvzId
    indirect,  # the id of the dat containing the indirect draw data : DvzId
    draw_count,  # the number of draws to make : int
)

dvz_record_draw_indirect()

Create a request for an indirect draw of a graphics during command buffer recording.

DvzRequest dvz_record_draw_indirect(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
    DvzId graphics,  // the id of the graphics pipe to draw
    DvzId indirect,  // the id of the dat containing the indirect draw data
    uint32_t draw_count,  // the number of draws to make
);
dvz.record_draw_indirect(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
    graphics,  # the id of the graphics pipe to draw : DvzId
    indirect,  # the id of the dat containing the indirect draw data : DvzId
    draw_count,  # the number of draws to make : int
)

dvz_record_end()

Create a request for ending recording of command buffer.

DvzRequest dvz_record_end(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
);
dvz.record_end(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
)

dvz_record_push()

Create a request for sending a push constant value while recording a command buffer.

DvzRequest dvz_record_push(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
    DvzId graphics_id,  // the id of the graphics pipeline
    DvzShaderStageFlags shader_stages,  // the shader stages
    DvzSize offset,  // the byte offset
    DvzSize size,  // the size of the data to upload
    void* data,  // the push constant data to upload
);
dvz.record_push(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
    graphics_id,  # the id of the graphics pipeline : DvzId
    shader_stages,  # the shader stages : DvzShaderStageFlags
    offset,  # the byte offset : DvzSize
    size,  # the size of the data to upload : DvzSize
    data,  # the push constant data to upload : np.ndarray
)

dvz_record_viewport()

Create a request for setting the viewport during command buffer recording.

DvzRequest dvz_record_viewport(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas_id,  // the id of the canvas
    vec2 offset,  // the viewport offset, in framebuffer pixels
    vec2 shape,  // the viewport size, in framebuffer pixels
);
dvz.record_viewport(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas_id,  # the id of the canvas : DvzId
    offset,  # the viewport offset, in framebuffer pixels : Tuple[float, float]
    shape,  # the viewport size, in framebuffer pixels : Tuple[float, float]
)

Request

dvz_request_print()

Display information about a request.

void dvz_request_print(
    DvzRequest* req,  // the request
    int flags,  // the flags
);
dvz.request_print(
    req,  # the request : DvzRequest*
    flags,  # the flags : int
)

Requester

dvz_requester_commit()

Add a batch's requests to a requester.

void dvz_requester_commit(
    DvzRequester* rqr,  // the requester
    DvzBatch* batch,  // the batch
);
dvz.requester_commit(
    rqr,  # the requester : DvzRequester*
    batch,  # the batch : DvzBatch*
)

dvz_requester_destroy()

Destroy a requester.

void dvz_requester_destroy(
    DvzRequester* rqr,  // the requester
);
dvz.requester_destroy(
    rqr,  # the requester : DvzRequester*
)

dvz_requester_flush()

Return the requests in the requester and clear it. NOTE: the caller must free the output.

DvzBatch* dvz_requester_flush(  // returns an array with all requests in the requester
    DvzRequester* rqr,  // the requester
    uint32_t* count,  // pointer to the number of requests, set by this function
);
dvz.requester_flush(  # returns an array with all requests in the requester : DvzBatch*
    rqr,  # the requester : DvzRequester*
    count,  # pointer to the number of requests, set by this function : Out[int]
)

Resize

dvz_resize_canvas()

Create a request to resize an offscreen canvas (regular canvases are resized by the client).

DvzRequest dvz_resize_canvas(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId canvas,  // the canvas id
    uint32_t width,  // the new canvas width
    uint32_t height,  // the new canvas height
);
dvz.resize_canvas(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    canvas,  # the canvas id : DvzId
    width,  # the new canvas width : int
    height,  # the new canvas height : int
)

dvz_resize_dat()

Create a request to resize a dat.

DvzRequest dvz_resize_dat(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId dat,  // the dat id
    DvzSize size,  // the new dat size, in bytes
);
dvz.resize_dat(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    dat,  # the dat id : DvzId
    size,  # the new dat size, in bytes : DvzSize
)

dvz_resize_tex()

Create a request to resize a tex.

DvzRequest dvz_resize_tex(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId tex,  // the tex id
    uvec3 shape,  // the new tex shape
);
dvz.resize_tex(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    tex,  # the tex id : DvzId
    shape,  # the new tex shape : Tuple[int, int, int]
)

Set

dvz_set_attr()

Create a request for setting a vertex attribute of a graphics pipe.

DvzRequest dvz_set_attr(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    uint32_t binding_idx,  // the index of the vertex binding
    uint32_t location,  // the GLSL attribute location
    DvzFormat format,  // the attribute format
    DvzSize offset,  // the byte offset of the attribute within the vertex binding
);
dvz.set_attr(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    binding_idx,  # the index of the vertex binding : int
    location,  # the GLSL attribute location : int
    format,  # the attribute format : DvzFormat
    offset,  # the byte offset of the attribute within the vertex binding : DvzSize
)

dvz_set_background()

Change the background color of the canvas.

DvzRequest dvz_set_background(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId id,  // the canvas id
    cvec4 background,  // the background color
);
dvz.set_background(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    id,  # the canvas id : DvzId
    background,  # the background color : cvec4
)

dvz_set_blend()

Create a request for setting the blend type of a graphics pipe.

DvzRequest dvz_set_blend(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzBlendType blend_type,  // the graphics blend type
);
dvz.set_blend(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    blend_type,  # the graphics blend type : DvzBlendType
)

dvz_set_cull()

Create a request for setting the cull mode of a graphics pipe.

DvzRequest dvz_set_cull(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzCullMode cull_mode,  // the cull mode
);
dvz.set_cull(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    cull_mode,  # the cull mode : DvzCullMode
)

dvz_set_depth()

Create a request for setting the depth test of a graphics pipe.

DvzRequest dvz_set_depth(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzDepthTest depth_test,  // the graphics depth test
);
dvz.set_depth(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    depth_test,  # the graphics depth test : DvzDepthTest
)

dvz_set_front()

Create a request for setting the front face of a graphics pipe.

DvzRequest dvz_set_front(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzFrontFace front_face,  // the front face
);
dvz.set_front(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    front_face,  # the front face : DvzFrontFace
)

dvz_set_mask()

Create a request for setting the color mask of a graphics pipe.

DvzRequest dvz_set_mask(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    int32_t mask,  // the mask with RGBA boolean masks on the lower bits
);
dvz.set_mask(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    mask,  # the mask with RGBA boolean masks on the lower bits : int
)

dvz_set_polygon()

Create a request for setting the polygon mode of a graphics pipe.

DvzRequest dvz_set_polygon(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzPolygonMode polygon_mode,  // the polygon mode
);
dvz.set_polygon(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    polygon_mode,  # the polygon mode : DvzPolygonMode
)

dvz_set_primitive()

Create a request for setting the primitive topology of a graphics pipe.

DvzRequest dvz_set_primitive(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzPrimitiveTopology primitive,  // the graphics primitive topology
);
dvz.set_primitive(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    primitive,  # the graphics primitive topology : DvzPrimitiveTopology
)

dvz_set_push()

Create a request for setting a push constant layout for a graphics pipe.

DvzRequest dvz_set_push(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzShaderStageFlags shader_stages,  // the shader stages with the push constant
    DvzSize offset,  // the byte offset for the push data visibility from the shader
    DvzSize size,  // how much bytes the shader can see from the push constant
);
dvz.set_push(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    shader_stages,  # the shader stages with the push constant : DvzShaderStageFlags
    offset,  # the byte offset for the push data visibility from the shader : DvzSize
    size,  # how much bytes the shader can see from the push constant : DvzSize
)

dvz_set_shader()

Create a request for setting a shader a graphics pipe.

DvzRequest dvz_set_shader(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzId shader,  // the id of the shader object
);
dvz.set_shader(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    shader,  # the id of the shader object : DvzId
)

dvz_set_slot()

Create a request for setting a binding slot (descriptor) of a graphics pipe.

DvzRequest dvz_set_slot(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    uint32_t slot_idx,  // the index of the GLSL binding slot
    DvzDescriptorType type,  // the descriptor type
);
dvz.set_slot(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    slot_idx,  # the index of the GLSL binding slot : int
    type,  # the descriptor type : DvzDescriptorType
)

dvz_set_specialization()

Create a request for setting a specialization constant of a graphics pipe.

DvzRequest dvz_set_specialization(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    DvzShaderType shader,  // the shader with the specialization constant
    uint32_t idx,  // the specialization constant index as specified in the GLSL code
    DvzSize size,  // the byte size of the value
    void* value,  // a pointer to the specialization constant value
);
dvz.set_specialization(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    shader,  # the shader with the specialization constant : DvzShaderType
    idx,  # the specialization constant index as specified in the GLSL code : int
    size,  # the byte size of the value : DvzSize
    value,  # a pointer to the specialization constant value : np.ndarray
)

dvz_set_vertex()

Create a request for setting a vertex binding of a graphics pipe.

DvzRequest dvz_set_vertex(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId graphics,  // the graphics pipe id
    uint32_t binding_idx,  // the index of the vertex binding
    DvzSize stride,  // the binding stride
    DvzVertexInputRate input_rate,  // the vertex input rate, per-vertex or per-instance
);
dvz.set_vertex(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    graphics,  # the graphics pipe id : DvzId
    binding_idx,  # the index of the vertex binding : int
    stride,  # the binding stride : DvzSize
    input_rate,  # the vertex input rate, per-vertex or per-instance : DvzVertexInputRate
)

Update

dvz_update_canvas()

Create a request for a canvas redraw (command buffer submission).

DvzRequest dvz_update_canvas(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId id,  // the canvas id
);
dvz.update_canvas(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    id,  # the canvas id : DvzId
)

Upload

dvz_upload_dat()

Create a request for dat upload. NOTE: this function makes a COPY of the buffer to ensure it will live until the upload actually occurs. The copy will be freed automatically as soon as it's safe.

DvzRequest dvz_upload_dat(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId dat,  // the id of the dat to upload to
    DvzSize offset,  // the byte offset of the upload transfer
    DvzSize size,  // the number of bytes in data to transfer
    void* data,  // a pointer to the data to upload
    int flags,  // the upload flags
);
dvz.upload_dat(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    dat,  # the id of the dat to upload to : DvzId
    offset,  # the byte offset of the upload transfer : DvzSize
    size,  # the number of bytes in data to transfer : DvzSize
    data,  # a pointer to the data to upload : np.ndarray
    flags,  # the upload flags : int
)

dvz_upload_tex()

Create a request for tex upload. NOTE: this function makes a COPY of the buffer to ensure it will live until the upload actually occurs. The copy will be freed automatically as soon as it's safe.

DvzRequest dvz_upload_tex(  // returns the request
    DvzBatch* batch,  // the batch
    DvzId tex,  // the id of the tex to upload to
    uvec3 offset,  // the offset
    uvec3 shape,  // the shape
    DvzSize size,  // the number of bytes in data to transfer
    void* data,  // a pointer to the data to upload
    int flags,  // the upload flags
);
dvz.upload_tex(  # returns the request : DvzRequest
    batch,  # the batch : DvzBatch*
    tex,  # the id of the tex to upload to : DvzId
    offset,  # the offset : Tuple[int, int, int]
    shape,  # the shape : Tuple[int, int, int]
    size,  # the number of bytes in data to transfer : DvzSize
    data,  # a pointer to the data to upload : np.ndarray
    flags,  # the upload flags : int
)

Viewport

dvz_viewport_default()

Return a default viewport

void dvz_viewport_default(
    uint32_t width,  // the viewport width, in framebuffer pixels
    uint32_t height,  // the viewport height, in framebuffer pixels
    DvzViewport* viewport,  // the viewport
);
dvz.viewport_default(
    width,  # the viewport width, in framebuffer pixels : int
    height,  # the viewport height, in framebuffer pixels : int
    viewport,  # the viewport : Out[DvzViewport]
)

Enumerations

DvzAlign

DVZ_ALIGN_NONE = 0
DVZ_ALIGN_LOW = 1
DVZ_ALIGN_MIDDLE = 2
DVZ_ALIGN_HIGH = 3

DvzAppFlags

DVZ_APP_FLAGS_NONE = 0x000000
DVZ_APP_FLAGS_OFFSCREEN = 0x008000
DVZ_APP_FLAGS_WHITE_BACKGROUND = 0x100000

DvzArcballFlags

DVZ_ARCBALL_FLAGS_NONE = 0
DVZ_ARCBALL_FLAGS_CONSTRAIN = 1

DvzBlendType

DVZ_BLEND_DISABLE = 0
DVZ_BLEND_STANDARD = 1
DVZ_BLEND_DESTINATION = 2
DVZ_BLEND_OIT = 3

DvzBoxExtentStrategy

DVZ_BOX_EXTENT_DEFAULT = 0
DVZ_BOX_EXTENT_FIXED_ASPECT_EXPAND = 1
DVZ_BOX_EXTENT_FIXED_ASPECT_CONTRACT = 2

DvzBoxMergeStrategy

DVZ_BOX_MERGE_DEFAULT = 0
DVZ_BOX_MERGE_CENTER = 1
DVZ_BOX_MERGE_CORNER = 2

DvzBufferType

DVZ_BUFFER_TYPE_UNDEFINED = 0
DVZ_BUFFER_TYPE_STAGING = 1
DVZ_BUFFER_TYPE_VERTEX = 2
DVZ_BUFFER_TYPE_INDEX = 3
DVZ_BUFFER_TYPE_STORAGE = 4
DVZ_BUFFER_TYPE_UNIFORM = 5
DVZ_BUFFER_TYPE_INDIRECT = 6

DvzCameraFlags

DVZ_CAMERA_FLAGS_PERSPECTIVE = 0x00
DVZ_CAMERA_FLAGS_ORTHO = 0x01

DvzCanvasFlags

DVZ_CANVAS_FLAGS_NONE = 0x0000
DVZ_CANVAS_FLAGS_IMGUI = 0x0001
DVZ_CANVAS_FLAGS_FPS = 0x0003
DVZ_CANVAS_FLAGS_MONITOR = 0x0005
DVZ_CANVAS_FLAGS_VSYNC = 0x0010
DVZ_CANVAS_FLAGS_PICK = 0x0020
DVZ_CANVAS_FLAGS_PUSH_SCALE = 0x0040

DvzCapType

DVZ_CAP_NONE = 0
DVZ_CAP_ROUND = 1
DVZ_CAP_TRIANGLE_IN = 2
DVZ_CAP_TRIANGLE_OUT = 3
DVZ_CAP_SQUARE = 4
DVZ_CAP_BUTT = 5
DVZ_CAP_COUNT = 6

DvzColorMask

DVZ_MASK_COLOR_R = 0x00000001
DVZ_MASK_COLOR_G = 0x00000002
DVZ_MASK_COLOR_B = 0x00000004
DVZ_MASK_COLOR_A = 0x00000008
DVZ_MASK_COLOR_ALL = 0x0000000F

DvzColormap

DVZ_CMAP_BINARY = 0
DVZ_CMAP_HSV = 1
DVZ_CMAP_CIVIDIS = 2
DVZ_CMAP_INFERNO = 3
DVZ_CMAP_MAGMA = 4
DVZ_CMAP_PLASMA = 5
DVZ_CMAP_VIRIDIS = 6
DVZ_CMAP_BLUES = 7
DVZ_CMAP_BUGN = 8
DVZ_CMAP_BUPU = 9
DVZ_CMAP_GNBU = 10
DVZ_CMAP_GREENS = 11
DVZ_CMAP_GREYS = 12
DVZ_CMAP_ORANGES = 13
DVZ_CMAP_ORRD = 14
DVZ_CMAP_PUBU = 15
DVZ_CMAP_PUBUGN = 16
DVZ_CMAP_PURPLES = 17
DVZ_CMAP_RDPU = 18
DVZ_CMAP_REDS = 19
DVZ_CMAP_YLGN = 20
DVZ_CMAP_YLGNBU = 21
DVZ_CMAP_YLORBR = 22
DVZ_CMAP_YLORRD = 23
DVZ_CMAP_AFMHOT = 24
DVZ_CMAP_AUTUMN = 25
DVZ_CMAP_BONE = 26
DVZ_CMAP_COOL = 27
DVZ_CMAP_COPPER = 28
DVZ_CMAP_GIST_HEAT = 29
DVZ_CMAP_GRAY = 30
DVZ_CMAP_HOT = 31
DVZ_CMAP_PINK = 32
DVZ_CMAP_SPRING = 33
DVZ_CMAP_SUMMER = 34
DVZ_CMAP_WINTER = 35
DVZ_CMAP_WISTIA = 36
DVZ_CMAP_BRBG = 37
DVZ_CMAP_BWR = 38
DVZ_CMAP_COOLWARM = 39
DVZ_CMAP_PIYG = 40
DVZ_CMAP_PRGN = 41
DVZ_CMAP_PUOR = 42
DVZ_CMAP_RDBU = 43
DVZ_CMAP_RDGY = 44
DVZ_CMAP_RDYLBU = 45
DVZ_CMAP_RDYLGN = 46
DVZ_CMAP_SEISMIC = 47
DVZ_CMAP_SPECTRAL = 48
DVZ_CMAP_TWILIGHT_SHIFTED = 49
DVZ_CMAP_TWILIGHT = 50
DVZ_CMAP_BRG = 51
DVZ_CMAP_CMRMAP = 52
DVZ_CMAP_CUBEHELIX = 53
DVZ_CMAP_FLAG = 54
DVZ_CMAP_GIST_EARTH = 55
DVZ_CMAP_GIST_NCAR = 56
DVZ_CMAP_GIST_RAINBOW = 57
DVZ_CMAP_GIST_STERN = 58
DVZ_CMAP_GNUPLOT2 = 59
DVZ_CMAP_GNUPLOT = 60
DVZ_CMAP_JET = 61
DVZ_CMAP_NIPY_SPECTRAL = 62
DVZ_CMAP_OCEAN = 63
DVZ_CMAP_PRISM = 64
DVZ_CMAP_RAINBOW = 65
DVZ_CMAP_TERRAIN = 66
DVZ_CMAP_BKR = 67
DVZ_CMAP_BKY = 68
DVZ_CMAP_CET_D10 = 69
DVZ_CMAP_CET_D11 = 70
DVZ_CMAP_CET_D8 = 71
DVZ_CMAP_CET_D13 = 72
DVZ_CMAP_CET_D3 = 73
DVZ_CMAP_CET_D1A = 74
DVZ_CMAP_BJY = 75
DVZ_CMAP_GWV = 76
DVZ_CMAP_BWY = 77
DVZ_CMAP_CET_D12 = 78
DVZ_CMAP_CET_R3 = 79
DVZ_CMAP_CET_D9 = 80
DVZ_CMAP_CWR = 81
DVZ_CMAP_CET_CBC1 = 82
DVZ_CMAP_CET_CBC2 = 83
DVZ_CMAP_CET_CBL1 = 84
DVZ_CMAP_CET_CBL2 = 85
DVZ_CMAP_CET_CBTC1 = 86
DVZ_CMAP_CET_CBTC2 = 87
DVZ_CMAP_CET_CBTL1 = 88
DVZ_CMAP_BGY = 89
DVZ_CMAP_BGYW = 90
DVZ_CMAP_BMW = 91
DVZ_CMAP_CET_C1 = 92
DVZ_CMAP_CET_C1S = 93
DVZ_CMAP_CET_C2 = 94
DVZ_CMAP_CET_C4 = 95
DVZ_CMAP_CET_C4S = 96
DVZ_CMAP_CET_C5 = 97
DVZ_CMAP_CET_I1 = 98
DVZ_CMAP_CET_I3 = 99
DVZ_CMAP_CET_L10 = 100
DVZ_CMAP_CET_L11 = 101
DVZ_CMAP_CET_L12 = 102
DVZ_CMAP_CET_L16 = 103
DVZ_CMAP_CET_L17 = 104
DVZ_CMAP_CET_L18 = 105
DVZ_CMAP_CET_L19 = 106
DVZ_CMAP_CET_L4 = 107
DVZ_CMAP_CET_L7 = 108
DVZ_CMAP_CET_L8 = 109
DVZ_CMAP_CET_L9 = 110
DVZ_CMAP_CET_R1 = 111
DVZ_CMAP_CET_R2 = 112
DVZ_CMAP_COLORWHEEL = 113
DVZ_CMAP_FIRE = 114
DVZ_CMAP_ISOLUM = 115
DVZ_CMAP_KB = 116
DVZ_CMAP_KBC = 117
DVZ_CMAP_KG = 118
DVZ_CMAP_KGY = 119
DVZ_CMAP_KR = 120
DVZ_CMAP_BLACK_BODY = 121
DVZ_CMAP_KINDLMANN = 122
DVZ_CMAP_EXTENDED_KINDLMANN = 123
DVZ_CPAL256_GLASBEY = CPAL256_OFS
DVZ_CPAL256_GLASBEY_COOL = 125
DVZ_CPAL256_GLASBEY_DARK = 126
DVZ_CPAL256_GLASBEY_HV = 127
DVZ_CPAL256_GLASBEY_LIGHT = 128
DVZ_CPAL256_GLASBEY_WARM = 129
DVZ_CPAL032_ACCENT = CPAL032_OFS
DVZ_CPAL032_DARK2 = 131
DVZ_CPAL032_PAIRED = 132
DVZ_CPAL032_PASTEL1 = 133
DVZ_CPAL032_PASTEL2 = 134
DVZ_CPAL032_SET1 = 135
DVZ_CPAL032_SET2 = 136
DVZ_CPAL032_SET3 = 137
DVZ_CPAL032_TAB10 = 138
DVZ_CPAL032_TAB20 = 139
DVZ_CPAL032_TAB20B = 140
DVZ_CPAL032_TAB20C = 141
DVZ_CPAL032_CATEGORY10_10 = 142
DVZ_CPAL032_CATEGORY20_20 = 143
DVZ_CPAL032_CATEGORY20B_20 = 144
DVZ_CPAL032_CATEGORY20C_20 = 145
DVZ_CPAL032_COLORBLIND8 = 146

DvzContourFlags

DVZ_CONTOUR_NONE = 0x00
DVZ_CONTOUR_EDGES = 0x01
DVZ_CONTOUR_JOINTS = 0x02
DVZ_CONTOUR_FULL = 0x04

DvzCorner

DVZ_DIALOG_CORNER_TOP_LEFT = 0
DVZ_DIALOG_CORNER_TOP_RIGHT = 1
DVZ_DIALOG_CORNER_BOTTOM_LEFT = 2
DVZ_DIALOG_CORNER_BOTTOM_RIGHT = 3

DvzCullMode

DVZ_CULL_MODE_NONE = 0
DVZ_CULL_MODE_FRONT = 0x00000001
DVZ_CULL_MODE_BACK = 0x00000002

DvzDatFlags

DVZ_DAT_FLAGS_NONE = 0x0000
DVZ_DAT_FLAGS_STANDALONE = 0x0100
DVZ_DAT_FLAGS_MAPPABLE = 0x0200
DVZ_DAT_FLAGS_DUP = 0x0400
DVZ_DAT_FLAGS_KEEP_ON_RESIZE = 0x1000
DVZ_DAT_FLAGS_PERSISTENT_STAGING = 0x2000

DvzDepthTest

DVZ_DEPTH_TEST_DISABLE = 0
DVZ_DEPTH_TEST_ENABLE = 1

DvzDescriptorType

DVZ_DESCRIPTOR_TYPE_SAMPLER = 0
DVZ_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1
DVZ_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2
DVZ_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3
DVZ_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4
DVZ_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5
DVZ_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6
DVZ_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7
DVZ_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8
DVZ_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9

DvzDialogFlags

DVZ_DIALOG_FLAGS_NONE = 0x0000
DVZ_DIALOG_FLAGS_OVERLAY = 0x0001
DVZ_DIALOG_FLAGS_BLANK = 0x0004
DVZ_DIALOG_FLAGS_PANEL = 0x0008

DvzDim

DVZ_DIM_X = 0x0000
DVZ_DIM_Y = 0x0001
DVZ_DIM_Z = 0x0002
DVZ_DIM_COUNT = 3

DvzEasing

DVZ_EASING_NONE = 0
DVZ_EASING_IN_SINE = 1
DVZ_EASING_OUT_SINE = 2
DVZ_EASING_IN_OUT_SINE = 3
DVZ_EASING_IN_QUAD = 4
DVZ_EASING_OUT_QUAD = 5
DVZ_EASING_IN_OUT_QUAD = 6
DVZ_EASING_IN_CUBIC = 7
DVZ_EASING_OUT_CUBIC = 8
DVZ_EASING_IN_OUT_CUBIC = 9
DVZ_EASING_IN_QUART = 10
DVZ_EASING_OUT_QUART = 11
DVZ_EASING_IN_OUT_QUART = 12
DVZ_EASING_IN_QUINT = 13
DVZ_EASING_OUT_QUINT = 14
DVZ_EASING_IN_OUT_QUINT = 15
DVZ_EASING_IN_EXPO = 16
DVZ_EASING_OUT_EXPO = 17
DVZ_EASING_IN_OUT_EXPO = 18
DVZ_EASING_IN_CIRC = 19
DVZ_EASING_OUT_CIRC = 20
DVZ_EASING_IN_OUT_CIRC = 21
DVZ_EASING_IN_BACK = 22
DVZ_EASING_OUT_BACK = 23
DVZ_EASING_IN_OUT_BACK = 24
DVZ_EASING_IN_ELASTIC = 25
DVZ_EASING_OUT_ELASTIC = 26
DVZ_EASING_IN_OUT_ELASTIC = 27
DVZ_EASING_IN_BOUNCE = 28
DVZ_EASING_OUT_BOUNCE = 29
DVZ_EASING_IN_OUT_BOUNCE = 30
DVZ_EASING_COUNT = 31

DvzFilter

DVZ_FILTER_NEAREST = 0
DVZ_FILTER_LINEAR = 1
DVZ_FILTER_CUBIC_IMG = 1000015000

DvzFontFlags

DVZ_FONT_FLAGS_RGB = 0
DVZ_FONT_FLAGS_RGBA = 1

DvzFormat

DVZ_FORMAT_NONE = 0
DVZ_FORMAT_R8_UNORM = 9
DVZ_FORMAT_R8_SNORM = 10
DVZ_FORMAT_R8_UINT = 13
DVZ_FORMAT_R8_SINT = 14
DVZ_FORMAT_R8G8_UNORM = 16
DVZ_FORMAT_R8G8_SNORM = 17
DVZ_FORMAT_R8G8_UINT = 20
DVZ_FORMAT_R8G8_SINT = 21
DVZ_FORMAT_R8G8B8_UNORM = 23
DVZ_FORMAT_R8G8B8_SNORM = 24
DVZ_FORMAT_R8G8B8_UINT = 27
DVZ_FORMAT_R8G8B8_SINT = 28
DVZ_FORMAT_R8G8B8A8_UNORM = 37
DVZ_FORMAT_R8G8B8A8_SNORM = 38
DVZ_FORMAT_R8G8B8A8_UINT = 41
DVZ_FORMAT_R8G8B8A8_SINT = 42
DVZ_FORMAT_B8G8R8A8_UNORM = 44
DVZ_FORMAT_R16_UNORM = 70
DVZ_FORMAT_R16_SNORM = 71
DVZ_FORMAT_R32_UINT = 98
DVZ_FORMAT_R32_SINT = 99
DVZ_FORMAT_R32_SFLOAT = 100
DVZ_FORMAT_R32G32_UINT = 101
DVZ_FORMAT_R32G32_SINT = 102
DVZ_FORMAT_R32G32_SFLOAT = 103
DVZ_FORMAT_R32G32B32_UINT = 104
DVZ_FORMAT_R32G32B32_SINT = 105
DVZ_FORMAT_R32G32B32_SFLOAT = 106
DVZ_FORMAT_R32G32B32A32_UINT = 107
DVZ_FORMAT_R32G32B32A32_SINT = 108
DVZ_FORMAT_R32G32B32A32_SFLOAT = 109
DVZ_FORMAT_R64_UINT = 110
DVZ_FORMAT_R64_SINT = 111
DVZ_FORMAT_R64_SFLOAT = 112
DVZ_FORMAT_R64G64_UINT = 113
DVZ_FORMAT_R64G64_SINT = 114
DVZ_FORMAT_R64G64_SFLOAT = 115
DVZ_FORMAT_R64G64B64_UINT = 116
DVZ_FORMAT_R64G64B64_SINT = 117
DVZ_FORMAT_R64G64B64_SFLOAT = 118
DVZ_FORMAT_R64G64B64A64_UINT = 119
DVZ_FORMAT_R64G64B64A64_SINT = 120
DVZ_FORMAT_R64G64B64A64_SFLOAT = 121

DvzFrontFace

DVZ_FRONT_FACE_COUNTER_CLOCKWISE = 0
DVZ_FRONT_FACE_CLOCKWISE = 1

DvzGraphicsRequestFlags

DVZ_GRAPHICS_REQUEST_FLAGS_NONE = 0x0000
DVZ_GRAPHICS_REQUEST_FLAGS_OFFSCREEN = 0x1000

DvzGraphicsType

DVZ_GRAPHICS_NONE = 0
DVZ_GRAPHICS_POINT = 1
DVZ_GRAPHICS_TRIANGLE = 2
DVZ_GRAPHICS_CUSTOM = 3

DvzGuiFlags

DVZ_GUI_FLAGS_NONE = 0x0000
DVZ_GUI_FLAGS_OFFSCREEN = 0x0001
DVZ_GUI_FLAGS_DOCKING = 0x0010

DvzImageFlags

DVZ_IMAGE_FLAGS_SIZE_PIXELS = 0x0000
DVZ_IMAGE_FLAGS_SIZE_NDC = 0x0001
DVZ_IMAGE_FLAGS_RESCALE_KEEP_RATIO = 0x0004
DVZ_IMAGE_FLAGS_RESCALE = 0x0008
DVZ_IMAGE_FLAGS_MODE_RGBA = 0x0000
DVZ_IMAGE_FLAGS_MODE_COLORMAP = 0x0010
DVZ_IMAGE_FLAGS_MODE_FILL = 0x0020
DVZ_IMAGE_FLAGS_BORDER = 0x0080

DvzJoinType

DVZ_JOIN_SQUARE = 0
DVZ_JOIN_ROUND = 1

DvzKeyCode

DVZ_KEY_UNKNOWN = -1
DVZ_KEY_NONE = +0
DVZ_KEY_SPACE = 32
DVZ_KEY_APOSTROPHE = 39
DVZ_KEY_COMMA = 44
DVZ_KEY_MINUS = 45
DVZ_KEY_PERIOD = 46
DVZ_KEY_SLASH = 47
DVZ_KEY_0 = 48
DVZ_KEY_1 = 49
DVZ_KEY_2 = 50
DVZ_KEY_3 = 51
DVZ_KEY_4 = 52
DVZ_KEY_5 = 53
DVZ_KEY_6 = 54
DVZ_KEY_7 = 55
DVZ_KEY_8 = 56
DVZ_KEY_9 = 57
DVZ_KEY_SEMICOLON = 59
DVZ_KEY_EQUAL = 61
DVZ_KEY_A = 65
DVZ_KEY_B = 66
DVZ_KEY_C = 67
DVZ_KEY_D = 68
DVZ_KEY_E = 69
DVZ_KEY_F = 70
DVZ_KEY_G = 71
DVZ_KEY_H = 72
DVZ_KEY_I = 73
DVZ_KEY_J = 74
DVZ_KEY_K = 75
DVZ_KEY_L = 76
DVZ_KEY_M = 77
DVZ_KEY_N = 78
DVZ_KEY_O = 79
DVZ_KEY_P = 80
DVZ_KEY_Q = 81
DVZ_KEY_R = 82
DVZ_KEY_S = 83
DVZ_KEY_T = 84
DVZ_KEY_U = 85
DVZ_KEY_V = 86
DVZ_KEY_W = 87
DVZ_KEY_X = 88
DVZ_KEY_Y = 89
DVZ_KEY_Z = 90
DVZ_KEY_LEFT_BRACKET = 91
DVZ_KEY_BACKSLASH = 92
DVZ_KEY_RIGHT_BRACKET = 93
DVZ_KEY_GRAVE_ACCENT = 96
DVZ_KEY_WORLD_1 = 161
DVZ_KEY_WORLD_2 = 162
DVZ_KEY_ESCAPE = 256
DVZ_KEY_ENTER = 257
DVZ_KEY_TAB = 258
DVZ_KEY_BACKSPACE = 259
DVZ_KEY_INSERT = 260
DVZ_KEY_DELETE = 261
DVZ_KEY_RIGHT = 262
DVZ_KEY_LEFT = 263
DVZ_KEY_DOWN = 264
DVZ_KEY_UP = 265
DVZ_KEY_PAGE_UP = 266
DVZ_KEY_PAGE_DOWN = 267
DVZ_KEY_HOME = 268
DVZ_KEY_END = 269
DVZ_KEY_CAPS_LOCK = 280
DVZ_KEY_SCROLL_LOCK = 281
DVZ_KEY_NUM_LOCK = 282
DVZ_KEY_PRINT_SCREEN = 283
DVZ_KEY_PAUSE = 284
DVZ_KEY_F1 = 290
DVZ_KEY_F2 = 291
DVZ_KEY_F3 = 292
DVZ_KEY_F4 = 293
DVZ_KEY_F5 = 294
DVZ_KEY_F6 = 295
DVZ_KEY_F7 = 296
DVZ_KEY_F8 = 297
DVZ_KEY_F9 = 298
DVZ_KEY_F10 = 299
DVZ_KEY_F11 = 300
DVZ_KEY_F12 = 301
DVZ_KEY_F13 = 302
DVZ_KEY_F14 = 303
DVZ_KEY_F15 = 304
DVZ_KEY_F16 = 305
DVZ_KEY_F17 = 306
DVZ_KEY_F18 = 307
DVZ_KEY_F19 = 308
DVZ_KEY_F20 = 309
DVZ_KEY_F21 = 310
DVZ_KEY_F22 = 311
DVZ_KEY_F23 = 312
DVZ_KEY_F24 = 313
DVZ_KEY_F25 = 314
DVZ_KEY_KP_0 = 320
DVZ_KEY_KP_1 = 321
DVZ_KEY_KP_2 = 322
DVZ_KEY_KP_3 = 323
DVZ_KEY_KP_4 = 324
DVZ_KEY_KP_5 = 325
DVZ_KEY_KP_6 = 326
DVZ_KEY_KP_7 = 327
DVZ_KEY_KP_8 = 328
DVZ_KEY_KP_9 = 329
DVZ_KEY_KP_DECIMAL = 330
DVZ_KEY_KP_DIVIDE = 331
DVZ_KEY_KP_MULTIPLY = 332
DVZ_KEY_KP_SUBTRACT = 333
DVZ_KEY_KP_ADD = 334
DVZ_KEY_KP_ENTER = 335
DVZ_KEY_KP_EQUAL = 336
DVZ_KEY_LEFT_SHIFT = 340
DVZ_KEY_LEFT_CONTROL = 341
DVZ_KEY_LEFT_ALT = 342
DVZ_KEY_LEFT_SUPER = 343
DVZ_KEY_RIGHT_SHIFT = 344
DVZ_KEY_RIGHT_CONTROL = 345
DVZ_KEY_RIGHT_ALT = 346
DVZ_KEY_RIGHT_SUPER = 347
DVZ_KEY_MENU = 348
DVZ_KEY_LAST = 348

DvzKeyboardEventType

DVZ_KEYBOARD_EVENT_NONE = 0
DVZ_KEYBOARD_EVENT_PRESS = 1
DVZ_KEYBOARD_EVENT_REPEAT = 2
DVZ_KEYBOARD_EVENT_RELEASE = 3

DvzKeyboardModifiers

DVZ_KEY_MODIFIER_NONE = 0x00000000
DVZ_KEY_MODIFIER_SHIFT = 0x00000001
DVZ_KEY_MODIFIER_CONTROL = 0x00000002
DVZ_KEY_MODIFIER_ALT = 0x00000004
DVZ_KEY_MODIFIER_SUPER = 0x00000008

DvzMarkerAspect

DVZ_MARKER_ASPECT_FILLED = 0
DVZ_MARKER_ASPECT_STROKE = 1
DVZ_MARKER_ASPECT_OUTLINE = 2

DvzMarkerMode

DVZ_MARKER_MODE_NONE = 0
DVZ_MARKER_MODE_CODE = 1
DVZ_MARKER_MODE_BITMAP = 2
DVZ_MARKER_MODE_SDF = 3
DVZ_MARKER_MODE_MSDF = 4
DVZ_MARKER_MODE_MTSDF = 5

DvzMarkerShape

DVZ_MARKER_SHAPE_DISC = 0
DVZ_MARKER_SHAPE_ASTERISK = 1
DVZ_MARKER_SHAPE_CHEVRON = 2
DVZ_MARKER_SHAPE_CLOVER = 3
DVZ_MARKER_SHAPE_CLUB = 4
DVZ_MARKER_SHAPE_CROSS = 5
DVZ_MARKER_SHAPE_DIAMOND = 6
DVZ_MARKER_SHAPE_ARROW = 7
DVZ_MARKER_SHAPE_ELLIPSE = 8
DVZ_MARKER_SHAPE_HBAR = 9
DVZ_MARKER_SHAPE_HEART = 10
DVZ_MARKER_SHAPE_INFINITY = 11
DVZ_MARKER_SHAPE_PIN = 12
DVZ_MARKER_SHAPE_RING = 13
DVZ_MARKER_SHAPE_SPADE = 14
DVZ_MARKER_SHAPE_SQUARE = 15
DVZ_MARKER_SHAPE_TAG = 16
DVZ_MARKER_SHAPE_TRIANGLE = 17
DVZ_MARKER_SHAPE_VBAR = 18
DVZ_MARKER_SHAPE_ROUNDED_RECT = 19
DVZ_MARKER_SHAPE_COUNT = 20

DvzMeshFlags

DVZ_MESH_FLAGS_NONE = 0x0000
DVZ_MESH_FLAGS_TEXTURED = 0x0001
DVZ_MESH_FLAGS_LIGHTING = 0x0002
DVZ_MESH_FLAGS_CONTOUR = 0x0004
DVZ_MESH_FLAGS_ISOLINE = 0x0008

DvzMockFlags

DVZ_MOCK_FLAGS_NONE = 0x00
DVZ_MOCK_FLAGS_CLOSED = 0x01

DvzMouseButton

DVZ_MOUSE_BUTTON_NONE = 0
DVZ_MOUSE_BUTTON_LEFT = 1
DVZ_MOUSE_BUTTON_MIDDLE = 2
DVZ_MOUSE_BUTTON_RIGHT = 3

DvzMouseEventType

DVZ_MOUSE_EVENT_RELEASE = 0
DVZ_MOUSE_EVENT_PRESS = 1
DVZ_MOUSE_EVENT_MOVE = 2
DVZ_MOUSE_EVENT_CLICK = 3
DVZ_MOUSE_EVENT_DOUBLE_CLICK = 5
DVZ_MOUSE_EVENT_DRAG_START = 10
DVZ_MOUSE_EVENT_DRAG = 11
DVZ_MOUSE_EVENT_DRAG_STOP = 12
DVZ_MOUSE_EVENT_WHEEL = 20
DVZ_MOUSE_EVENT_ALL = 255

DvzMouseState

DVZ_MOUSE_STATE_RELEASE = 0
DVZ_MOUSE_STATE_PRESS = 1
DVZ_MOUSE_STATE_CLICK = 3
DVZ_MOUSE_STATE_CLICK_PRESS = 4
DVZ_MOUSE_STATE_DOUBLE_CLICK = 5
DVZ_MOUSE_STATE_DRAGGING = 11

DvzOrientation

DVZ_ORIENTATION_DEFAULT = 0
DVZ_ORIENTATION_UP = 1
DVZ_ORIENTATION_REVERSE = 2
DVZ_ORIENTATION_DOWN = 3

DvzPanelLinkFlags

DVZ_PANEL_LINK_FLAGS_NONE = 0x00
DVZ_PANEL_LINK_FLAGS_MODEL = 0x01
DVZ_PANEL_LINK_FLAGS_VIEW = 0x02
DVZ_PANEL_LINK_FLAGS_PROJECTION = 0x04

DvzPanzoomFlags

DVZ_PANZOOM_FLAGS_NONE = 0x00
DVZ_PANZOOM_FLAGS_KEEP_ASPECT = 0x01
DVZ_PANZOOM_FLAGS_FIXED_X = 0x10
DVZ_PANZOOM_FLAGS_FIXED_Y = 0x20

DvzPathFlags

DVZ_PATH_FLAGS_OPEN = 0
DVZ_PATH_FLAGS_CLOSED = 1

DvzPolygonMode

DVZ_POLYGON_MODE_FILL = 0
DVZ_POLYGON_MODE_LINE = 1
DVZ_POLYGON_MODE_POINT = 2

DvzPrimitiveTopology

DVZ_PRIMITIVE_TOPOLOGY_POINT_LIST = 0
DVZ_PRIMITIVE_TOPOLOGY_LINE_LIST = 1
DVZ_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2
DVZ_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3
DVZ_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4
DVZ_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5

DvzPrintFlagsFlags

DVZ_PRINT_FLAGS_NONE = 0x0000
DVZ_PRINT_FLAGS_ALL = 0x0001
DVZ_PRINT_FLAGS_SMALL = 0x0003

DvzRecorderCommandType

DVZ_RECORDER_NONE = 0
DVZ_RECORDER_BEGIN = 1
DVZ_RECORDER_DRAW = 2
DVZ_RECORDER_DRAW_INDEXED = 3
DVZ_RECORDER_DRAW_INDIRECT = 4
DVZ_RECORDER_DRAW_INDEXED_INDIRECT = 5
DVZ_RECORDER_VIEWPORT = 6
DVZ_RECORDER_PUSH = 7
DVZ_RECORDER_END = 8
DVZ_RECORDER_COUNT = 9

DvzRefFlags

DVZ_REF_FLAGS_NONE = 0x00
DVZ_REF_FLAGS_EQUAL = 0x01

DvzRequestAction

DVZ_REQUEST_ACTION_NONE = 0
DVZ_REQUEST_ACTION_CREATE = 1
DVZ_REQUEST_ACTION_DELETE = 2
DVZ_REQUEST_ACTION_RESIZE = 3
DVZ_REQUEST_ACTION_UPDATE = 4
DVZ_REQUEST_ACTION_BIND = 5
DVZ_REQUEST_ACTION_RECORD = 6
DVZ_REQUEST_ACTION_UPLOAD = 7
DVZ_REQUEST_ACTION_UPFILL = 8
DVZ_REQUEST_ACTION_DOWNLOAD = 9
DVZ_REQUEST_ACTION_SET = 10
DVZ_REQUEST_ACTION_GET = 11

DvzRequestObject

DVZ_REQUEST_OBJECT_NONE = 0
DVZ_REQUEST_OBJECT_CANVAS = 101
DVZ_REQUEST_OBJECT_DAT = 2
DVZ_REQUEST_OBJECT_TEX = 3
DVZ_REQUEST_OBJECT_SAMPLER = 4
DVZ_REQUEST_OBJECT_COMPUTE = 5
DVZ_REQUEST_OBJECT_PRIMITIVE = 6
DVZ_REQUEST_OBJECT_DEPTH = 7
DVZ_REQUEST_OBJECT_BLEND = 8
DVZ_REQUEST_OBJECT_MASK = 9
DVZ_REQUEST_OBJECT_POLYGON = 10
DVZ_REQUEST_OBJECT_CULL = 11
DVZ_REQUEST_OBJECT_FRONT = 12
DVZ_REQUEST_OBJECT_SHADER = 13
DVZ_REQUEST_OBJECT_VERTEX = 14
DVZ_REQUEST_OBJECT_VERTEX_ATTR = 15
DVZ_REQUEST_OBJECT_SLOT = 16
DVZ_REQUEST_OBJECT_PUSH = 17
DVZ_REQUEST_OBJECT_SPECIALIZATION = 18
DVZ_REQUEST_OBJECT_GRAPHICS = 19
DVZ_REQUEST_OBJECT_INDEX = 20
DVZ_REQUEST_OBJECT_BACKGROUND = 21
DVZ_REQUEST_OBJECT_RECORD = 22

DvzSamplerAddressMode

DVZ_SAMPLER_ADDRESS_MODE_REPEAT = 0
DVZ_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1
DVZ_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2
DVZ_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3
DVZ_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4

DvzSamplerAxis

DVZ_SAMPLER_AXIS_U = 0
DVZ_SAMPLER_AXIS_V = 1
DVZ_SAMPLER_AXIS_W = 2

DvzSceneFont

DVZ_SCENE_FONT_MONO = 0
DVZ_SCENE_FONT_LABEL = 1
DVZ_SCENE_FONT_COUNT = 2

DvzShaderFormat

DVZ_SHADER_NONE = 0
DVZ_SHADER_SPIRV = 1
DVZ_SHADER_GLSL = 2

DvzShaderType

DVZ_SHADER_VERTEX = 0x00000001
DVZ_SHADER_TESSELLATION_CONTROL = 0x00000002
DVZ_SHADER_TESSELLATION_EVALUATION = 0x00000004
DVZ_SHADER_GEOMETRY = 0x00000008
DVZ_SHADER_FRAGMENT = 0x00000010
DVZ_SHADER_COMPUTE = 0x00000020

DvzShapeIndexingFlags

DVZ_INDEXING_NONE = 0x00
DVZ_INDEXING_EARCUT = 0x10
DVZ_INDEXING_SURFACE = 0x20

DvzShapeType

DVZ_SHAPE_NONE = 0
DVZ_SHAPE_SQUARE = 1
DVZ_SHAPE_DISC = 2
DVZ_SHAPE_SECTOR = 3
DVZ_SHAPE_POLYGON = 4
DVZ_SHAPE_HISTOGRAM = 5
DVZ_SHAPE_CUBE = 6
DVZ_SHAPE_SPHERE = 7
DVZ_SHAPE_CYLINDER = 8
DVZ_SHAPE_CONE = 9
DVZ_SHAPE_TORUS = 10
DVZ_SHAPE_ARROW = 11
DVZ_SHAPE_TETRAHEDRON = 12
DVZ_SHAPE_HEXAHEDRON = 13
DVZ_SHAPE_OCTAHEDRON = 14
DVZ_SHAPE_DODECAHEDRON = 15
DVZ_SHAPE_ICOSAHEDRON = 16
DVZ_SHAPE_SURFACE = 17
DVZ_SHAPE_OBJ = 18
DVZ_SHAPE_OTHER = 19

DvzSlotType

DVZ_SLOT_DAT = 0
DVZ_SLOT_TEX = 1
DVZ_SLOT_COUNT = 2

DvzSphereFlags

DVZ_SPHERE_FLAGS_NONE = 0x0000
DVZ_SPHERE_FLAGS_TEXTURED = 0x0001
DVZ_SPHERE_FLAGS_LIGHTING = 0x0002
DVZ_SPHERE_FLAGS_SIZE_PIXELS = 0x0004

DvzTexDims

DVZ_TEX_NONE = 0
DVZ_TEX_1D = 1
DVZ_TEX_2D = 2
DVZ_TEX_3D = 3

DvzTexFlags

DVZ_TEX_FLAGS_NONE = 0x0000
DVZ_TEX_FLAGS_PERSISTENT_STAGING = 0x2000

DvzUploadFlags

DVZ_UPLOAD_FLAGS_NOCOPY = 0x0800

DvzVertexInputRate

DVZ_VERTEX_INPUT_RATE_VERTEX = 0
DVZ_VERTEX_INPUT_RATE_INSTANCE = 1

DvzViewFlags

DVZ_VIEW_FLAGS_NONE = 0x0000
DVZ_VIEW_FLAGS_STATIC = 0x0010
DVZ_VIEW_FLAGS_NOCLIP = 0x0020

DvzViewportClip

DVZ_VIEWPORT_CLIP_INNER = 0x0001
DVZ_VIEWPORT_CLIP_OUTER = 0x0002
DVZ_VIEWPORT_CLIP_BOTTOM = 0x0004
DVZ_VIEWPORT_CLIP_LEFT = 0x0008

DvzVisualFlags

DVZ_VISUAL_FLAGS_DEFAULT = 0x000000
DVZ_VISUAL_FLAGS_INDEXED = 0x010000
DVZ_VISUAL_FLAGS_INDIRECT = 0x020000
DVZ_VISUAL_FLAGS_VERTEX_MAPPABLE = 0x400000
DVZ_VISUAL_FLAGS_INDEX_MAPPABLE = 0x800000

DvzVolumeFlags

DVZ_VOLUME_FLAGS_NONE = 0x0000
DVZ_VOLUME_FLAGS_RGBA = 0x0001
DVZ_VOLUME_FLAGS_COLORMAP = 0x0002
DVZ_VOLUME_FLAGS_BACK_FRONT = 0x0004

Structures

Note: The information about these structures is provided for reference only, do not use them in production as the structures may change with each release.

DvzAtlasFont

struct DvzAtlasFont {
    long ttf_size;
    char* ttf_bytes;
    DvzAtlas* atlas;
    DvzFont* font;
    float font_size;
};

DvzBatch

struct DvzBatch {
    uint32_t capacity;
    uint32_t count;
    DvzRequest* requests;
    DvzList* pointers_to_free;
    int flags;
};

DvzFrameEvent

struct DvzFrameEvent {
    uint64_t frame_idx;
    double time;
    double interval;
    void* user_data;
};

DvzGuiEvent

struct DvzGuiEvent {
    DvzGuiWindow* gui_window;
    void* user_data;
};

DvzKeyboardEvent

struct DvzKeyboardEvent {
    DvzKeyboardEventType type;
    DvzKeyCode key;
    int mods;
    void* user_data;
};

DvzMVP

struct DvzMVP {
    mat4 model;
    mat4 view;
    mat4 proj;
};

DvzMouseDragEvent

struct DvzMouseDragEvent {
    vec2 press_pos;
    vec2 shift;
    bool is_press_valid;
};

DvzMouseEvent

struct DvzMouseEvent {
    DvzMouseEventType type;
    DvzMouseEventUnion content;
    vec2 pos;
    DvzMouseButton button;
    int mods;
    float content_scale;
    void* user_data;
};

DvzMouseEventUnion

struct DvzMouseEventUnion {
    DvzMouseWheelEvent w;
    DvzMouseDragEvent d;
};

DvzMouseWheelEvent

struct DvzMouseWheelEvent {
    vec2 dir;
};

DvzRecorderCommand

struct DvzRecorderCommand {
    DvzRecorderCommandType type;
    DvzId canvas_id;
    DvzRequestObject object_type;
    DvzRecorderUnion contents;
};

DvzRecorderDraw

struct DvzRecorderDraw {
    DvzId pipe_id;
    uint32_t first_vertex;
    uint32_t vertex_count;
    uint32_t first_instance;
    uint32_t instance_count;
};

DvzRecorderDrawIndexed

struct DvzRecorderDrawIndexed {
    DvzId pipe_id;
    uint32_t first_index;
    uint32_t vertex_offset;
    uint32_t index_count;
    uint32_t first_instance;
    uint32_t instance_count;
};

DvzRecorderDrawIndexedIndirect

struct DvzRecorderDrawIndexedIndirect {
    DvzId pipe_id;
    DvzId dat_indirect_id;
    uint32_t draw_count;
};

DvzRecorderDrawIndirect

struct DvzRecorderDrawIndirect {
    DvzId pipe_id;
    DvzId dat_indirect_id;
    uint32_t draw_count;
};

DvzRecorderPush

struct DvzRecorderPush {
    DvzId pipe_id;
    DvzShaderStageFlags shader_stages;
    DvzSize offset;
    DvzSize size;
    void* data;
};

DvzRecorderUnion

struct DvzRecorderUnion {
    DvzRecorderViewport v;
    DvzRecorderPush p;
    DvzRecorderDraw draw;
    DvzRecorderDrawIndexed draw_indexed;
    DvzRecorderDrawIndirect draw_indirect;
    DvzRecorderDrawIndexedIndirect draw_indexed_indirect;
};

DvzRecorderViewport

struct DvzRecorderViewport {
    vec2 offset;
    vec2 shape;
};

DvzRequest

struct DvzRequest {
    uint32_t version;
    DvzRequestAction action;
    DvzRequestObject type;
    DvzId id;
    DvzRequestContent content;
    int tag;
    int flags;
    char* desc;
};

DvzRequestAttr

struct DvzRequestAttr {
    uint32_t binding_idx;
    uint32_t location;
    DvzFormat format;
    DvzSize offset;
};

DvzRequestBindDat

struct DvzRequestBindDat {
    uint32_t slot_idx;
    DvzId dat;
    DvzSize offset;
};

DvzRequestBindIndex

struct DvzRequestBindIndex {
    DvzId dat;
    DvzSize offset;
};

DvzRequestBindTex

struct DvzRequestBindTex {
    uint32_t slot_idx;
    DvzId tex;
    DvzId sampler;
    uvec3 offset;
};

DvzRequestBindVertex

struct DvzRequestBindVertex {
    uint32_t binding_idx;
    DvzId dat;
    DvzSize offset;
};

DvzRequestBlend

struct DvzRequestBlend {
    DvzBlendType blend;
};

DvzRequestBoard

struct DvzRequestBoard {
    uint32_t width;
    uint32_t height;
    cvec4 background;
};

DvzRequestCanvas

struct DvzRequestCanvas {
    uint32_t framebuffer_width;
    uint32_t framebuffer_height;
    uint32_t screen_width;
    uint32_t screen_height;
    bool is_offscreen;
    cvec4 background;
};

DvzRequestContent

struct DvzRequestContent {
    DvzRequestCanvas canvas;
    DvzRequestDat dat;
    DvzRequestTex tex;
    DvzRequestSampler sampler;
    DvzRequestShader shader;
    DvzRequestDatUpload dat_upload;
    DvzRequestTexUpload tex_upload;
    DvzRequestGraphics graphics;
    DvzRequestPrimitive set_primitive;
    DvzRequestBlend set_blend;
    DvzRequestMask set_mask;
    DvzRequestDepth set_depth;
    DvzRequestPolygon set_polygon;
    DvzRequestCull set_cull;
    DvzRequestFront set_front;
    DvzRequestShaderSet set_shader;
    DvzRequestVertex set_vertex;
    DvzRequestAttr set_attr;
    DvzRequestSlot set_slot;
    DvzRequestPush set_push;
    DvzRequestSpecialization set_specialization;
    DvzRequestBindVertex bind_vertex;
    DvzRequestBindIndex bind_index;
    DvzRequestBindDat bind_dat;
    DvzRequestBindTex bind_tex;
    DvzRequestRecord record;
};

DvzRequestCull

struct DvzRequestCull {
    DvzCullMode cull;
};

DvzRequestDat

struct DvzRequestDat {
    DvzBufferType type;
    DvzSize size;
};

DvzRequestDatUpload

struct DvzRequestDatUpload {
    int upload_type;
    DvzSize offset;
    DvzSize size;
    void* data;
};

DvzRequestDepth

struct DvzRequestDepth {
    DvzDepthTest depth;
};

DvzRequestFront

struct DvzRequestFront {
    DvzFrontFace front;
};

DvzRequestGraphics

struct DvzRequestGraphics {
    DvzGraphicsType type;
};

DvzRequestMask

struct DvzRequestMask {
    int32_t mask;
};

DvzRequestPolygon

struct DvzRequestPolygon {
    DvzPolygonMode polygon;
};

DvzRequestPrimitive

struct DvzRequestPrimitive {
    DvzPrimitiveTopology primitive;
};

DvzRequestPush

struct DvzRequestPush {
    DvzShaderStageFlags shader_stages;
    DvzSize offset;
    DvzSize size;
};

DvzRequestRecord

struct DvzRequestRecord {
    DvzRecorderCommand command;
};

DvzRequestSampler

struct DvzRequestSampler {
    DvzFilter filter;
    DvzSamplerAddressMode mode;
};

DvzRequestShader

struct DvzRequestShader {
    DvzShaderFormat format;
    DvzShaderType type;
    DvzSize size;
    char* code;
    uint32_t* buffer;
};

DvzRequestShaderSet

struct DvzRequestShaderSet {
    DvzId shader;
};

DvzRequestSlot

struct DvzRequestSlot {
    uint32_t slot_idx;
    DvzDescriptorType type;
};

DvzRequestSpecialization

struct DvzRequestSpecialization {
    DvzShaderType shader;
    uint32_t idx;
    DvzSize size;
    void* value;
};

DvzRequestTex

struct DvzRequestTex {
    DvzTexDims dims;
    uvec3 shape;
    DvzFormat format;
};

DvzRequestTexUpload

struct DvzRequestTexUpload {
    int upload_type;
    uvec3 offset;
    uvec3 shape;
    DvzSize size;
    void* data;
};

DvzRequestVertex

struct DvzRequestVertex {
    uint32_t binding_idx;
    DvzSize stride;
    DvzVertexInputRate input_rate;
};

DvzRequester

struct DvzRequester {
    DvzFifo* fifo;
};

DvzRequestsEvent

struct DvzRequestsEvent {
    DvzBatch* batch;
    void* user_data;
};

DvzShape

struct DvzShape {
    mat4 transform;
    uint32_t first;
    uint32_t count;
    DvzShapeType type;
    uint32_t vertex_count;
    uint32_t index_count;
    vec3* pos;
    vec3* normal;
    DvzColor* color;
    vec4* texcoords;
    float* isoline;
    vec3* d_left;
    vec3* d_right;
    cvec4* contour;
    DvzIndex* index;
};

DvzTime

struct DvzTime {
    uint64_t seconds;
    uint64_t nanoseconds;
};

DvzTimerEvent

struct DvzTimerEvent {
    uint32_t timer_idx;
    DvzTimerItem* timer_item;
    uint64_t step_idx;
    double time;
    void* user_data;
};

DvzViewport

struct DvzViewport {
    _VkViewport viewport;
    vec4 margins;
    uvec2 offset_screen;
    uvec2 size_screen;
    uvec2 offset_framebuffer;
    uvec2 size_framebuffer;
    int flags;
};

DvzWindowEvent

struct DvzWindowEvent {
    uint32_t framebuffer_width;
    uint32_t framebuffer_height;
    uint32_t screen_width;
    uint32_t screen_height;
    int flags;
    void* user_data;
};

_VkViewport

struct _VkViewport {
    float x;
    float y;
    float width;
    float height;
    float minDepth;
    float maxDepth;
};