23 void ParamTextureSampler::
24 output(std::ostream &out)
const {
27 if (_texture !=
nullptr) {
63 _texture = DCAST(
Texture, p_list[pi++]);
79 param->fillin(scan, manager);
88 void ParamTextureSampler::
98 void ParamTextureImage::
99 output(std::ostream &out)
const {
102 if (_texture !=
nullptr) {
103 out << _texture->get_name();
108 if (_access & A_read) {
109 if (_access & A_write) {
110 out <<
", read-write";
112 out <<
", read-only";
114 }
else if (_access & A_write) {
115 out <<
", write-only";
118 if (_access & A_layered) {
119 out <<
", all layers";
121 out <<
", layer " << _bind_layer;
124 out <<
", level " << _bind_level;
155 _texture = DCAST(
Texture, p_list[pi++]);
171 param->fillin(scan, manager);
180 void ParamTextureImage::
uint8_t get_uint8()
Extracts an unsigned 8-bit integer.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
static void register_with_read_factory()
Tells the BamReader how to create objects of type ParamValue.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
Base class for objects that can be written to and read from Bam files.
void read_datagram(DatagramIterator &source, BamReader *manager)
Reads the sampler state from the datagram that has been previously written using write_datagram.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
int32_t get_int32()
Extracts a signed 32-bit integer.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_name
Returns the name of the type.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
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 write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
void write_datagram(Datagram &destination) const
Encodes the sampler state into a datagram.
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,...
void add_int8(int8_t value)
Adds a signed 8-bit integer to the datagram.
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
A class object for storing a pointer to a Texture along with a set of properties that indicates which...
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
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.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ParamValue.
void add_int32(int32_t value)
Adds a signed 32-bit integer to the datagram.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
bool read_pointer(DatagramIterator &scan)
The interface for reading a pointer to another object from a Bam file.
A class object for storing a pointer to a Texture along with a sampler state that indicates how to to...
void add_uint8(uint8_t value)
Adds an unsigned 8-bit integer to the datagram.
A class to retrieve the individual data elements previously stored in a Datagram.
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
int8_t get_int8()
Extracts a signed 8-bit integer.
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 ...
void write_pointer(Datagram &packet, const TypedWritable *dest)
The interface for writing a pointer to another object to a Bam file.