Comments (8)
not that I am against it, but what is the advantage on changing parameters from an inherited pipeline over just creating one and changing from the outside?
one possible approach could also be to offer a simple interface as is but then have the ability to fine tune the generated pipeline config for advanced use cases. similar to the way the app is initialized.
auto pipeline = make_graphics_pipeline(app.device);
pipeline.on_create = [](some_struct_with_all_vulkan_pipeline_params& params){
params.input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
}
[EDIT] on_create is probably not quite right. its more something like pre_create
from liblava.
Ideally there'd be a function for setting that, but exposing every possible pipeline state without any sort of abstraction really blows up the interface. Maybe a more general way of allowing this is to make graphics_pipeline
(and any other object with non-exposed Vulkan creation state) not have private, but protected attributes so you can easily inherit from it and then add your desired changes.
from liblava.
Yes. I also don't think it makes sense to wrap every feature into a function. But having access to all settings at the lowest level makes sense for a prototyping library IMO.
from liblava.
I find both ideas quite interesting. Maybe we should first switch private
to protected
to allow inheritance, but also offer to change these attributes from outside in the next step.
from liblava.
one possible approach could also be to offer a simple interface as is but then have the ability to fine tune the generated pipeline config for advanced use cases. similar to the way the app is initialized.
auto pipeline = make_graphics_pipeline(app.device); pipeline.on_create = [](some_struct_with_all_vulkan_pipeline_params& params){ params.input_assembly_state.topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; }
I actually really like that approach 👌
from liblava.
Sounds like an elegant solution to the problem. 🚀
If you have time and want to submit a proposal, just do a PR (link it to #26) and we can discuss the approach.
from liblava.
This PR would solve my problems. I did struggle a bit with consistent naming. Most projects use capital letters for structs and classes. (I dont really care either way) But with lower case I was forced to create the struct create_info and then call the member info.
from liblava.
Yeah! This is the lava_underscore_flow 🖖
from liblava.
Related Issues (20)
- Please support MSYS2 MINGW64 HOT 10
- Queue creation improvements HOT 7
- Independent Project Build Fails - freetype not found HOT 2
- Install Instructions are Incorrect HOT 1
- Optional Dependencies HOT 2
- FBX Loading HOT 4
- HLSL Examples HOT 1
- RAII Abstractions HOT 1
- Latest release can not be built from Release downloads HOT 1
- Single validation error, not critical Linux Nvidia HOT 1
- Outputting fps to a text file? HOT 10
- PresentMon-like frametime logging HOT 2
- Request for compute example HOT 1
- Request for imgui docking HOT 2
- Does cmake ver need to be that high? Raspberry OS on 3.18 HOT 5
- How do I set up a cmake project? HOT 3
- Why can't I see Shader edits reflected in the program? HOT 2
- Add support to supply semaphores to renderer HOT 1
- Unable to take screenshots (how to best extend create methods) HOT 2
- Resize causes crash on Linux (tested with AMD gpu)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liblava.