2022-03-17 22:33:22 +01:00
|
|
|
#ifndef PROP_TEXTURE_JOB
|
|
|
|
#define PROP_TEXTURE_JOB
|
2023-12-17 22:59:50 +01:00
|
|
|
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
#include "scene/resources/texture.h"
|
|
|
|
|
2022-09-10 04:16:50 +02:00
|
|
|
#include "core/os/thread_pool_job.h"
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-08-17 13:45:14 +02:00
|
|
|
#include "core/object/reference.h"
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-10-05 10:25:48 +02:00
|
|
|
#include "modules/modules_enabled.gen.h"
|
|
|
|
|
|
|
|
#ifdef MODULE_TEXTURE_PACKER_ENABLED
|
2022-03-15 13:29:32 +01:00
|
|
|
class TexturePacker;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class PropTextureJob : public ThreadPoolJob {
|
|
|
|
GDCLASS(PropTextureJob, ThreadPoolJob);
|
|
|
|
|
|
|
|
public:
|
2022-10-05 10:25:48 +02:00
|
|
|
#ifdef MODULE_TEXTURE_PACKER_ENABLED
|
2022-03-15 13:29:32 +01:00
|
|
|
Ref<TexturePacker> get_merger();
|
|
|
|
void set_merger(const Ref<TexturePacker> &merger);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void _execute();
|
|
|
|
|
|
|
|
PropTextureJob();
|
|
|
|
~PropTextureJob();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
2022-10-05 10:25:48 +02:00
|
|
|
#ifdef MODULE_TEXTURE_PACKER_ENABLED
|
2022-03-15 13:29:32 +01:00
|
|
|
Ref<TexturePacker> _merger;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|