Commit Graph

9 Commits

Author SHA1 Message Date
Daxturus 02e283d548
Remove invalid "warn" argument passed to tinyobj::loadObject(...) (#406)
* Update 28_model_loading.cpp

Removed "warn" argument passed to tinyobj::LoadObj(...).

* Update 29_mipmapping.cpp

Removed "warn" argument passed to tinyobj::LoadObj(...).

* Update 30_multisampling.cpp

Removed "warn" argument passed to tinyobj::LoadObj(...).

* Update 08_Loading_models.md

Removed "warn" argument passed to tinyobj::LoadObj(...) from e-book.

* Update 08_Charger_des_modèles.md

Removed "warn" argument passed to tinyobj::LoadObj(...).
2025-05-11 12:26:42 +02:00
Alexander Overvoorde c2483ac168 Update references to primary branch and update a few other things 2023-01-30 21:27:57 +01:00
Alexander Overvoorde 71120ada6c Fix parts of the tutorial that weren't update to match the code (fixes #288) 2022-05-16 21:33:41 +02:00
Alexander Overvoorde 364e69778a Add a note about the rear side of the model (fixes #277) 2022-03-29 18:44:31 +02:00
Charles Giessen 9fe64f9747 Edit tutorial to reset & record command buffers each frame (#255)
* Update tutorial for command buffer re-recording

Means the code now calls recordCommandBuffer every frame instead of ahead of time

Many changes to the structure of chapters 14 & 15, with small changes to subsequent
chapters.

Primary focus was shifting everything away from 'swapchain image count' to
MAX_FRAMES_IN_FLIGHT. This has caused a lot of chapter 15 to need to be rewritten.
Such as: Introducing fences alongside semaphores and not later; Waiting on a fence
at the start of the frame before introducing acquireNextImage; consolidating the
Frames In Flight concepts to apply to command buffers, fences, and semaphores at
the same time.

Chapter 14 saw command buffer allocation reduced to 1 at a time. This allows the
concept of Frames in Flight to not need introduction before having a triangle
drawing on the screen.

* Update introduction to semaphores and fences

Greatly improve the descriptions of semaphores and fences before their
introduction into the code. Provide examples with psuedo code.

By using max_frames_in_flight command buffers & semaphores, we dont
need to keep track of previously sumitted frames' fences and wait
on them "just in case". This removes a lot of the confusion I had
when I first was trying to understand the vulkan update loop.

* Remove accidental code changes

Un-comment vkDeviceWaitIdle and remove resizing of imagesInFlight (which was removed)

* Use uint32_t instead of size_t for currentFrame

* Address typos and fixup changes for re-recording command buffers PR

* Add description of fences needing explicit resetting while semaphores are automatic
* Elaborate on why 2 frames in flight are chosen

* Fix deadlock in resizing from resetting the fence too early

Because acquiring the swapchain image index may cause drawFrame to return early,
it was possible to cause the next vkWaitForFences to deadlock. By delaying fence
resetting till after acquiring, it prevents the deadlock.
2022-02-21 20:55:30 +01:00
Alexander Overvoorde 8843f338cd Replace example 3D model with permissively licensed one
The existing model had a permissive license at the time this tutorial
was written, but the artist has since started selling the model so I've
decided to switch to a different one to respect their wishes.
2020-04-28 22:41:09 +02:00
Alexander Overvoorde 4f8b81d234 Change code to use value initialization 2020-04-19 13:39:36 +02:00
Rémi Verschelde 022c46e598 Code: Use uint32_t for WIDTH and HEIGHT to prevent narrowing conversion
A warning would otherwise be raised from "Swap chain" onward when using
GCC 9.3.0:
```
g++ -std=c++17 -o HelloTriangle main.cpp `pkg-config --static --libs glfw3` -lvulkan
main.cpp: In member function ‘VkExtent2D HelloTriangleApplication::chooseSwapExtent(const VkSurfaceCapabilitiesKHR&)’:
main.cpp:458:40: warning: narrowing conversion of ‘(int)((HelloTriangleApplication*)this)->HelloTriangleApplication::WIDTH’ from ‘int’ to ‘uint32_t’ {aka ‘unsigned int’} [-Wnarrowing]
  458 |             VkExtent2D actualExtent = {WIDTH, HEIGHT};
      |                                        ^~~~~
main.cpp:458:47: warning: narrowing conversion of ‘(int)((HelloTriangleApplication*)this)->HelloTriangleApplication::HEIGHT’ from ‘int’ to ‘uint32_t’ {aka ‘unsigned int’} [-Wnarrowing]
  458 |             VkExtent2D actualExtent = {WIDTH, HEIGHT};
      |                                               ^~~~~~
```
2020-04-07 14:14:02 +02:00
feyleth 7404a3f8a6 add generation for multy language 2019-06-17 18:17:59 +02:00