From f999f52f0af98ad37f0a837f25786513e2862f79 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 5 Aug 2022 11:59:58 +0200 Subject: Add a Framebuffer cache Adds a FramebufferCache singletion that operates the same way as UniformSetCache. Allows creating framebuffers on the fly (and keep them cached if re-requested) such as: ```C++ RID fb = FramebufferCache::get_singleton()->get_cache(texture1,texture2); ``` --- servers/rendering/rendering_device.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'servers/rendering/rendering_device.cpp') diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp index 0b76bb3051..c07a783302 100644 --- a/servers/rendering/rendering_device.cpp +++ b/servers/rendering/rendering_device.cpp @@ -387,6 +387,7 @@ void RenderingDevice::_bind_methods() { ClassDB::bind_method(D_METHOD("framebuffer_create_multipass", "textures", "passes", "validate_with_format", "view_count"), &RenderingDevice::_framebuffer_create_multipass, DEFVAL(INVALID_FORMAT_ID), DEFVAL(1)); ClassDB::bind_method(D_METHOD("framebuffer_create_empty", "size", "samples", "validate_with_format"), &RenderingDevice::framebuffer_create_empty, DEFVAL(TEXTURE_SAMPLES_1), DEFVAL(INVALID_FORMAT_ID)); ClassDB::bind_method(D_METHOD("framebuffer_get_format", "framebuffer"), &RenderingDevice::framebuffer_get_format); + ClassDB::bind_method(D_METHOD("framebuffer_is_valid", "framebuffer"), &RenderingDevice::framebuffer_is_valid); ClassDB::bind_method(D_METHOD("sampler_create", "state"), &RenderingDevice::_sampler_create); -- cgit v1.2.3