summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/rasterizer.h7
-rw-r--r--servers/visual/visual_server_raster.cpp2
-rw-r--r--servers/visual/visual_server_raster.h7
3 files changed, 9 insertions, 7 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index ff679bc15f..12cf30cfc4 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -163,11 +163,12 @@ public:
virtual RID texture_create() = 0;
virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT) = 0;
- virtual void texture_set_data(RID p_texture, const Image &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) = 0;
- virtual Image texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const = 0;
+ virtual void texture_set_data(RID p_texture, const Ref<Image> &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) = 0;
+ virtual Ref<Image> texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const = 0;
virtual void texture_set_flags(RID p_texture, uint32_t p_flags) = 0;
virtual uint32_t texture_get_flags(RID p_texture) const = 0;
virtual Image::Format texture_get_format(RID p_texture) const = 0;
+ virtual uint32_t texture_get_texid(RID p_texture) const = 0;
virtual uint32_t texture_get_width(RID p_texture) const = 0;
virtual uint32_t texture_get_height(RID p_texture) const = 0;
virtual void texture_set_size_override(RID p_texture, int p_width, int p_height) = 0;
@@ -931,7 +932,7 @@ public:
virtual RasterizerCanvas *get_canvas() = 0;
virtual RasterizerScene *get_scene() = 0;
- virtual void set_boot_image(const Image &p_image, const Color &p_color, bool p_scale) = 0;
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) = 0;
virtual void initialize() = 0;
virtual void begin_frame() = 0;
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 5ba975d193..2fdff29f0a 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -121,7 +121,7 @@ int VisualServerRaster::get_render_info(RenderInfo p_info) {
/* TESTING */
-void VisualServerRaster::set_boot_image(const Image &p_image, const Color &p_color, bool p_scale) {
+void VisualServerRaster::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {
redraw_request();
VSG::rasterizer->set_boot_image(p_image, p_color, p_scale);
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 7de497d529..95806a2e1a 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -623,11 +623,12 @@ public:
BIND0R(RID, texture_create)
BIND5(texture_allocate, RID, int, int, Image::Format, uint32_t)
- BIND3(texture_set_data, RID, const Image &, CubeMapSide)
- BIND2RC(Image, texture_get_data, RID, CubeMapSide)
+ BIND3(texture_set_data, RID, const Ref<Image> &, CubeMapSide)
+ BIND2RC(Ref<Image>, texture_get_data, RID, CubeMapSide)
BIND2(texture_set_flags, RID, uint32_t)
BIND1RC(uint32_t, texture_get_flags, RID)
BIND1RC(Image::Format, texture_get_format, RID)
+ BIND1RC(uint32_t, texture_get_texid, RID)
BIND1RC(uint32_t, texture_get_width, RID)
BIND1RC(uint32_t, texture_get_height, RID)
BIND3(texture_set_size_override, RID, int, int)
@@ -1109,7 +1110,7 @@ public:
/* TESTING */
- virtual void set_boot_image(const Image &p_image, const Color &p_color, bool p_scale);
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale);
virtual void set_default_clear_color(const Color &p_color);
virtual bool has_feature(Features p_feature) const;