summaryrefslogtreecommitdiff
path: root/servers/visual_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual_server.cpp')
-rw-r--r--servers/visual_server.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 17d5b16b9f..9ec02f5071 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -355,8 +355,12 @@ void VisualServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("texture_get_flags"),&VisualServer::texture_get_flags );
ObjectTypeDB::bind_method(_MD("texture_get_width"),&VisualServer::texture_get_width );
ObjectTypeDB::bind_method(_MD("texture_get_height"),&VisualServer::texture_get_height );
+
+ ObjectTypeDB::bind_method(_MD("texture_set_shrink_all_x2_on_set_data","shrink"),&VisualServer::texture_set_shrink_all_x2_on_set_data );
+
#ifndef _3D_DISABLED
+
ObjectTypeDB::bind_method(_MD("shader_create","mode"),&VisualServer::shader_create,DEFVAL(SHADER_MATERIAL));
ObjectTypeDB::bind_method(_MD("shader_set_mode","shader","mode"),&VisualServer::shader_set_mode);
@@ -556,7 +560,7 @@ void VisualServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("draw"),&VisualServer::draw);
ObjectTypeDB::bind_method(_MD("sync"),&VisualServer::sync);
- ObjectTypeDB::bind_method(_MD("free"),&VisualServer::free);
+ ObjectTypeDB::bind_method(_MD("free_rid"),&VisualServer::free);
ObjectTypeDB::bind_method(_MD("set_default_clear_color"),&VisualServer::set_default_clear_color);
@@ -701,10 +705,10 @@ void VisualServer::_bind_methods() {
}
-void VisualServer::_canvas_item_add_style_box(RID p_item, const Rect2& p_rect, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate) {
+void VisualServer::_canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate) {
ERR_FAIL_COND(p_margins.size()!=4);
- canvas_item_add_style_box(p_item, p_rect, p_texture,Vector2(p_margins[0],p_margins[1]),Vector2(p_margins[2],p_margins[3]),true,p_modulate);
+ canvas_item_add_style_box(p_item,p_rect,p_source,p_texture,Vector2(p_margins[0],p_margins[1]),Vector2(p_margins[2],p_margins[3]),true,p_modulate);
}
void VisualServer::_camera_set_orthogonal(RID p_camera,float p_size,float p_z_near,float p_z_far) {
@@ -753,7 +757,6 @@ void VisualServer::mesh_add_surface_from_mesh_data( RID p_mesh, const Geometry::
}
}
- int s = mesh_get_surface_count(p_mesh);
Array d;
d.resize(VS::ARRAY_MAX);
d[ARRAY_VERTEX]=vertices;
@@ -818,5 +821,3 @@ VisualServer::~VisualServer() {
singleton=NULL;
}
-
-