-
Notifications
You must be signed in to change notification settings - Fork 308
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
Is there some proper documentation somewhere? #926
Comments
@Falkgaard You're absolutely right, the documentation on the new stuff in the namespace
The
That
First of all, the UniqueHandles don't follow the RAII-paradigm. You have to assign them some result from a function (like |
@asuessenbach In what respect does |
With #1001, some kind of programming guide for the raii-wrapper classes has been added. |
I'm sorry, but I still don't get it. Why would |
Maybe I have the answer to my own question: does |
After a little more experimenting, I got a dl linking error (I'm on Linux) when instantiating
That starts to make a little more sense now. After adding dl as a library in my build, I could link without error, and removing Vulkan as a linked library did not trigger any new linking error. I'm guessing I will be able to continue working without explicitly linking Vulkan, although I'm not exactly sure how the decision to use dynamic linking at runtime is actually made. |
@amosnier The |
Could I also use this issue to ask about what enhanced mode does or changes? The README doesn't really explain what it is. |
@JasonQiu1 You're right, that's missing in the README. I'll add a few words about it...
|
Is it correct/safe to use a local class Test {
public:
void init() {
vk::raii::Context context;
auto& applicationInfo = vk::ApplicationInfo().setApiVersion(VK_API_VERSION_1_3);
auto& instanceCreateInfo = vk::InstanceCreateInfo().setPApplicationInfo(&applicationInfo);
m_instance = std::make_unique<vk::raii::Instance>(context, instanceCreateInfo);
}
private:
std::unique_ptr<vk::raii::Instance> m_instance = nullptr;
} |
No, that will not work. You need to hold the |
In addition, can you add some comparison between unique handles and raii? The pros and cons of each one, etc. |
So far I've only been able to find the repo readme and the examples, but I feel like the examples are poorly documented... for example, what's a vk::raii::Context for? What's the vk::raii::su namespace and what does su even stand for? Why is it nested into raii? What's the different between the raii namespace stuff and UniqueHandles (aren't they supposed to clean up using RAII)? etc etc (and this is pretty much just the unanswered questions from the first raii example). Is there a doxygen page somewhere or something? I went into file RAII_Samples/utils/utils.hpp to check if it's commented there somewhere, but that file was pretty much devoid of comments (especially in regards to the questions above).
The text was updated successfully, but these errors were encountered: