Go to the documentation of this file.
24 int AntialiasAttrib::_attrib_slot;
54 make(
unsigned short mode) {
56 return return_new(attrib);
71 void AntialiasAttrib::
72 output(std::ostream &out)
const {
73 out << get_type() <<
":";
81 }
else if (type == M_auto) {
85 if ((_mode & M_point) != 0) {
86 out << sep <<
"point";
89 if ((_mode & M_line) != 0) {
93 if ((_mode & M_polygon) != 0) {
94 out << sep <<
"polygon";
97 if ((_mode & M_auto) != 0) {
103 if ((_mode & M_faster) != 0) {
104 out << sep <<
"faster";
107 if ((_mode & M_better) != 0) {
108 out << sep <<
"better";
125 int AntialiasAttrib::
129 if (_mode != ta->_mode) {
130 return (
int)_mode - (int)ta->_mode;
141 size_t AntialiasAttrib::
142 get_hash_impl()
const {
163 unsigned short mode_type;
164 unsigned short mode_quality;
186 return make(mode_type | mode_quality);
192 void AntialiasAttrib::
193 register_with_read_factory() {
220 attrib->fillin(scan, manager);
229 void AntialiasAttrib::
231 RenderAttrib::fillin(scan, manager);
239 void AntialiasAttrib::
241 RenderAttrib::init_type();
243 RenderAttrib::get_class_type());
249 (
"default-antialias-enable",
false,
250 PRC_DESC(
"Set this true to enable the M_auto antialiasing mode for all "
251 "nodes by default."));
get_mode_type
Returns the specified antialias mode, with the quality bits masked out.
This is a convenience class to specialize ConfigVariable as a boolean type.
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
Specifies whether or how to enable antialiasing, if supported by the backend renderer.
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
get_mode_quality
Returns the specified antialias mode, with the type bits masked out.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
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.
CPT(RenderAttrib) AntialiasAttrib
Constructs a new AntialiasAttrib object.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
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.
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 int register_slot(TypeHandle type_handle, int sort, RenderAttrib *default_attrib)
Adds the indicated TypeHandle to the registry, if it is not there already, and returns a unique slot ...
static size_t add_hash(size_t start, const Key &key)
Adds the indicated key into a running hash.
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.
const RenderAttrib * get_slot_default(int slot) const
Returns the default RenderAttrib object associated with slot n.
static RenderAttribRegistry * quick_get_global_ptr()
Returns the global_ptr without first ensuring it has been initialized.
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...