Chapter 08 issues
rongcuid opened this issue · comments
These are the list of issues I found as I followed along chap 08
- Refers to
loadModel
asloadMeshes
ModelData
constructor change is not explained- In Texture class,
stbi_image_free()
should probably be called inside the try-resource block - The book doesn't mention which package each class belongs to
- "in teh future"
transformModels()
missing definition oftextureList
- There might be missing description about removal of
vulkanMeshList
fromVulkanModel
I might add more as I go along.
Other issues:
DescriptorPool::cleanup
code not actually listed- There are quite a few
log4j
references, both in this chapter and in previous chapters. I assume it was later replaced bytinylog
? UniformDescriptorSetLayout
is not mentioned, so is samplerprojMatrixDescriptorSet
written asmatrixDescriptorSet
- Several quoted changes for
Render
class does not actually change
I am at the end now (with some bugs which I need to investigate if it is my fault)
Apparently, in processMaterial
, the texturePath
read back from aiTexturePath
is empty, causing texture read to fail.
Additionally, when that is the case, the ModelData.Material
struct is created with empty texture, when it should use the path of the default texture.
Never mind, Windows added .txt
behind .mtl
, so assimp failed to load the material. With that said, this error shouldn't occur even if the default texture is loaded.
I suggest removing the if (hasTexture)
check in VulkanModel::transformMaterial
, because the default texture is always loaded if the correct image is nor found on disk.
I've just uploaded a fix for most of the issues. Regarding the hasTexture check I would prefer to leave it like this by now. Please check and close it if you agree.