summaryrefslogtreecommitdiff
path: root/scene/3d/quad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/quad.cpp')
-rw-r--r--scene/3d/quad.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/scene/3d/quad.cpp b/scene/3d/quad.cpp
index 1a7eeef180..2d433fbb8c 100644
--- a/scene/3d/quad.cpp
+++ b/scene/3d/quad.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -120,7 +120,7 @@ void Quad::_update() {
} else {
configured=true;
}
- VS::get_singleton()->mesh_add_surface(mesh,VS::PRIMITIVE_TRIANGLES,arr);
+ VS::get_singleton()->mesh_add_surface_from_arrays(mesh,VS::PRIMITIVE_TRIANGLES,arr);
pending_update=false;
}
@@ -230,3 +230,7 @@ Quad::Quad() {
configured=false;
}
+
+Quad::~Quad() {
+ VisualServer::get_singleton()->free(mesh);
+}