Ability to create local RenderingDevice instances.

This commit is contained in:
Juan Linietsky
2020-04-18 20:30:57 -03:00
parent 9690a60c21
commit 49d0c6a5c9
7 changed files with 270 additions and 79 deletions
+3 -1
View File
@@ -60,5 +60,7 @@ Vector<uint8_t> RenderingDevice::shader_compile_from_source(ShaderStage p_stage,
}
RenderingDevice::RenderingDevice() {
singleton = this;
if (singleton == nullptr) { // there may be more rendering devices later
singleton = this;
}
}
+5
View File
@@ -1024,6 +1024,11 @@ public:
virtual uint32_t get_frame_delay() const = 0;
virtual void submit() = 0;
virtual void sync() = 0;
virtual RenderingDevice *create_local_device() = 0;
static RenderingDevice *get_singleton();
RenderingDevice();
};