mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
more assertions
This commit is contained in:
parent
a89acc64a2
commit
8a9fe2a16d
@ -97,6 +97,7 @@ get_combine_radius() const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void SceneGraphReducer::
|
INLINE void SceneGraphReducer::
|
||||||
apply_attribs(PandaNode *node, int attrib_types) {
|
apply_attribs(PandaNode *node, int attrib_types) {
|
||||||
|
nassertv(node != (PandaNode *)NULL);
|
||||||
PStatTimer timer(_apply_collector);
|
PStatTimer timer(_apply_collector);
|
||||||
AccumulatedAttribs attribs;
|
AccumulatedAttribs attribs;
|
||||||
r_apply_attribs(node, attribs, attrib_types, _transformer);
|
r_apply_attribs(node, attribs, attrib_types, _transformer);
|
||||||
@ -115,6 +116,7 @@ apply_attribs(PandaNode *node, int attrib_types) {
|
|||||||
INLINE void SceneGraphReducer::
|
INLINE void SceneGraphReducer::
|
||||||
apply_attribs(PandaNode *node, const AccumulatedAttribs &attribs,
|
apply_attribs(PandaNode *node, const AccumulatedAttribs &attribs,
|
||||||
int attrib_types, GeomTransformer &transformer) {
|
int attrib_types, GeomTransformer &transformer) {
|
||||||
|
nassertv(node != (PandaNode *)NULL);
|
||||||
r_apply_attribs(node, attribs, attrib_types, transformer);
|
r_apply_attribs(node, attribs, attrib_types, transformer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +144,7 @@ apply_attribs(PandaNode *node, const AccumulatedAttribs &attribs,
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE int SceneGraphReducer::
|
INLINE int SceneGraphReducer::
|
||||||
make_compatible_format(PandaNode *root, int collect_bits) {
|
make_compatible_format(PandaNode *root, int collect_bits) {
|
||||||
|
nassertr(root != (PandaNode *)NULL, 0);
|
||||||
PStatTimer timer(_collect_collector);
|
PStatTimer timer(_collect_collector);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
count += r_collect_vertex_data(root, collect_bits, _transformer, true);
|
count += r_collect_vertex_data(root, collect_bits, _transformer, true);
|
||||||
@ -167,6 +170,7 @@ make_compatible_format(PandaNode *root, int collect_bits) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE int SceneGraphReducer::
|
INLINE int SceneGraphReducer::
|
||||||
collect_vertex_data(PandaNode *root, int collect_bits) {
|
collect_vertex_data(PandaNode *root, int collect_bits) {
|
||||||
|
nassertr(root != (PandaNode *)NULL, 0);
|
||||||
PStatTimer timer(_collect_collector);
|
PStatTimer timer(_collect_collector);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
count += r_collect_vertex_data(root, collect_bits, _transformer, false);
|
count += r_collect_vertex_data(root, collect_bits, _transformer, false);
|
||||||
@ -186,6 +190,7 @@ collect_vertex_data(PandaNode *root, int collect_bits) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE int SceneGraphReducer::
|
INLINE int SceneGraphReducer::
|
||||||
make_nonindexed(PandaNode *root, int nonindexed_bits) {
|
make_nonindexed(PandaNode *root, int nonindexed_bits) {
|
||||||
|
nassertr(root != (PandaNode *)NULL, 0);
|
||||||
PStatTimer timer(_make_nonindexed_collector);
|
PStatTimer timer(_make_nonindexed_collector);
|
||||||
return r_make_nonindexed(root, nonindexed_bits);
|
return r_make_nonindexed(root, nonindexed_bits);
|
||||||
}
|
}
|
||||||
@ -203,6 +208,7 @@ make_nonindexed(PandaNode *root, int nonindexed_bits) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void SceneGraphReducer::
|
INLINE void SceneGraphReducer::
|
||||||
premunge(PandaNode *root, const RenderState *initial_state) {
|
premunge(PandaNode *root, const RenderState *initial_state) {
|
||||||
|
nassertv(root != (PandaNode *)NULL);
|
||||||
if (_gsg != (GraphicsStateGuardianBase *)NULL) {
|
if (_gsg != (GraphicsStateGuardianBase *)NULL) {
|
||||||
PStatTimer timer(_premunge_collector);
|
PStatTimer timer(_premunge_collector);
|
||||||
r_premunge(root, initial_state);
|
r_premunge(root, initial_state);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user