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));
98 object->set_draw_callback(_dispatcher);
108output(std::ostream &out)
const {
109 PandaNode::output(out);
115ComputeNode::Dispatcher::
122ComputeNode::Dispatcher::
123Dispatcher(
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);
194CycleData *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);
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
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.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
void write_cdata(Datagram &packet, const PipelineCyclerBase &cycler)
Writes out the indicated CycleData object.
This is a generic data block that is passed along to a CallbackObject when a callback is made.
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.
virtual void do_callback(CallbackData *cbdata)
Asks the GSG to dispatch the compute shader.
A special node, the sole purpose of which is to invoke a dispatch operation on the assigned compute s...
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,...
virtual PandaNode * make_copy() const
Returns a newly-allocated Node that is a shallow copy of this one.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ComputeNode.
ComputeNode(const std::string &name)
Creates a ComputeNode with the given name.
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
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 output(std::ostream &out) const
Writes a brief description of the node to the indicated output stream.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual void record_object(CullableObject *object, const CullTraverser *traverser)
This callback function is intended to be overridden by a derived class.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
CullHandler * get_cull_handler() const
Returns the object that will receive the culled Geoms.
The smallest atom of cull.
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
A single page of data maintained by a PipelineCycler.
A class to retrieve the individual data elements previously stored in a Datagram.
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
This specialization on CallbackData is passed when the callback is initiated from deep within the dra...
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
This is a special kind of GeometricBoundingVolume that fills all of space.
A basic node of the scene graph or data graph.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.