50 _allow_tex_mat =
false;
66 _geom_node_list.clear();
81 if (grutil_cat.is_debug()) {
83 <<
"scan(" << *node <<
", " << *state <<
", " << *transform <<
")\n";
86 CPT(
RenderState) next_state = state->compose(node->get_state());
87 CPT(
TransformState) next_transform = transform->compose(node->get_transform());
93 node->
set_state(node->get_state()->remove_attrib(TextureAttrib::get_class_slot()));
96 scan_geom_node(DCAST(
GeomNode, node), next_state, next_transform);
101 for (
int i = 0; i < num_children; i++) {
112 _target_stage = stage;
135 _use_geom = use_geom;
153 _allow_tex_mat = allow_tex_mat;
166 if (grutil_cat.is_debug()) {
168 <<
"Beginning flatten operation\n";
169 Stages::const_iterator mi;
170 for (mi = _stages.begin(); mi != _stages.end(); ++mi) {
171 const StageList &stage_list = (*mi).first;
172 const GeomList &geom_list = (*mi).second;
173 grutil_cat.debug(
false)
174 <<
"stage_list for:";
175 for (GeomList::const_iterator gi = geom_list.begin();
176 gi != geom_list.end();
178 const GeomInfo &geom_info = (*gi);
179 grutil_cat.debug(
false)
180 <<
" (" << geom_info._geom_node->get_name() <<
" g"
181 << geom_info._index <<
")";
183 grutil_cat.debug(
false) <<
":\n";
185 StageList::const_iterator si;
186 for (si = stage_list.begin(); si != stage_list.end(); ++si) {
187 const StageInfo &stage_info = (*si);
188 grutil_cat.debug(
false)
189 <<
" " << *stage_info._stage <<
" " << *stage_info._tex
190 <<
" " << *stage_info._tex_mat <<
"\n";
194 Stages::const_iterator mi;
195 for (mi = _stages.begin(); mi != _stages.end(); ++mi) {
196 const StageList &stage_list = (*mi).first;
197 const GeomList &geom_list = (*mi).second;
200 bool use_transparent_bg =
false;
201 if(stage_list.size() > 0) {
202 if(stage_list[0]._stage->get_mode() == TextureStage::M_decal)
203 use_transparent_bg =
true;
205 use_transparent_bg =
false;
207 grutil_cat.debug(
false) <<
"use transparent bg = " << use_transparent_bg <<
"\n";
215 const StageInfo &model_stage = stage_list[choose_model_stage(stage_list)];
217 Texture *model_tex = model_stage._tex;
219 SamplerState::FilterType minfilter = model_tex->
get_minfilter();
220 SamplerState::FilterType magfilter = model_tex->
get_magfilter();
223 LTexCoord min_uv, max_uv;
224 determine_uv_range(min_uv, max_uv, model_stage, geom_list);
230 get_uv_scale(uv_scale, uv_trans, min_uv, max_uv);
238 choose_texture_size(x_size, y_size, model_stage, uv_scale,
241 static int multitex_id = 1;
242 std::ostringstream multitex_name_strm;
243 multitex_name_strm <<
"multitex" << multitex_id;
247 (multitex_name_strm.str(), x_size, y_size,
nullptr,
false);
263 lens->set_film_size(1.0f, 1.0f);
264 lens->set_film_offset(0.5f, 0.5f);
265 lens->set_near_far(-1000.0f, 1000.0f);
266 lens->set_view_mat(LMatrix4(uv_scale[0], 0.0f, 0.0, 0.0f,
267 0.0f, 1.0f, 0.0, 0.0f,
268 0.0f, 0.0f, uv_scale[1], 0.0f,
269 uv_trans[0], 0.0f, uv_trans[1], 1.0f));
270 cam_node->set_lens(lens);
286 bool force_use_geom = _use_geom;
287 bool bake_in_color = _use_geom;
288 LColor geom_color(1.0f, 1.0f, 1.0f, 1.0f);
291 if(use_transparent_bg)
292 geom_color = LColor(0.0f,0.0f,0.0f,0.0f);
294 if (!force_use_geom) {
295 bool uses_decal = scan_decal(stage_list);
299 bake_in_color =
true;
313 if (!force_use_geom) {
318 cm.set_frame(min_uv[0], max_uv[0], min_uv[1], max_uv[1]);
320 cm.set_color(geom_color);
327 nassertv(bake_in_color);
329 transfer_geom(geom_node,
nullptr, geom_list,
true);
334 StageList::const_iterator si;
335 for (si = stage_list.begin(); si != stage_list.end(); ++si) {
336 const StageInfo &stage_info = (*si);
338 make_texture_layer(render, stage_info, geom_list,
339 min_uv, max_uv, force_use_geom, use_transparent_bg);
345 add_on_stage(_target_stage, tex);
347 GeomList::const_iterator gi;
348 for (gi = geom_list.begin(); gi != geom_list.end(); ++gi) {
349 const GeomInfo &geom_info = (*gi);
352 geom_info._geom_node->get_geom_state(geom_info._index);
353 int override = geom_info._geom_net_state->get_override(TextureAttrib::get_class_slot());
354 geom_state = geom_state->add_attrib(new_ta,
override);
359 geom_state = geom_state->add_attrib(ColorAttrib::make_flat(LColor(1.0f, 1.0f, 1.0f, 1.0f)));
366 geom_info._geom_net_state->get_attrib(ColorScaleAttrib::get_class_slot());
368 if (attrib !=
nullptr) {
369 geom_state = geom_state->add_attrib
370 (attrib->invert_compose(ColorScaleAttrib::make_identity()));
377 const RenderAttrib *ra = geom_info._state->get_attrib(TexMatrixAttrib::get_class_slot());
385 tex_mat = tex_mat->compose(TransformState::make_pos_hpr_scale
386 (LVecBase3(uv_trans[0], uv_trans[1], 0.0f),
387 LVecBase3(0.0f, 0.0f, 0.0f),
388 LVecBase3(uv_scale[0], uv_scale[1], 1.0f)));
390 if (tex_mat->is_identity()) {
392 geom_state = geom_state->remove_attrib(TexMatrixAttrib::get_class_slot());
396 (_target_stage, tex_mat->invert_compose(TransformState::make_identity()));
397 geom_state = geom_state->add_attrib(new_tma);
401 geom_info._geom_node->set_geom_state(geom_info._index, geom_state);
409 GeomNodeList::const_iterator gni;
410 for (gni = _geom_node_list.begin(); gni != _geom_node_list.end(); ++gni) {
411 const GeomNodeInfo &geom_node_info = (*gni);
414 geom_node_info._state->get_attrib(TextureAttrib::get_class_slot());
415 geom_node_info._geom_node->apply_attribs_to_vertices
416 (attribs, SceneGraphReducer::TT_tex_matrix, transformer);
424 void MultitexReducer::
427 if (grutil_cat.is_debug()) {
429 <<
"scan_geom_node(" << *node <<
", " << *state <<
", "
430 << *transform <<
")\n";
433 _geom_node_list.push_back(GeomNodeInfo(state, node));
436 for (
int gi = 0; gi < num_geoms; gi++) {
440 if (grutil_cat.is_debug()) {
442 <<
"geom " << gi <<
" net_state =\n";
443 geom_net_state->write(std::cerr, 2);
450 attrib = geom_net_state->get_attrib(TextureAttrib::get_class_slot());
451 if (attrib !=
nullptr) {
458 geom_state = geom_state->remove_attrib(TextureAttrib::get_class_slot());
465 int override = geom_net_state->get_override(TextureAttrib::get_class_slot());
467 geom_state = geom_state->add_attrib(ta,
override);
473 attrib = geom_net_state->get_attrib(TexMatrixAttrib::get_class_slot());
474 if (attrib !=
nullptr) {
478 StageList stage_list;
481 for (
int si = 0; si < num_stages; si++) {
485 stage_list.push_back(StageInfo(stage, ta, tma));
489 <<
"Ignoring invalid texture stage " << stage->
get_name() <<
"\n";
493 if (stage_list.size() >= 2) {
494 record_stage_list(stage_list, GeomInfo(state, geom_net_state, node, gi));
503 void MultitexReducer::
505 const MultitexReducer::GeomInfo &geom_info) {
506 if (grutil_cat.is_debug()) {
508 <<
"record_stage_list for " << geom_info._geom_node->get_name() <<
" g"
509 << geom_info._index <<
":\n";
510 StageList::const_iterator si;
511 for (si = stage_list.begin(); si != stage_list.end(); ++si) {
512 const StageInfo &stage_info = (*si);
513 grutil_cat.debug(
false)
514 <<
" " << *stage_info._stage <<
" " << *stage_info._tex
515 <<
" " << *stage_info._tex_mat <<
"\n";
519 _stages[stage_list].push_back(geom_info);
526 size_t MultitexReducer::
528 for (
size_t si = 0; si < stage_list.size(); si++) {
529 const StageInfo &stage_info = stage_list[si];
530 if (stage_info._stage == _target_stage) {
544 bool MultitexReducer::
545 determine_uv_range(LTexCoord &min_uv, LTexCoord &max_uv,
546 const MultitexReducer::StageInfo &model_stage,
548 const InternalName *model_name = model_stage._stage->get_texcoord_name();
549 bool got_any =
false;
551 GeomList::const_iterator gi;
552 for (gi = geom_list.begin(); gi != geom_list.end(); ++gi) {
553 const GeomInfo &geom_info = (*gi);
556 geom_info._geom_node->get_geom(geom_info._index)->make_copy();
560 if (format->has_column(model_name)) {
563 if (!texcoord.is_at_end()) {
564 const LVecBase2 &uv = texcoord.get_data2();
566 min_uv = max_uv = uv;
570 min_uv.set(min(min_uv[0], uv[0]), min(min_uv[1], uv[1]));
571 max_uv.set(max(max_uv[0], uv[0]), max(max_uv[1], uv[1]));
574 while (!texcoord.is_at_end()) {
575 const LVecBase2 &uv = texcoord.get_data2();
576 min_uv.set(min(min_uv[0], uv[0]), min(min_uv[1], uv[1]));
577 max_uv.set(max(max_uv[0], uv[0]), max(max_uv[1], uv[1]));
584 min_uv.set(0.0f, 0.0f);
585 max_uv.set(1.0f, 1.0f);
598 void MultitexReducer::
599 get_uv_scale(LVecBase2 &uv_scale, LVecBase2 &uv_trans,
600 const LTexCoord &min_uv,
const LTexCoord &max_uv)
const {
601 if (max_uv[0] != min_uv[0]) {
602 uv_scale[0] = (max_uv[0] - min_uv[0]);
607 if (max_uv[1] != min_uv[1]) {
608 uv_scale[1] = (max_uv[1] - min_uv[1]);
613 uv_trans[0] = (min_uv[0] + max_uv[0]) / 2.0f - uv_scale[0] * 0.5f;
614 uv_trans[1] = (min_uv[1] + max_uv[1]) / 2.0f - uv_scale[1] * 0.5f;
621 void MultitexReducer::
622 choose_texture_size(
int &x_size,
int &y_size,
623 const MultitexReducer::StageInfo &model_stage,
624 const LVecBase2 &uv_scale,
626 Texture *model_tex = model_stage._tex;
636 LVecBase3 inherited_scale = model_stage._tex_mat->get_scale();
638 PN_stdfloat u_scale = cabs(inherited_scale[0]) * uv_scale[0];
639 if (u_scale != 0.0f) {
640 while (u_scale >= 2.0f) {
644 while (u_scale <= 0.5f && x_size > 0) {
650 PN_stdfloat v_scale = cabs(inherited_scale[1]) * uv_scale[1];
651 if (v_scale != 0.0f) {
652 while (v_scale >= 2.0f) {
656 while (v_scale <= 0.5f && y_size > 0) {
662 if (x_size == 0 || y_size == 0) {
664 <<
"Texture size " << model_tex->
get_x_size() <<
" "
666 << model_stage._tex_mat->get_scale() <<
", reduced to size "
667 << x_size <<
" " << y_size <<
"; constraining to 1 1.\n";
673 if (max_texture_dimension > 0) {
674 x_size = min(x_size, (
int)max_texture_dimension);
675 y_size = min(y_size, (
int)max_texture_dimension);
681 if (win_x_size != 0 && x_size > win_x_size) {
683 while (x_size > win_x_size) {
689 if (win_y_size != 0 && y_size > win_y_size) {
691 while (y_size > win_y_size) {
701 void MultitexReducer::
702 make_texture_layer(
const NodePath &render,
703 const MultitexReducer::StageInfo &stage_info,
705 const LTexCoord &min_uv,
const LTexCoord &max_uv,
706 bool force_use_geom,
bool transparent_base) {
709 switch (stage_info._stage->get_mode()) {
710 case TextureStage::M_normal:
711 case TextureStage::M_normal_height:
712 case TextureStage::M_glow:
713 case TextureStage::M_gloss:
714 case TextureStage::M_height:
715 case TextureStage::M_selector:
716 case TextureStage::M_normal_gloss:
717 case TextureStage::M_emission:
721 case TextureStage::M_modulate_glow:
722 case TextureStage::M_modulate_gloss:
723 case TextureStage::M_modulate:
724 cba = ColorBlendAttrib::make
725 (ColorBlendAttrib::M_add, ColorBlendAttrib::O_fbuffer_color,
726 ColorBlendAttrib::O_zero);
729 case TextureStage::M_decal:
730 if(transparent_base) {
731 cba = AlphaTestAttrib::make
732 (AlphaTestAttrib::M_greater, 0.0f);
734 cba = ColorBlendAttrib::make
735 (ColorBlendAttrib::M_add, ColorBlendAttrib::O_incoming_alpha,
736 ColorBlendAttrib::O_one_minus_incoming_alpha);
740 case TextureStage::M_blend:
741 cba = ColorBlendAttrib::make
742 (ColorBlendAttrib::M_add, ColorBlendAttrib::O_constant_color,
743 ColorBlendAttrib::O_one_minus_incoming_color,
744 stage_info._stage->get_color());
747 case TextureStage::M_replace:
748 cba = ColorBlendAttrib::make_off();
751 case TextureStage::M_add:
752 cba = ColorBlendAttrib::make
753 (ColorBlendAttrib::M_add, ColorBlendAttrib::O_one,
754 ColorBlendAttrib::O_one);
757 case TextureStage::M_combine:
759 switch (stage_info._stage->get_combine_rgb_mode()) {
760 case TextureStage::CM_modulate:
762 TextureStage::CombineSource source0 = stage_info._stage->get_combine_rgb_source0();
763 TextureStage::CombineSource source1 = stage_info._stage->get_combine_rgb_source1();
767 if (source1 < source0) {
768 source0 = stage_info._stage->get_combine_rgb_source1();
769 source1 = stage_info._stage->get_combine_rgb_source0();
772 if (source0 == TextureStage::CS_primary_color &&
773 source1 == TextureStage::CS_previous) {
779 }
else if (source0 == TextureStage::CS_texture &&
780 source1 == TextureStage::CS_constant) {
782 cba = ColorBlendAttrib::make
783 (ColorBlendAttrib::M_add, ColorBlendAttrib::O_constant_color,
784 ColorBlendAttrib::O_zero, stage_info._stage->get_color());
786 }
else if (source0 == TextureStage::CS_texture &&
787 source1 == TextureStage::CS_previous) {
789 cba = ColorBlendAttrib::make
790 (ColorBlendAttrib::M_add, ColorBlendAttrib::O_fbuffer_color,
791 ColorBlendAttrib::O_zero);
806 case TextureStage::M_blend_color_scale:
808 cba = ColorBlendAttrib::make
809 (ColorBlendAttrib::M_add, ColorBlendAttrib::O_constant_color,
810 ColorBlendAttrib::O_one_minus_incoming_color,
811 stage_info._stage->get_color());
817 if (!force_use_geom && stage_info._stage->get_texcoord_name() == _target_stage->get_texcoord_name()) {
820 CardMaker cm(stage_info._tex->get_name());
821 cm.set_uv_range(min_uv, max_uv);
822 cm.set_has_uvs(
true);
823 cm.set_frame(min_uv[0], max_uv[0], min_uv[1], max_uv[1]);
833 transfer_geom(geom_node, stage_info._stage->get_texcoord_name(),
838 geom.
set_color(LColor(1.0f, 1.0f, 1.0f, 1.0f));
841 if (!stage_info._tex_mat->is_identity()) {
855 void MultitexReducer::
858 bool preserve_color) {
860 GeomList::const_iterator gi;
861 for (gi = geom_list.begin(); gi != geom_list.end(); ++gi) {
862 const GeomInfo &geom_info = (*gi);
863 const Geom *orig_geom = geom_info._geom_node->get_geom(geom_info._index);
870 geom->set_vertex_data(geom->get_animated_vertex_data(
true, current_thread));
875 vdata->set_usage_hint(Geom::UH_stream);
877 if (vdata->has_column(_target_stage->get_texcoord_name())) {
879 GeomVertexReader texcoord(vdata, _target_stage->get_texcoord_name(), current_thread);
881 while (!texcoord.is_at_end()) {
882 const LVecBase2 &tc = texcoord.get_data2();
883 vertex.set_data3(tc[0], 0.0f, tc[1]);
887 if (texcoord_name !=
nullptr &&
888 texcoord_name != InternalName::get_texcoord()) {
892 vdata->get_format()->get_column(texcoord_name);
893 if (column !=
nullptr) {
894 vdata = vdata->replace_column
897 geom->set_vertex_data(vdata);
901 while (!from.is_at_end()) {
902 to.add_data2(from.get_data2());
907 CPT(
RenderState) geom_state = RenderState::make_empty();
908 if (preserve_color) {
910 const RenderAttrib *ca = geom_info._geom_net_state->get_attrib(ColorAttrib::get_class_slot());
912 geom_state = geom_state->add_attrib(ca);
914 const RenderAttrib *csa = geom_info._geom_net_state->get_attrib(ColorScaleAttrib::get_class_slot());
915 if (csa !=
nullptr) {
916 geom_state = geom_state->add_attrib(csa);
920 geom_node->
add_geom(geom, geom_state);
932 void MultitexReducer::
934 int &num_colors)
const {
935 GeomList::const_iterator gi;
936 for (gi = geom_list.begin(); gi != geom_list.end() && num_colors < 2; ++gi) {
937 const GeomInfo &geom_info = (*gi);
940 bool has_flat_color =
false;
941 bool has_vertex_color =
false;
943 LColor color_scale(1.0f, 1.0f, 1.0f, 1.0f);
944 const RenderAttrib *csa = geom_info._geom_net_state->get_attrib(ColorScaleAttrib::get_class_slot());
945 if (csa !=
nullptr) {
952 ColorAttrib::Type color_type = ColorAttrib::T_vertex;
953 const RenderAttrib *ca = geom_info._geom_net_state->get_attrib(ColorAttrib::get_class_slot());
955 color_type = DCAST(
ColorAttrib, ca)->get_color_type();
958 if (color_type == ColorAttrib::T_flat) {
961 has_flat_color =
true;
963 }
else if (color_type == ColorAttrib::T_vertex) {
965 const Geom *geom = geom_info._geom_node->get_geom(geom_info._index);
966 if (geom->get_vertex_data()->has_column(InternalName::get_color())) {
969 has_vertex_color =
true;
973 if (has_vertex_color) {
976 }
else if (has_flat_color) {
977 flat_color.set(flat_color[0] * color_scale[0],
978 flat_color[1] * color_scale[1],
979 flat_color[2] * color_scale[2],
980 flat_color[3] * color_scale[3]);
982 if (num_colors == 0) {
984 geom_color = flat_color;
986 }
else if (!flat_color.almost_equal(geom_color)) {
998 bool MultitexReducer::
1000 StageList::const_iterator si;
1001 for (si = stage_list.begin(); si != stage_list.end(); ++si) {
1002 const StageInfo &stage_info = (*si);
1004 if (stage_info._stage->get_mode() == TextureStage::M_decal) {
1016 MultitexReducer::StageInfo::
1023 if (tma->has_stage(stage)) {
1024 _tex_mat = tma->get_transform(stage);
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.
This class is used by the SceneGraphReducer to maintain and accumulate the set of attributes we have ...
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
This class generates 2-d "cards", that is, rectangular polygons, particularly useful for showing text...
Indicates what color should be applied to renderable geometry.
Applies a scale to colors in the scene graph and on vertices.
has_scale
Returns true if the ColorScaleAttrib has a non-identity scale, false otherwise (in which case it migh...
get_scale
Returns the scale to be applied to colors.
A rectangular subregion within a window for rendering into.
set_camera
Sets the camera that is associated with this DisplayRegion.
A node that holds Geom objects, renderable pieces of geometry.
void add_geom(Geom *geom, const RenderState *state=RenderState::make_empty())
Adds a new Geom to the node.
get_num_geoms
Returns the number of geoms in the node.
get_geom_state
Returns the RenderState associated with the nth geom of the node.
void set_geom_state(int n, const RenderState *state)
Changes the RenderState associated with the nth geom of the node.
This defines how a single column is interleaved within a vertex array stored within a Geom.
NumericType get_numeric_type() const
Returns the token representing the numeric type of the data storage.
Contents get_contents() const
Returns the token representing the semantic meaning of the stored value.
int get_num_components() const
Returns the number of components of the column: the number of instances of the NumericType in each el...
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
This object provides a high-level interface for quickly reading a sequence of numeric values from a v...
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
A container for geometry primitives.
virtual Geom * make_copy() const
Returns a newly-allocated Geom that is a shallow copy of this one.
This is a base class for the various different classes that represent the result of a frame of render...
set_one_shot
Changes the current setting of the one-shot flag.
DisplayRegion * make_display_region()
Creates a new DisplayRegion that covers the entire window.
int get_y_size() const
Returns the visible height of the window or buffer, if it is known.
int get_x_size() const
Returns the visible width of the window or buffer, if it is known.
virtual Texture * get_texture(int i=0) const
Returns the nth texture into which the GraphicsOutput renders.
Encodes a string name in a hash table, mapping it to a pointer.
A base class for any number of different kinds of lenses, linear and otherwise.
void clear()
Removes the record of nodes that were previously discovered by scan().
void scan(const NodePath &node)
Starts scanning the hierarchy beginning at the indicated node.
void set_use_geom(bool use_geom)
Indicates whether the actual geometry will be used to generate the textures.
void set_target(TextureStage *stage)
Specifies the target TextureStage (and InternalName) that will be left on each multitexture node afte...
void flatten(GraphicsOutput *window)
Actually performs the reducing operations on the nodes that were previously scanned.
void set_allow_tex_mat(bool allow_tex_mat)
Indicates whether the resulting texture should be expected to be animated beyond its current range vi...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
void set_depth_write(bool depth_write, int priority=0)
Specifically sets or disables the writing to the depth buffer on this particular node.
void set_texture(Texture *tex, int priority=0)
Adds the indicated texture to the list of textures that will be rendered on the default texture stage...
void set_tex_transform(TextureStage *stage, const TransformState *transform)
Sets the texture matrix on the current node to the indicated transform for the given stage.
PandaNode * node() const
Returns the referenced node of the path.
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0)
Applies a scene-graph color to the referenced node.
void set_depth_test(bool depth_test, int priority=0)
Specifically sets or disables the testing of the depth buffer on this particular node.
NodePath attach_new_node(PandaNode *node, int sort=0, Thread *current_thread=Thread::get_current_thread()) const
Attaches a new node, with or without existing parents, to the scene graph below the referenced node o...
void set_bin(const std::string &bin_name, int draw_order, int priority=0)
Assigns the geometry at this level and below to the named rendering bin.
void set_two_sided(bool two_sided, int priority=0)
Specifically sets or disables two-sided rendering mode on this particular node.
PandaNode * get_child(size_t n) const
Returns the nth child of the node.
size_t get_num_children() const
Returns the number of children of the node.
A basic node of the scene graph or data graph.
virtual bool is_geom_node() const
A simple downcast check.
set_state
Sets the complete RenderState that will be applied to all nodes at this level and below.
void set_attrib(const RenderAttrib *attrib, int override=0)
Adds the indicated render attribute to the scene graph on this node.
get_children
Returns an object that can be used to walk through the list of children of the node.
This is the base class for a number of render attributes (other than transform) that may be set on sc...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
Applies a transform matrix to UV's before they are rendered.
Indicates the set of TextureStages and their associated Textures that should be applied to (or remove...
get_num_on_stages
Returns the number of stages that are turned on by the attribute.
get_on_texture
Returns the texture associated with the indicated stage, or NULL if no texture is associated.
get_on_stage
Returns the nth stage turned on by the attribute, sorted in render order.
Defines the properties of a named stage of the multitexture pipeline.
get_default
Returns the default TextureStage that will be used for all texturing that does not name a particular ...
get_name
Returns the name of this texture stage.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
get_minfilter
Returns the filter mode of the texture for minification.
set_anisotropic_degree
Specifies the level of anisotropic filtering to apply to the texture.
get_anisotropic_degree
Returns the degree of anisotropic filtering that should be applied to the texture.
get_y_size
Returns the height of the texture image in texels.
get_magfilter
Returns the filter mode of the texture for magnification.
set_minfilter
Sets the filtering method that should be used when viewing the texture from a distance.
set_magfilter
Sets the filtering method that should be used when viewing the texture up close.
get_x_size
Returns the width of the texture image in texels.
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.
This is our own Panda specialization on the default STL vector.
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.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.