Commit graph

58 commits

Author SHA1 Message Date
feaf876284 Version bump to 1.1.0 2024-03-19 13:31:36 +09:00
5d431081cf "Vertex Buffers: Index buffer"
TODO: "Uniform Buffers"
At this point, the project is growing beyond drawing a single triangle.
2024-03-19 13:30:21 +09:00
05cf805c03 Suppress some clippy warnings for ffi module
No need to heed clippy warnings on code automatically generated by
bindgen.
2024-03-18 16:37:40 +09:00
6e2e67f086 Refactor macro
More minor refactoring of macro introduced 3 commits ago.
2024-03-18 16:35:25 +09:00
6d3a07975d Minor refactoring of macro
Minor refactoring of macro introduced 2 commits ago.
2024-03-18 16:21:44 +09:00
60fc98f73b Refactor helper macro
Some cleanup of the helper macro introduced in the previous commit.
2024-03-18 16:16:52 +09:00
4f1638904c Use a macro to create cleanup struct helper 2024-03-18 15:04:02 +09:00
f7f428aa28 "Vertex buffers: Staging buffer"
TODO: "Vertex buffers: Index buffer"
https://vulkan-tutorial.com/Vertex_buffers/Index_buffer
2024-03-18 12:29:32 +09:00
3e12361e85 "Staging buffer: Abstracting buffer creation"
TODO: "Staging buffer: Using a staging buffer" and etc.
https://vulkan-tutorial.com/Vertex_buffers/Staging_buffer
2024-03-18 12:03:04 +09:00
9b5a011afc Suppress clippy warning about wordy fn return type 2024-03-17 18:53:55 +09:00
25b80b0d6d Refactor: Fix minor clippy warning 2024-03-17 18:53:07 +09:00
bf1fc24011 Refactor: Split init code into function
Previous implementation originally had "init_vulkan" initialization
struct creation seperated into a different function, but was merged into
"init_vulkan" due to memory issues. More specifically, the struct
creation function used pointers to local variables that were not used
until the function went out of scope, causing the local variables to be
cleaned up and leaving the pointers in the "struct info" struct invalid
when they were actually used in a `ffi::Vk...` call.

This refactoring ensures that pointers to variables created in the
mentioned function does not become invalid when the function ends by
stored the pointees in `Pin<Box<...>>` and returning them with the
"struct info" struct at the end of the mentioned function.
2024-03-17 18:46:01 +09:00
c6ee60de02 Refactor: Define types used by Vertex 2024-03-15 17:19:55 +09:00
4c1da84490 Refactoring: Make some functions "const" in Vertex 2024-03-15 17:04:00 +09:00
17cb9ddbc4 Minor refactoring
Use "Vector" instead of "math3d::Vector" since it is included via `use`.
2024-03-15 15:58:45 +09:00
7ddc39b42d Suppress "dead_code" warning in math3d.rs 2024-03-15 15:52:18 +09:00
612f7dc8da WIP "Vertex buffers: Vertex buffer creation"
TODO: "Vertex buffers: Staging buffer"
https://vulkan-tutorial.com/Vertex_buffers/Staging_buffer
2024-03-15 15:51:23 +09:00
07b384a6c7 WIP "Vertex buffers: Vertex input description"
TODO: "Vertex buffer creation"
https://vulkan-tutorial.com/Vertex_buffers/Vertex_buffer_creation

Note that triangle drawing doesn't work at this stage.
2024-03-15 15:51:12 +09:00
fa26784e01 Handle window minimization
Implemented as mentioned in the "Swap chain recreation" page in the
tutorial.
2024-03-14 13:19:28 +09:00
f52c9029bc Handle resizing window
This recreates the swap-chain if the window is resized, as mentioned in
"Swap chain recreation".

(Note that the "Drawing: Frames in flight" step in the tutorial was
skipped.)
2024-03-14 13:15:12 +09:00
e82aa002c4 Minor refactoring 2024-03-14 12:27:44 +09:00
511a5589db Change default presentation mode to "FIFO"
Resolves #1.
2024-03-14 12:23:44 +09:00
29c8a08720 Minor refactorings 2024-03-13 15:03:09 +09:00
3b9a9bcd37 WIP "Drawing: Rendering and presentation"
Note that at this point, a Triangle is now drawn to the window. However,
there are some chapters remaining in the tutorial for other details.

