diff --git a/direct/src/deadrec/smoothMover.I b/direct/src/deadrec/smoothMover.I index 2e9fad4780..3c6b5171dd 100644 --- a/direct/src/deadrec/smoothMover.I +++ b/direct/src/deadrec/smoothMover.I @@ -23,7 +23,7 @@ */ INLINE bool SmoothMover:: set_pos(const LVecBase3 &pos) { - return set_x(pos[0]) | set_y(pos[1]) | set_z(pos[2]); + return set_pos(pos[0], pos[1], pos[2]); } /** @@ -38,7 +38,10 @@ set_pos(const LVecBase3 &pos) { */ INLINE bool SmoothMover:: set_pos(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) { - return set_x(x) | set_y(y) | set_z(z); + bool x_changed = set_x(x); + bool y_changed = set_y(y); + bool z_changed = set_z(z); + return x_changed || y_changed || z_changed; } /** @@ -98,7 +101,7 @@ set_z(PN_stdfloat z) { */ INLINE bool SmoothMover:: set_hpr(const LVecBase3 &hpr) { - return set_h(hpr[0]) | set_p(hpr[1]) | set_r(hpr[2]); + return set_hpr(hpr[0], hpr[1], hpr[2]); } /** @@ -113,7 +116,10 @@ set_hpr(const LVecBase3 &hpr) { */ INLINE bool SmoothMover:: set_hpr(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) { - return set_h(h) | set_p(p) | set_r(r); + bool h_changed = set_h(h); + bool p_changed = set_p(p); + bool r_changed = set_r(r); + return h_changed || p_changed || r_changed; } /** @@ -173,8 +179,9 @@ set_r(PN_stdfloat r) { */ INLINE bool SmoothMover:: set_pos_hpr(const LVecBase3 &pos, const LVecBase3 &hpr) { - return (set_x(pos[0]) | set_y(pos[1]) | set_z(pos[2]) | - set_h(hpr[0]) | set_p(hpr[1]) | set_r(hpr[2])); + bool pos_changed = set_pos(pos); + bool hpr_changed = set_hpr(hpr); + return pos_changed || hpr_changed; } /** @@ -189,7 +196,9 @@ set_pos_hpr(const LVecBase3 &pos, const LVecBase3 &hpr) { */ INLINE bool SmoothMover:: set_pos_hpr(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) { - return set_x(x) | set_y(y) | set_z(z) | set_h(h) | set_p(p) | set_r(r); + bool pos_changed = set_pos(x, y, z); + bool hpr_changed = set_hpr(h, p, r); + return pos_changed || hpr_changed; } /** diff --git a/panda/src/display/graphicsOutput.cxx b/panda/src/display/graphicsOutput.cxx index e6b27bee36..462a298cc3 100644 --- a/panda/src/display/graphicsOutput.cxx +++ b/panda/src/display/graphicsOutput.cxx @@ -1649,6 +1649,7 @@ CData() { GraphicsOutput::CData:: CData(const GraphicsOutput::CData ©) : _textures(copy._textures), + _textures_seq(copy._textures_seq), _active(copy._active), _one_shot_frame(copy._one_shot_frame), _active_display_regions(copy._active_display_regions), diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 1892cb65fd..e057d78f8e 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -786,6 +786,13 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot, GLCAT.debug() << "Binding texture " << *tex << " to depth attachment.\n"; } + if (slot != RTP_depth_stencil && _rb[RTP_depth_stencil] != 0) { + // We have a depth-stencil renderbuffer bound, delete it first. + // This will automatically unbind it as well. + glgsg->_glDeleteRenderbuffers(1, &(_rb[RTP_depth_stencil])); + _rb[RTP_depth_stencil] = 0; + } + attach_tex(layer, 0, tex, GL_DEPTH_ATTACHMENT_EXT); #ifndef OPENGLES diff --git a/panda/src/pgraph/pandaNode.cxx b/panda/src/pgraph/pandaNode.cxx index a2af9829d6..ed35161954 100644 --- a/panda/src/pgraph/pandaNode.cxx +++ b/panda/src/pgraph/pandaNode.cxx @@ -1861,7 +1861,7 @@ set_bounds(const BoundingVolume *volume) { } /** - * Deprecated. Use set_bounds() instead. + * @deprecated Use set_bounds() instead. */ void PandaNode:: set_bound(const BoundingVolume *volume) { diff --git a/pandatool/src/daeegg/daeCharacter.h b/pandatool/src/daeegg/daeCharacter.h index 97b8aea384..e384c2219e 100644 --- a/pandatool/src/daeegg/daeCharacter.h +++ b/pandatool/src/daeegg/daeCharacter.h @@ -38,10 +38,10 @@ public: struct Joint { INLINE Joint(EggGroup *group, const FCDSceneNode *scene_node) : + _bind_pose(LMatrix4d::ident_mat()), _group(group), _scene_node(scene_node), - _character(nullptr), - _bind_pose(LMatrix4d::ident_mat()) {} + _character(nullptr) {} LMatrix4d _bind_pose; PT(EggGroup) _group;