summaryrefslogtreecommitdiff
path: root/scene/resources/default_theme/default_theme.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-06-11 15:43:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 11:53:26 +0100
commit3f335ce3d446372eeb9ed87f7e117099c4d2dd6a (patch)
tree669db7ddb21f328215a9c26e9bdaf2565db8c853 /scene/resources/default_theme/default_theme.cpp
parent9ffe57a10eecf79ab8df2f0497d0387383755df3 (diff)
Texture refactor
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
Diffstat (limited to 'scene/resources/default_theme/default_theme.cpp')
-rw-r--r--scene/resources/default_theme/default_theme.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 00c56e5eb2..5a6a8dc286 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -69,7 +69,7 @@ static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, fl
img->resize(orig_size.x * scale, orig_size.y * scale);
}
- texture->create_from_image(img, ImageTexture::FLAG_FILTER);
+ texture->create_from_image(img);
(*tex_cache)[p_src] = texture;
}
@@ -98,7 +98,7 @@ static Ref<StyleBoxTexture> sb_expand(Ref<StyleBoxTexture> p_sbox, float p_left,
}
template <class T>
-static Ref<Texture> make_icon(T p_src) {
+static Ref<Texture2D> make_icon(T p_src) {
Ref<ImageTexture> texture(memnew(ImageTexture));
Ref<Image> img = memnew(Image(p_src));
@@ -115,7 +115,7 @@ static Ref<Texture> make_icon(T p_src) {
img->convert(Image::FORMAT_RGBA8);
img->resize(orig_size.x * scale, orig_size.y * scale);
}
- texture->create_from_image(img, ImageTexture::FLAG_FILTER);
+ texture->create_from_image(img);
return texture;
}
@@ -169,7 +169,7 @@ static Ref<StyleBox> make_empty_stylebox(float p_margin_left = -1, float p_margi
return style;
}
-void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const Ref<Font> &large_font, Ref<Texture> &default_icon, Ref<StyleBox> &default_style, float p_scale) {
+void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const Ref<Font> &large_font, Ref<Texture2D> &default_icon, Ref<StyleBox> &default_style, float p_scale) {
scale = p_scale;
@@ -464,7 +464,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("completion_scroll_width", "TextEdit", 3);
theme->set_constant("line_spacing", "TextEdit", 4 * scale);
- Ref<Texture> empty_icon = memnew(ImageTexture);
+ Ref<Texture2D> empty_icon = memnew(ImageTexture);
// HScrollBar
@@ -873,7 +873,7 @@ void make_default_theme(bool p_hidpi, Ref<Font> p_font) {
t.instance();
Ref<StyleBox> default_style;
- Ref<Texture> default_icon;
+ Ref<Texture2D> default_icon;
Ref<Font> default_font;
if (p_font.is_valid()) {
default_font = p_font;