mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
keep attrib and trans separate
This commit is contained in:
parent
22177f130f
commit
747f247745
@ -132,8 +132,9 @@ make_copy() const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PGEntry::
|
||||
draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
const AllAttributesWrapper &attrib) {
|
||||
PGItem::draw_item(top, gsg, attrib);
|
||||
const AllAttributesWrapper &attrib,
|
||||
const AllTransitionsWrapper &trans) {
|
||||
PGItem::draw_item(top, gsg, attrib, trans);
|
||||
update_text();
|
||||
update_cursor();
|
||||
|
||||
@ -143,7 +144,7 @@ draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
// of the text.
|
||||
DirectRenderTraverser drt(gsg, RenderRelation::get_class_type());
|
||||
drt.set_view_frustum_cull(false);
|
||||
drt.traverse(_text_render_root, attrib, AllTransitionsWrapper());
|
||||
drt.traverse(_text_render_root, attrib, trans);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -46,7 +46,8 @@ public:
|
||||
virtual Node *make_copy() const;
|
||||
|
||||
virtual void draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
const AllAttributesWrapper &attrib);
|
||||
const AllAttributesWrapper &attrib,
|
||||
const AllTransitionsWrapper &trans);
|
||||
|
||||
virtual void press(const MouseWatcherParameter ¶m);
|
||||
|
||||
|
@ -200,7 +200,8 @@ activate_region(PGTop *, const LMatrix4f &transform, int sort) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PGItem::
|
||||
draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
const AllAttributesWrapper &attrib) {
|
||||
const AllAttributesWrapper &attrib,
|
||||
const AllTransitionsWrapper &trans) {
|
||||
if (has_state_def(get_state())) {
|
||||
// This item has a current state definition that we should use
|
||||
// to render the item.
|
||||
@ -211,11 +212,11 @@ draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
// of the subgraph.
|
||||
DirectRenderTraverser drt(gsg, RenderRelation::get_class_type());
|
||||
drt.set_view_frustum_cull(false);
|
||||
drt.traverse(def, attrib, AllTransitionsWrapper());
|
||||
drt.traverse(def, attrib, trans);
|
||||
|
||||
} else {
|
||||
QuickRenderTraverser qrt(gsg, RenderRelation::get_class_type());
|
||||
qrt.traverse(def, attrib, AllTransitionsWrapper());
|
||||
qrt.traverse(def, attrib, trans);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,8 @@ public:
|
||||
INLINE PGMouseWatcherRegion *get_region() const;
|
||||
|
||||
virtual void draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
const AllAttributesWrapper &attrib);
|
||||
const AllAttributesWrapper &attrib,
|
||||
const AllTransitionsWrapper &trans);
|
||||
|
||||
virtual void enter(const MouseWatcherParameter ¶m);
|
||||
virtual void exit(const MouseWatcherParameter ¶m);
|
||||
|
@ -206,9 +206,7 @@ r_traverse(Node *node, const ArcChain &chain) {
|
||||
AllTransitionsWrapper complete_trans;
|
||||
wrt(pgi, chain.begin(), chain.end(), this,
|
||||
complete_trans, RenderRelation::get_class_type());
|
||||
AllAttributesWrapper render_state;
|
||||
render_state.apply_from(_attrib, complete_trans);
|
||||
pgi->draw_item(this, _gsg, render_state);
|
||||
pgi->draw_item(this, _gsg, _attrib, complete_trans);
|
||||
|
||||
} else if (node->is_of_type(GeomNode::get_class_type())) {
|
||||
_gsg->_geom_nodes_pcollector.add_level(1);
|
||||
|
@ -96,9 +96,10 @@ make_copy() const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PGWaitBar::
|
||||
draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
const AllAttributesWrapper &attrib) {
|
||||
const AllAttributesWrapper &attrib,
|
||||
const AllTransitionsWrapper &trans) {
|
||||
update();
|
||||
PGItem::draw_item(top, gsg, attrib);
|
||||
PGItem::draw_item(top, gsg, attrib, trans);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -42,7 +42,8 @@ public:
|
||||
virtual Node *make_copy() const;
|
||||
|
||||
virtual void draw_item(PGTop *top, GraphicsStateGuardian *gsg,
|
||||
const AllAttributesWrapper &attrib);
|
||||
const AllAttributesWrapper &attrib,
|
||||
const AllTransitionsWrapper &trans);
|
||||
|
||||
PUBLISHED:
|
||||
void setup(float width, float height, float range);
|
||||
|
Loading…
x
Reference in New Issue
Block a user