TODO: "Drawing: Frames in flight"
https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Frames_in_flight
2024-03-13 14:53:05 +09:00
f46710337a Minor refactoring 2024-03-13 13:58:30 +09:00
d9b1f1dbe8 WIP "Drawing: Command Buffers"
TODO: "Drawing: Rendering and presentation"
2024-03-13 13:55:57 +09:00
9651b338f3 WIP "Drawing: Framebuffers"
TODO: "Drawing: Command buffers"
https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Command_buffers
2024-03-13 13:17:51 +09:00
fa9c52ac10 WIP "Graphics pipeline basics: Conclusion"
TODO "Drawing: Framebuffers"
https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Framebuffers
2024-03-13 13:03:24 +09:00
0ea1243ddc WIP: "Graphics pipeline basics: Render passes"
TODO: "Graphics pipeline basics: Conclusion"
https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Conclusion
2024-03-13 12:07:51 +09:00
1def795b77 Bugfix: Do not error on --release mode
Check for "validation layers" should not panic in `--release` mode
(which is enabled for debug mode).
2024-03-12 16:49:15 +09:00
6b3c83d913 Refactoring: Use more Result instead of panic 2024-03-12 16:45:33 +09:00
425a0ae501 WIP "Graphics pipeline basics: Fixed functions"
TODO: "Graphics pipeline basics: Render passes"
https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Render_passes
2024-03-12 15:40:40 +09:00
3aa79ef21a WIP: "Graphics pipeline basics: Shader modules"
TODO: "Graphics pipeline basics: Fixed functions"
https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Fixed_functions
2024-03-12 14:22:57 +09:00
41dbff12c3 Minor fixes/refactorings 2024-03-06 12:27:53 +09:00
a576fe4188 WIP impl "Image views"
TODO: "Graphics pipeline basics: Introduction"
https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Introduction
2024-03-06 12:18:49 +09:00
87d2071d09 Minor fix/refactoring 2024-03-06 12:06:56 +09:00
73160af503 WIP impl "Retrieving the swap chain images"
TODO: "Image views"
https://vulkan-tutorial.com/Drawing_a_triangle/Presentation/Image_views
2024-03-06 11:58:52 +09:00
2b80642ae8 Minor fix/refactoring 2024-03-05 18:27:37 +09:00
dd676d762e WIP impl create swap chain
TODO: "Retrieving the swap chain images"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Presentation/Swap_chain#page_Creating-the-swap-chain
2024-03-05 18:02:49 +09:00
c8289cc8dc WIP impl helpers for choosing swap chain settings
TODO: "Creating the swap chain"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Presentation/Swap_chain
2024-03-05 17:39:59 +09:00
cc275989b1 WIP impl "Querying details of swap chain support"
TODO: "Choosing the right settings for the swap chain"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Presentation/Swap_chain
2024-03-05 17:21:28 +09:00
2d8ded2111 Move ffi module to separate file 2024-03-05 17:03:33 +09:00
66be063ce0 WIP impl "Enabling device extensions"
TODO: "Querying details of swap chain support"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Presentation/Swap_chain
2024-03-05 17:01:57 +09:00
d49b8acede WIP impl "Checking for swap chain support"
TODO: next is "Enabling device extensions"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Presentation/Swap_chain
2024-03-05 16:56:17 +09:00
5e9b12a0a2 WIP setup "window surface", "presentation queue"
TODO: "swap chain"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Presentation/Swap_chain
2024-03-05 16:27:01 +09:00
62c01acc7a WIP impl. create glfw window surface
Minor `cargo fmt` fix.

TODO: "Querying for presentation support"
https://vulkan-tutorial.com/Drawing_a_triangle/Presentation/Window_surface
2024-03-05 15:58:33 +09:00
ac88544d2f WIP impl. "logical device and queues"
TODO: "Presentation: Window surface"
https://vulkan-tutorial.com/Drawing_a_triangle/Presentation/Window_surface
2024-03-05 15:50:32 +09:00
81ff94485f WIP: Split off "create instance" code into fn
TODO: "Logical device and queues"
https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Logical_device_and_queues
2024-03-05 15:28:06 +09:00
6194b4c1f2 WIP impl. "Queue Family" checking
TODO: "Logical device and queues"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Setup/Logical_device_and_queues
2024-03-05 14:09:38 +09:00
e67fae00d6 WIP "Physical devices and queue families"
TODO: "Queue families"
https://vulkan-tutorial.com/en/Drawing_a_triangle/Setup/Physical_devices_and_queue_families
2024-03-05 13:52:25 +09:00