diff options
Diffstat (limited to 'servers/visual_server.h')
-rw-r--r-- | servers/visual_server.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/servers/visual_server.h b/servers/visual_server.h index 7accc7d904..aa98d47455 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -32,6 +32,7 @@ #include "bsp_tree.h" #include "geometry.h" +#include "image.h" #include "math_2d.h" #include "object.h" #include "rid.h" @@ -106,13 +107,14 @@ public: }; virtual RID texture_create() = 0; - RID texture_create_from_image(const Image &p_image, uint32_t p_flags = TEXTURE_FLAGS_DEFAULT); // helper + RID texture_create_from_image(const Ref<Image> &p_image, uint32_t p_flags = TEXTURE_FLAGS_DEFAULT); // helper virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = TEXTURE_FLAGS_DEFAULT) = 0; - virtual void texture_set_data(RID p_texture, const Image &p_image, CubeMapSide p_cube_side = CUBEMAP_LEFT) = 0; - virtual Image texture_get_data(RID p_texture, CubeMapSide p_cube_side = CUBEMAP_LEFT) const = 0; + virtual void texture_set_data(RID p_texture, const Ref<Image> &p_image, CubeMapSide p_cube_side = CUBEMAP_LEFT) = 0; + virtual Ref<Image> texture_get_data(RID p_texture, CubeMapSide p_cube_side = 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; @@ -139,10 +141,10 @@ public: virtual void textures_keep_original(bool p_enable) = 0; - /* SKYBOX API */ + /* SKY API */ - virtual RID skybox_create() = 0; - virtual void skybox_set_texture(RID p_skybox, RID p_cube_map, int p_radiance_size) = 0; + virtual RID sky_create() = 0; + virtual void sky_set_texture(RID p_sky, RID p_cube_map, int p_radiance_size) = 0; /* SHADER API */ @@ -587,19 +589,19 @@ public: ENV_BG_CLEAR_COLOR, ENV_BG_COLOR, - ENV_BG_SKYBOX, + ENV_BG_SKY, ENV_BG_CANVAS, ENV_BG_KEEP, ENV_BG_MAX }; virtual void environment_set_background(RID p_env, EnvironmentBG p_bg) = 0; - virtual void environment_set_skybox(RID p_env, RID p_skybox) = 0; - virtual void environment_set_skybox_scale(RID p_env, float p_scale) = 0; + virtual void environment_set_sky(RID p_env, RID p_sky) = 0; + virtual void environment_set_sky_scale(RID p_env, float p_scale) = 0; virtual void environment_set_bg_color(RID p_env, const Color &p_color) = 0; virtual void environment_set_bg_energy(RID p_env, float p_energy) = 0; virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer) = 0; - virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_skybox_contribution = 0.0) = 0; + virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_sky_contribution = 0.0) = 0; //set default SSAO options //set default SSR options @@ -884,7 +886,7 @@ public: virtual void mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data); virtual void mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes); - 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 set_default_clear_color(const Color &p_color) = 0; enum Features { |