Skip to content

Commit 7bdd05b

Browse files
WIP
1 parent bd592c7 commit 7bdd05b

File tree

8 files changed

+399
-355
lines changed

8 files changed

+399
-355
lines changed

dependencies/imgui/imgui_impl_vulkan.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ bool ImGui_ImplVulkan_CreateDeviceObjects()
980980
info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
981981
info.bindingCount = 1;
982982
info.pBindings = &binding;
983+
info.flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT;
983984
err = vkCreateDescriptorSetLayout(v->Device, &info, bd->Allocator, &bd->TextureDescriptorSetLayout);
984985
check_vk_result(err);
985986
}
@@ -994,6 +995,7 @@ bool ImGui_ImplVulkan_CreateDeviceObjects()
994995
info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
995996
info.bindingCount = 1;
996997
info.pBindings = &binding;
998+
info.flags = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT;
997999
err = vkCreateDescriptorSetLayout(v->Device, &info, bd->Allocator, &bd->SamplerDescriptorSetLayout);
9981000
check_vk_result(err);
9991001
}
@@ -1004,7 +1006,7 @@ bool ImGui_ImplVulkan_CreateDeviceObjects()
10041006
pool_sizes[1] = { VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1 };
10051007
VkDescriptorPoolCreateInfo pool_info = {};
10061008
pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
1007-
pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
1009+
pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT | VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT;
10081010
pool_info.maxSets = 2;
10091011
pool_info.poolSizeCount = 2;
10101012
pool_info.pPoolSizes = pool_sizes;

docs/version.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,17 @@ the API is complete. It just means we won't break what currently exists.
8282
* Compression v1.0.0 (pl_compress_ext.h)
8383
* Virtual File System v1.0.0 (pl_vfs_ext.h)
8484
* ECS v1.0.0 (pl_ecs_ext.h)
85+
* DDS v1.0.0 (pl_dds_ext.h)
86+
* Resource v1.0.0 (pl_resource_ext.h)
8587

8688
## Nearly Stable Extensions
8789

88-
* Resource v0.2.2 (pl_resource_ext.h)
8990
* Bvh v0.2.0 (pl_bvh_ext.h)
9091
* Physics v0.2.0 (pl_physics_ext.h)
9192
* Collision v0.2.0 (pl_collision_ext.h)
9293
* Mesh v0.1.0 (pl_mesh_ext.h)
9394
* Mesh Builder v0.1.0 (pl_mesh_ext.h)
9495
* Shader Variant v0.2.0 (pl_shader_variant_ext.h)
95-
* DDS v0.2.0 (pl_dds_ext.h)
9696

9797
## Unstable Extensions
9898

editor/app.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,9 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
476476
gptRenderer->load_skybox_from_panorama(ptAppData->ptScene, "/environments/helipad.hdr", 1024);
477477

478478
plModelLoaderData tLoaderData0 = {0};
479-
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/models/gltf/humanoid/model.gltf", NULL, &tLoaderData0);
480-
gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/models/gltf/humanoid/floor.gltf", NULL, &tLoaderData0);
481-
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/Sponza/glTF/Sponza.gltf", NULL, &tLoaderData0);
479+
gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/models/gltf/humanoid/model.gltf", NULL, &tLoaderData0);
480+
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/models/gltf/humanoid/floor.gltf", NULL, &tLoaderData0);
481+
gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/Sponza/glTF/Sponza.gltf", NULL, &tLoaderData0);
482482
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/models/gltf/sort.gltf", NULL, &tLoaderData0);
483483
// plMat4 tRotation = pl_mat4_rotate_xyz(-PL_PI_2, 0.0f, 1.0f, 0.0f);
484484
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/CarConcept/glTF/CarConcept.gltf", &tRotation, &tLoaderData0);
@@ -488,7 +488,8 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
488488
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/TextureTransformTest/glTF/TextureTransformTest.gltf", NULL, &tLoaderData0);
489489
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/TextureTransformMultiTest/glTF/TextureTransformMultiTest.gltf", NULL, &tLoaderData0);
490490
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/TransmissionTest/glTF/TransmissionTest.gltf", NULL, &tLoaderData0);
491-
gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf", NULL, &tLoaderData0);
491+
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf", NULL, &tLoaderData0);
492+
// gptModelLoader->load_gltf(ptAppData->ptComponentLibrary, "/gltf/BoxTextured/glTF/BoxTextured.gltf", NULL, &tLoaderData0);
492493
gptRenderer->add_drawable_objects_to_scene(ptAppData->ptScene, tLoaderData0.uObjectCount, tLoaderData0.atObjects);
493494
gptModelLoader->free_data(&tLoaderData0);
494495
gptRenderer->finalize_scene(ptAppData->ptScene);

editor/editor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
162162
gptVfs->mount_directory("/shaders", "../shaders", PL_VFS_MOUNT_FLAGS_NONE);
163163
gptVfs->mount_directory("/shader-temp", "../shader-temp", PL_VFS_MOUNT_FLAGS_NONE);
164164
gptFile->create_directory("../shader-temp");
165+
gptFile->create_directory("../cache");
165166

166167
// defaults
167168
ptAppData->tSelectedEntity.uData = UINT64_MAX;

extensions/pl_dds_ext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Index of this file:
5555
// [SECTION] APIs
5656
//-----------------------------------------------------------------------------
5757

58-
#define plDdsI_version {0, 2, 0}
58+
#define plDdsI_version {1, 0, 0}
5959

6060
//-----------------------------------------------------------------------------
6161
// [SECTION] includes

extensions/pl_model_loader_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ pl__load_gltf_texture(const char* pcPath, plTextureSlot tSlot, const cgltf_textu
424424

425425
pl_str_get_file_name_only(ptTexture->texture->image->mime_type, pcNext, 4);
426426
strcpy(ptMaterial->atTextureMaps[tSlot].acName, acResourceName);
427+
// ptMaterial->atTextureMaps[tSlot].tResource = gptResource->load_ex(acResourceName, PL_RESOURCE_LOAD_FLAG_BLOCK_COMPRESSED, (uint8_t*)pucActualBuffer, ptTexture->texture->image->buffer_view->size, pcPath, 0);
427428
ptMaterial->atTextureMaps[tSlot].tResource = gptResource->load_ex(acResourceName, PL_RESOURCE_LOAD_FLAG_BLOCK_COMPRESSED, (uint8_t*)pucActualBuffer, ptTexture->texture->image->buffer_view->size, pcPath, 0);
428429
}
429430
else if(strncmp(ptTexture->texture->image->uri, "data:", 5) == 0)
@@ -457,7 +458,6 @@ pl__load_gltf_texture(const char* pcPath, plTextureSlot tSlot, const cgltf_textu
457458
char acFilepath[2048] = {0};
458459
strcpy(acFilepath, pcDirectory);
459460
pl_str_concatenate(acFilepath, ptMaterial->atTextureMaps[tSlot].acName, acFilepath, 2048);
460-
// ptMaterial->atTextureMaps[tSlot].tResource = gptResource->load(acFilepath, PL_RESOURCE_LOAD_FLAG_BLOCK_COMPRESSED);
461461
ptMaterial->atTextureMaps[tSlot].tResource = gptResource->load(acFilepath, PL_RESOURCE_LOAD_FLAG_BLOCK_COMPRESSED);
462462
}
463463
}

0 commit comments

Comments
 (0)