summaryrefslogtreecommitdiff
path: root/scene/3d/immediate_geometry_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/immediate_geometry_3d.cpp')
-rw-r--r--scene/3d/immediate_geometry_3d.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/immediate_geometry_3d.cpp b/scene/3d/immediate_geometry_3d.cpp
index 7f90176271..7ccfd527a1 100644
--- a/scene/3d/immediate_geometry_3d.cpp
+++ b/scene/3d/immediate_geometry_3d.cpp
@@ -32,8 +32,9 @@
void ImmediateGeometry3D::begin(Mesh::PrimitiveType p_primitive, const Ref<Texture2D> &p_texture) {
RS::get_singleton()->immediate_begin(im, (RS::PrimitiveType)p_primitive, p_texture.is_valid() ? p_texture->get_rid() : RID());
- if (p_texture.is_valid())
+ if (p_texture.is_valid()) {
cached_textures.push_back(p_texture);
+ }
}
void ImmediateGeometry3D::set_normal(const Vector3 &p_normal) {