Skip to content
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

Add an 'install' capability for Vookoo. #25

Open
FunMiles opened this issue Apr 9, 2020 · 2 comments
Open

Add an 'install' capability for Vookoo. #25

FunMiles opened this issue Apr 9, 2020 · 2 comments

Comments

@FunMiles
Copy link
Contributor

FunMiles commented Apr 9, 2020

I've started to add installation capabilities to the Vookoo CMakeLists.
After a make install, using Vookoo from a project entails adding to the CMakeLists:

find_package(Vookoo REQUIRED)
target_link_libraries(your_target Vookoo::vookoo_interface)

To my partial surprise, make install did install glfw and if one wants to use it (for example to run code like in the examples), one would have:

find_package(Vookoo REQUIRED)
find_package(glfw3 REQUIRED)
target_link_libraries(your_target Vookoo::vookoo_interface glfw)

Actually trying to do exactly that made me realize that the examples depend on glm.
I am not a fan of glm and think it is a big error to use it in Vulkan project if for no other reason that it is geared towards OpenGL y-upward view of the screen coordinate system while Vulkan is y-downward.

Should glm be installed? Ignored? Replaced by a vkm ?
Should I impede glfw3 from installing? Or install only if a find_package(glfw3) fails?

My current source can be found at: https://github.com/FunMiles/Vookoo/tree/installer

@lhog
Copy link
Collaborator

lhog commented Apr 10, 2020

As a personal note: I tend to avoid projects that have too much NIH stuff. One can find a half dozens of semi-complete engines and frameworks with their own implementations of STL, matrix math, smart pointers, etc. My initial attention to Vookoo was due to the fact that it used mostly "standard" libraries. GLM at the moment is too big too fail, same cannot be told about any similar library by a single or a few contributors, no matter how good they are claimed to be.

Y-flip & GLM problem seems to be widely documented over the Internet and should not represent much of the issue. For example:
https://www.saschawillems.de/blog/2019/03/29/flipping-the-vulkan-viewport/
https://github.com/SaschaWillems/Vulkan/blob/master/examples/negativeviewportheight/negativeviewportheight.cpp

@FunMiles
Copy link
Contributor Author

FunMiles commented Apr 10, 2020

@lhog I'll close the glm choice question with this post with one final comment: the example of documentation is actually a typical example of "quick and dirty" that does not talk much about the handedness of the frame systems (With an emphasis on plural because in OpenGL, the normalized coordinate frame system is opposite from the others). glm also is tuned for the various precision of floating points that embedded OpenGL has. Vulkan does not have that to my knowledge. Personally I use Eigen to help me with matrix operations.

I'll conclude that the install should not install glm. I do agree with you that it is outside of the project.
The current install I created doesn't do it right now, and that's probably better that way.

How about the glfw? I was surprised to see that from within the CMake framework, it got automatically installed. For somebody downloading vku for the first time, it might be good to have it installed because the vku_framework references it and is used in the examples. However, if it is already installed, the situation may get confusing or the install may fail (I haven't experienced it though but I have two more machines on which I can experiment). One solution to which I hinted early on would be to check if it is already installed with a find_package(glfw3) and make sure it is not reinstalled if a proper version is found.

PS: glfw is very lightly coupled to vku_framework and could easily be uncoupled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants