1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

New lightmapper

-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
This commit is contained in:
Juan Linietsky
2020-05-01 09:34:23 -03:00
parent 6a0473bcc2
commit 1bea8e1eac
434 changed files with 126122 additions and 3384 deletions

View File

@@ -337,10 +337,14 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) {
} break;
case OBJECT_INTERNAL_RESOURCE: {
uint32_t index = f->get_32();
String path = res_path + "::" + itos(index);
if (use_nocache) {
r_v = internal_resources[index].cache;
if (!internal_index_cache.has(path)) {
WARN_PRINT(String("Couldn't load resource (no cache): " + path).utf8().get_data());
}
r_v = internal_index_cache[path];
} else {
String path = res_path + "::" + itos(index);
RES res = ResourceLoader::load(path);
if (res.is_null()) {
WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data());
@@ -720,13 +724,15 @@ Error ResourceLoaderBinary::load() {
if (!main) {
path = internal_resources[i].path;
if (path.begins_with("local://")) {
path = path.replace_first("local://", "");
subindex = path.to_int();
path = res_path + "::" + path;
}
if (!use_nocache) {
path = internal_resources[i].path;
if (path.begins_with("local://")) {
path = path.replace_first("local://", "");
subindex = path.to_int();
path = res_path + "::" + path;
}
if (ResourceCache::has(path)) {
//already loaded, don't do anything
@@ -769,7 +775,7 @@ Error ResourceLoaderBinary::load() {
r->set_subindex(subindex);
if (!main) {
internal_resources.write[i].cache = res;
internal_index_cache[path] = res;
}
int pc = f->get_32();