mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
pipeline: add TypeHandle for CycleData if DO_PIPELINING is set
This helps to identify CycleData when tracking memory usage via MemoryUsage.
This commit is contained in:
parent
0367c73026
commit
582cc2991e
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "config_pipeline.h"
|
||||
#include "cycleData.h"
|
||||
#include "mainThread.h"
|
||||
#include "externalThread.h"
|
||||
#include "genericThread.h"
|
||||
@ -70,6 +71,7 @@ init_libpipeline() {
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
CycleData::init_type();
|
||||
MainThread::init_type();
|
||||
ExternalThread::init_type();
|
||||
GenericThread::init_type();
|
||||
|
@ -13,6 +13,9 @@
|
||||
|
||||
#include "cycleData.h"
|
||||
|
||||
#ifdef DO_PIPELINING
|
||||
TypeHandle CycleData::_type_handle;
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -65,6 +65,22 @@ public:
|
||||
|
||||
virtual TypeHandle get_parent_type() const;
|
||||
virtual void output(std::ostream &out) const;
|
||||
|
||||
#ifdef DO_PIPELINING
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
|
||||
static void init_type() {
|
||||
NodeReferenceCount::init_type();
|
||||
register_type(_type_handle, "CycleData",
|
||||
NodeReferenceCount::get_class_type());
|
||||
}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
#endif
|
||||
};
|
||||
|
||||
INLINE std::ostream &
|
||||
|
Loading…
x
Reference in New Issue
Block a user