Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Making PolyVox into a header-only library
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=627
Page 2 of 2

Author:  milliams [ Thu Feb 12, 2015 6:20 pm ]
Post subject:  Re: Making PolyVox into a header-only library

David Williams wrote:
If it's easy to install the tests and examples then it wouldn't hurt (as it shows that things work properly) but it's not essential. If they were being installed before then it's probably just a case of uncommenting the right lines.
We can easily install the examples but I'm not sure if it makes sense to install the tests. I guess it doesn't hurt though.

David Williams wrote:
Ok, well I didn't update this file so that probably needs doing, but the changes shouldn't be too great
I will look into that once I've been over the other things.

David Williams wrote:
milliams wrote:
Along with the OpenGL 3 and Qt 5 updates you've made, it's all seeming much more modern and neat.
You did the work here, I just merged the changes :-)
Whoops, I didn't mean to compliment myself :)

David Williams wrote:
I think we also have the option of updating to CMake 3 if it helps. I'm not saying we should, but it wouldn't affect users so much now the library is header only.
CMake 3 is just an incremental update on 2.8. There's no real fundamental difference so we can probably just start requiring it when we need it.

David Williams wrote:
Yep, I'll get this fixed.
Cool beans.

Author:  David Williams [ Sat Feb 14, 2015 8:42 am ]
Post subject:  Re: Making PolyVox into a header-only library

milliams wrote:
David Williams wrote:
If it's easy to install the tests and examples then it wouldn't hurt (as it shows that things work properly) but it's not essential. If they were being installed before then it's probably just a case of uncommenting the right lines.
We can easily install the examples but I'm not sure if it makes sense to install the tests. I guess it doesn't hurt though.


Thinking about it more I'm not sure there's any real benefit to installing the tests and examples (it appears this was only done on Windows anyway). The source code is more interesting to users, and the examples/tests running doesn't really prove much as there are no PolyVox library issues to worry about anyway.

milliams wrote:
I have noticed that due to some CMake confusion (possibly due to a merge conflict), the DecodeOnGPU example is not being built and as a result you missed it when converting the code. You need to add "ADD_SUBDIRECTORY(examples/DecodeOnGPU)" to the list in the main CMakeLists.txt file and not the one in the examples directory (as that one currently does nothing -- though I am planning on changing that). I would fix the code myself but you were working on this more recently and so probably have a better idea about how it should work.


This is proving slightly more complex than I imagined as the DecodeOnGPU example doesn't compile anymore. When using Qt for OpenGL we subclass QOpenGLFunctions_3_1 which gives us access to the gl...() functions only inside our derived class. But real OpenGL uses free functions which can be called anywhere, and the DecodeOnGPU example does this. It requires a bit of refactoring, but as mentioned I wanted to do this anyway to make use of the example framework outside of PolyVox.

Author:  holocronweaver [ Sat Mar 07, 2015 10:59 pm ]
Post subject:  Re: Making PolyVox into a header-only library

Does this change mean that find_package(PolyVox) will no longer work in CMake, even if PolyVox was installed into the system? If so, I will probably switch to using PolyVox as a git submodule in my projects. Probably something I should have been doing anyways.

Author:  milliams [ Sun Mar 08, 2015 4:38 pm ]
Post subject:  Re: Making PolyVox into a header-only library

holocronweaver wrote:
Does this change mean that find_package(PolyVox) will no longer work in CMake, even if PolyVox was installed into the system? If so, I will probably switch to using PolyVox as a git submodule in my projects. Probably something I should have been doing anyways.


find_package() will still work as it will provide a PolyVox_HEADERS variable or similar which can be used in your project. However, for many cases, it will be simpler to just link directly to a git repo (either with git submodule or cloned separately).

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/