lwjglgamedev / vulkanbook

Online book which introduces the main concepts required to write graphics games or any other applications using Vulkan in Java by using the LWJGL library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chapter 08 issues

rongcuid opened this issue · comments

These are the list of issues I found as I followed along chap 08

  1. Refers to loadModel as loadMeshes
  2. ModelData constructor change is not explained
  3. In Texture class, stbi_image_free() should probably be called inside the try-resource block
  4. The book doesn't mention which package each class belongs to
  5. "in teh future"
  6. transformModels() missing definition of textureList
  7. There might be missing description about removal of vulkanMeshList from VulkanModel

I might add more as I go along.

Other issues:

  1. DescriptorPool::cleanup code not actually listed
  2. There are quite a few log4j references, both in this chapter and in previous chapters. I assume it was later replaced by tinylog?
  3. UniformDescriptorSetLayout is not mentioned, so is sampler
  4. projMatrixDescriptorSet written as matrixDescriptorSet
  5. 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.