43 _dispatcher(new
ComputeNode::Dispatcher(*copy._dispatcher))
86 if (pgraph_cat.is_spam()) {
88 <<
"Found " << *
this <<
" in state " << *data._state
89 <<
" draw_mask = " << data._draw_mask <<
"\n";
97 data.get_internal_transform(trav));
109 PandaNode::output(out);
115 ComputeNode::Dispatcher::
122 ComputeNode::Dispatcher::
123 Dispatcher(
const Dispatcher ©) :
124 _cycler(copy._cycler)
138 Dispatches::const_iterator it;
139 for (it = cdata->_dispatches.begin(); it != cdata->_dispatches.end(); ++it) {
140 gsg->dispatch_compute(it->get_x(), it->get_y(), it->get_z());
176 node->fillin(scan, manager);
187 PandaNode::fillin(scan, manager);
188 manager->
read_cdata(scan, _dispatcher->_cycler);
194 CycleData *ComputeNode::Dispatcher::CData::
196 return new CData(*
this);
207 Dispatches::const_iterator it;
208 for (it = _dispatches.begin(); it != _dispatches.end(); ++it) {
209 generic_write_datagram(dg, *it);
220 _dispatches.resize(num_dispatches);
222 for (
int i = 0; i < num_dispatches; ++i) {
223 generic_read_datagram(_dispatches[i], scan);
This specialization on CallbackData is passed when the callback is initiated from deep within the dra...
virtual void output(std::ostream &out) const
Writes a brief description of the node to the indicated output stream.
A basic node of the scene graph or data graph.
CullHandler * get_cull_handler() const
Returns the object that will receive the culled Geoms.
ComputeNode(const std::string &name)
Creates a ComputeNode with the given name.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
void read_cdata(DatagramIterator &scan, PipelineCyclerBase &cycler)
Reads in the indicated CycleData object.
A single page of data maintained by a PipelineCycler.
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void write_cdata(Datagram &packet, const PipelineCyclerBase &cycler)
Writes out the indicated CycleData object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
static void register_with_read_factory()
Tells the BamReader how to create objects of type ComputeNode.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is a generic data block that is passed along to a CallbackObject when a callback is made.
virtual PandaNode * make_copy() const
Returns a newly-allocated Node that is a shallow copy of this one.
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The smallest atom of cull.
virtual void record_object(CullableObject *object, const CullTraverser *traverser)
This callback function is intended to be overridden by a derived class.
virtual void do_callback(CallbackData *cbdata)
Asks the GSG to dispatch the compute shader.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual void add_for_draw(CullTraverser *trav, CullTraverserData &data)
Adds the node's contents to the CullResult we are building up during the cull traversal,...
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A special node, the sole purpose of which is to invoke a dispatch operation on the assigned compute s...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is called by make_from_bam to read in all of the relevant data from the BamFil...
virtual void write_datagram(BamWriter *manager, Datagram &dg) const
Writes the contents of this object to the datagram for shipping out to a Bam file.
void set_draw_callback(CallbackObject *draw_callback)
Specifies a CallbackObject that will be responsible for drawing this object.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a special kind of GeometricBoundingVolume that fills all of space.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.