mirror of
https://github.com/Relintai/props.git
synced 2024-11-12 10:15:25 +01:00
Fix compile without ThreadPool. (Removed a half finished class from the build.)
This commit is contained in:
parent
0ed644e4a4
commit
bfb60df215
2
SCsub
2
SCsub
@ -25,7 +25,7 @@ sources = [
|
||||
|
||||
"prop_instance.cpp",
|
||||
"prop_ess_entity.cpp",
|
||||
"prop_instance_job.cpp",
|
||||
# "prop_instance_job.cpp",
|
||||
|
||||
"prop_scene_instance.cpp",
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "../mesh_data_resource/nodes/mesh_data_instance.h"
|
||||
|
||||
#include "../thread_pool/thread_pool.h"
|
||||
//#include "../thread_pool/thread_pool.h"
|
||||
|
||||
#include "core/engine.h"
|
||||
|
||||
@ -61,7 +61,7 @@ void PropInstance::bake() {
|
||||
_baking = true;
|
||||
_bake_queued = false;
|
||||
|
||||
_job->clear();
|
||||
//_job->clear();
|
||||
|
||||
for (int i = 0; i < _mesh_data_instances.size(); ++i) {
|
||||
MeshDataInstance *md = _mesh_data_instances.get(i);
|
||||
@ -83,12 +83,12 @@ void PropInstance::bake() {
|
||||
sp = Object::cast_to<Spatial>(sp->get_parent());
|
||||
}
|
||||
|
||||
_job->add_mesh_instance(t, mdr, md->get_texture());
|
||||
//_job->add_mesh_instance(t, mdr, md->get_texture());
|
||||
}
|
||||
|
||||
if (_job->get_mesh_instance_count() > 0) {
|
||||
ThreadPool::get_singleton()->add_job(_job);
|
||||
}
|
||||
//if (_job->get_mesh_instance_count() > 0) {
|
||||
// ThreadPool::get_singleton()->add_job(_job);
|
||||
//}
|
||||
}
|
||||
|
||||
void PropInstance::bake_finished() {
|
||||
@ -148,12 +148,12 @@ PropInstance::PropInstance() {
|
||||
_bake_queued = false;
|
||||
_snap_to_mesh = false;
|
||||
_snap_axis = Vector3(0, -1, 0);
|
||||
_job.instance();
|
||||
//_job.instance();
|
||||
//_job->connect("completed", this, "bake_finished", Vector<Variant>(), Object::CONNECT_DEFERRED);
|
||||
}
|
||||
PropInstance::~PropInstance() {
|
||||
_mesh_data_instances.clear();
|
||||
_job.unref();
|
||||
//_job.unref();
|
||||
_prop_data.unref();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
|
||||
#include "core/math/vector3.h"
|
||||
|
||||
#include "prop_instance_job.h"
|
||||
//#include "prop_instance_job.h"
|
||||
|
||||
#include "props/prop_data.h"
|
||||
|
||||
@ -81,7 +81,7 @@ private:
|
||||
bool _snap_to_mesh;
|
||||
Vector3 _snap_axis;
|
||||
Vector<MeshDataInstance *> _mesh_data_instances;
|
||||
Ref<PropInstanceJob> _job;
|
||||
//Ref<PropInstanceJob> _job;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -34,7 +34,7 @@ SOFTWARE.
|
||||
#include "prop_ess_entity.h"
|
||||
#include "prop_instance.h"
|
||||
|
||||
#include "prop_instance_job.h"
|
||||
//#include "prop_instance_job.h"
|
||||
|
||||
#include "prop_scene_instance.h"
|
||||
|
||||
@ -59,7 +59,7 @@ void register_props_types() {
|
||||
|
||||
ClassDB::register_class<PropESSEntity>();
|
||||
|
||||
ClassDB::register_class<PropInstanceJob>();
|
||||
//ClassDB::register_class<PropInstanceJob>();
|
||||
|
||||
ClassDB::register_class<PropSceneInstance>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user