-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simplified framework options exposed to user and added aggregate-like initialization. #51
base: master
Are you sure you want to change the base?
Conversation
…odified vku.hpp with helper classes to be similar to designated initializers
Looks cool, but something has happened and lots of files show conflicts. |
My local branch had become out of sync with this master branch. The conflicts should be gone now. |
@andy-thomason would you please grant commit rights to @pocdn |
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. |
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. |
…nstrated in new example computeDisplay
…n graphics pipeline
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"