diff options
Diffstat (limited to 'servers/visual_server.cpp')
-rw-r--r-- | servers/visual_server.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 10f350d667..41837934f4 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -728,7 +728,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_ PoolVector<int>::Read rb = bones.read(); PoolVector<float>::Read rw = weights.read(); - AABB *bptr = r_bone_aabb.ptr(); + AABB *bptr = r_bone_aabb.ptrw(); for (int i = 0; i < vs; i++) { @@ -1347,7 +1347,7 @@ Array VisualServer::_get_array_from_surface(uint32_t p_format, PoolVector<uint8_ const uint16_t *v = (const uint16_t *)&r[j * total_elem_size + offsets[i]]; for (int k = 0; k < 4; k++) { - w[j * 4 + k] = float(v[k] / 65535.0) * 2.0 - 1.0; + w[j * 4 + k] = float(v[k] / 65535.0); } } } else { @@ -1481,7 +1481,7 @@ Array VisualServer::_mesh_surface_get_skeleton_aabb_bind(RID p_mesh, int p_surfa void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("force_sync"), &VisualServer::sync); - ClassDB::bind_method(D_METHOD("force_draw"), &VisualServer::draw); + ClassDB::bind_method(D_METHOD("force_draw"), &VisualServer::draw, DEFVAL(true)); ClassDB::bind_method(D_METHOD("texture_create"), &VisualServer::texture_create); ClassDB::bind_method(D_METHOD("texture_create_from_image", "image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT)); @@ -1658,7 +1658,7 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("free", "rid"), &VisualServer::free); ClassDB::bind_method(D_METHOD("request_frame_drawn_callback", "where", "method", "userdata"), &VisualServer::request_frame_drawn_callback); - ClassDB::bind_method(D_METHOD("draw"), &VisualServer::draw); + ClassDB::bind_method(D_METHOD("draw"), &VisualServer::draw, DEFVAL(true)); ClassDB::bind_method(D_METHOD("sync"), &VisualServer::sync); ClassDB::bind_method(D_METHOD("has_changed"), &VisualServer::has_changed); ClassDB::bind_method(D_METHOD("init"), &VisualServer::init); |