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
-
explicit
ComputeNode
(std::string const &name)¶ Creates a
ComputeNode
with the given name. Useadd_dispatch
and also assign a shader using aShaderAttrib
.
-
void
add_dispatch
(LVecBase3i const &num_groups)¶
-
void
add_dispatch
(int num_groups_x, int num_groups_y, int num_groups_z)¶ 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.
-
void
clear_dispatches
(void)¶ Removes all dispatch commands.
-
static TypeHandle
get_class_type
(void)¶
-
LVecBase3i const &
get_dispatch
(std::size_t i) const¶ Returns the group counts of the nth dispatch associated with this object.
-
std::size_t
get_num_dispatches
(void) const¶ Returns the number of times
add_dispatch
has been called on this object.
-
void
insert_dispatch
(std::size_t i, LVecBase3i const &num_groups)¶ 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.
-
void
remove_dispatch
(std::size_t i)¶ Erases the given dispatch index from the list.
-
void
set_dispatch
(std::size_t i, LVecBase3i const &num_groups)¶ Sets the group counts of the nth dispatch associated with this object.
-
explicit