# panda3d.core.ComputeNode¶

from panda3d.core import ComputeNode

class ComputeNode

Bases: PandaNode

A special node, the sole purpose of which is to invoke a dispatch operation on the assigned compute shader.

Inheritance diagram

__init__(name: str) → None

Creates a ComputeNode with the given name. Use add_dispatch and also assign a shader using a ShaderAttrib.

addDispatch(num_groups: LVecBase3i) → None

Adds a dispatch command with the given number of work groups in the X, Y, and Z dimensions. Any of these values may be set to 1 if the respective dimension should not be used.

addDispatch(num_groups_x: int, num_groups_y: int, num_groups_z: int) → None

Adds a dispatch command with the given number of work groups in the X, Y, and Z dimensions. Any of these values may be set to 1 if the respective dimension should not be used.

getNumDispatches() → size_t

Returns the number of times add_dispatch has been called on this object.

Return type

size_t

getDispatch(i: size_t) → LVecBase3i

Returns the group counts of the nth dispatch associated with this object.

Return type

LVecBase3i

setDispatch(i: size_t, num_groups: LVecBase3i) → None

Sets the group counts of the nth dispatch associated with this object.

insertDispatch(i: size_t, num_groups: LVecBase3i) → None

Inserts a dispatch command with the given number of work groups in the X, Y, and Z dimensions at the given position in the list of dispatch commands. Any of these values may be set to 1 if the respective dimension should not be used.

removeDispatch(i: size_t) → None

Erases the given dispatch index from the list.

clearDispatches() → None

Removes all dispatch commands.

static getClassType() → TypeHandle
Return type

TypeHandle

getDispatches() → list
property dispatches
Getter

Returns the group counts of the nth dispatch associated with this object.

Setter

Sets the group counts of the nth dispatch associated with this object.

Return type