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