diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-07-22 09:59:56 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-07-22 09:59:56 -0300 |
commit | e4cd01ac8cc885ee5429a309a6db458eed22a85d (patch) | |
tree | 3cd5dc20b051e05c7a350c866d607d93955b7d20 /scene/3d | |
parent | 12472534ec644fbffa0d15b0ab199f41abefc324 (diff) |
Make texture parameter optional in begin() of ImmediateGeometry. Closes #5676 and closes #5720
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/immediate_geometry.cpp | 2 | ||||
-rw-r--r-- | scene/3d/immediate_geometry.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp index 4964582be4..e83fa69b4f 100644 --- a/scene/3d/immediate_geometry.cpp +++ b/scene/3d/immediate_geometry.cpp @@ -149,7 +149,7 @@ void ImmediateGeometry::add_sphere(int p_lats,int p_lons,float p_radius) { void ImmediateGeometry::_bind_methods() { - ObjectTypeDB::bind_method(_MD("begin","primitive","texture:Texture"),&ImmediateGeometry::begin); + ObjectTypeDB::bind_method(_MD("begin","primitive","texture:Texture"),&ImmediateGeometry::begin,DEFVAL(Ref<Texture>())); ObjectTypeDB::bind_method(_MD("set_normal","normal"),&ImmediateGeometry::set_normal); ObjectTypeDB::bind_method(_MD("set_tangent","tangent"),&ImmediateGeometry::set_tangent); ObjectTypeDB::bind_method(_MD("set_color","color"),&ImmediateGeometry::set_color); diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h index 28b5735ca8..1fd00cb94e 100644 --- a/scene/3d/immediate_geometry.h +++ b/scene/3d/immediate_geometry.h @@ -47,7 +47,7 @@ protected: public: - void begin(Mesh::PrimitiveType p_primitive,const Ref<Texture>& p_texture); + void begin(Mesh::PrimitiveType p_primitive,const Ref<Texture>& p_texture=Ref<Texture>()); void set_normal(const Vector3& p_normal); void set_tangent(const Plane& p_tangent); void set_color(const Color& p_color); |