simplified framework options exposed to user and added aggregate-like initialization.#51
Open
pocdn wants to merge 47 commits into
Open
simplified framework options exposed to user and added aggregate-like initialization.#51pocdn wants to merge 47 commits into
pocdn wants to merge 47 commits into
Conversation
added 3 commits
February 13, 2022 13:46
…odified vku.hpp with helper classes to be similar to designated initializers
Collaborator
|
Looks cool, but something has happened and lots of files show conflicts. |
Collaborator
Author
|
My local branch had become out of sync with this master branch. The conflicts should be gone now. |
Collaborator
|
@andy-thomason would you please grant commit rights to @pocdn |
Owner
|
I've added @pocdn as a collablorator. If there is anything else that is required. Please say so. If this was an organisation, I could grant admin rights, but I'm not sure how to do that in a user repo. We could create an organisation and transfer the repo there if that helps. |
Owner
|
I'm overwhelmed that you all have found this useful. The Vulkan API does not make it easy to get started, which was the primary motive for doing this. |
added 14 commits
December 6, 2024 15:30
…nstrated in new example computeDisplay
…n graphics pipeline
Replaced two hardcoded 3-element arrays (myFrameBufferPass and myRpbi) with std::vector sized dynamically to swapchainImageCount, fixing a crash when the swapchain has fewer than 3 images. * include/vku/vku_framework.hpp Fixed the draw() method to use imageIndex (acquired swapchain slot) instead of currentFrame (CPU ring counter) when indexing commandBufferFences_, framebuffers_, staticDrawBuffers_, and the dynamic lambda, preventing rendering to the wrong swapchain image when the two counters diverge * include/vku/vku_framework_sdl2.hpp Add vku_framework_sdl2.hpp: GLFW-free variant of vku_framework.hpp for SDL2 builds Removes the GLFW Window constructor and GLFW/native headers while retaining the non-GLFW Window constructor and the unchanged Framework class.
added 22 commits
April 24, 2026 04:45
…ree deprecated symbols
…dUpmlCompute example
…_GLFW, VKU_SDL2, or VKU_NO_WINDOW, added an SDL_Window* constructor to vku::Window, and updated all examples and project files
…Scattering2017.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposing to the user the Instance and Device at Framework level caused some examples to stop working.
// Initialize makers
vku::InstanceMaker im{};
im.defaultLayers();
vku::DeviceMaker dm{};
dm.defaultLayers();
The fix is to instead expose Framework high-level options only
// Define framework options
vku::FrameworkOptions fo = {
.useCompute = false;
.useTessellationShader = false;
.useGeometryShader = false;
.useMultiView = false;
};
and not expose "im" and and "dm" to the user directly. The reason is that all the possible options of those two require commensurate code changes beyond just specifying their member variables and more vk::code changes inside vku_framework.hpp.
The newer compilers didn't flag correctly error of using aggregate initilizers when a constructor is user defined. However, the consequence affected the uses of
vku::Window
vk::Viewport
vk::RenderPassBeginInfo
vk::CommandPoolCreateInfo
The fix was to create thin "Maker" wrappers around all these except vku::Window. There wasn't really much benefit for vku::Window. For the other three the code was returned to a more aggregate-like use case with benefit of allowing setting of internal variables in any order unlike actual c++20 aggregate initializers.
prior:
Note, the above can still be used if user likes but now the more aggregate-like use case is also possible (and used in all examples):
And an example/swirltexture was added.
Two minor changes related to external libraries which give annoying warnings that could be easily fixed.
external/gilgamesh/mesh.hpp ... simply add a missing return statements, added this proposal to original gilgamesh project.
external/glm/detail/type_half.inl ... latest glm actually does this change from "f *= f" to "f = f * f"