-
Notifications
You must be signed in to change notification settings - Fork 27
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
WIP: Example 13.BRDF_Explorer #291
Conversation
CEGUI build is integrated in to irrbaw, but don't try it yet, still has some errors. The building process is done, I will have to set correct configurations for CEGUI. |
Proposed changes, please review @devshgraphicsprogramming @Crisspl. In order to link more libs to an example, we'd have to modify So To let example add more libs, the macro can be changed to: Further changes required:
|
Double approved. |
I pushed the changes several hours ago, it appears before the comment because my Windows time is f**ked by Linux. Have just fixed my LVM partitions, relocated and resized, etc so still no code yet. My environment is stable now. From here we can expect frequent code updates. |
Linux can now build CEGUI and base project. |
In the waiting of the IMG loaders, I will use STB image for the time being. |
The progress is still new, I will notify when it's ready to be reviewed. |
According to @Florastamine, Native File Dialogs library has bugs on Linux so he had to replace with Portable File Dialogs, and it works well. Bug description: |
I had to remove this include, it produces conflicts with glew that CEGUI uses. |
Current CMake warning: I have to keep this because of the CMake's nature. The build still works correctly though. In fact, it needs this warning to work. For example:
|
would it work as
? |
Last thing, why is Portable File Dialog a submodule in irr::ext? btw you have permission to put 3rdparty dependencies (even CEGUI) of any extension in the |
Doesn't work. I'll relocate the submodules. |
if we need a later version of CEGUI can you commit that you've pulled a later version of the submodule? |
Yes I know that, just wondering if you've got the correct CEGUI version. Because it (glew linking errors) is strange since that is fixed in latest CEGUI. |
well I reset and force intialized my submodules, what else can i do? |
Could you paste last 5 commits of git log after cd into |
|
Yeah that's an old module. My log is below, notice that the first commit hash is the same as what I pushed: https://github.com/manhnt9/IrrlichtBAW/tree/sRGB/3rdparty/CEGUI
|
Oooh, strange, but the latest commit message should be I think Git is messed up somehow. I'm checking. |
Solved, besides Git URL a submodule needs the branch name if it's not using master as default branch. My CEGUI branch is |
You can pull and try updating the CEGUI module. |
I couldn't pull because despite the pull of the main repo (where the branch is specified) git told me I'm not on a branch when pulling a submodule So I had to pull explicitly, and it told me I'm up to date
Why do I need to mess around with the module manually if you update the submodules file? And after all this I get extra compiler errors + cannot find glew.h . |
For any submodule, you'll have to checkout its branch before pulling.
|
I've done that manually, question is why on earth do I have to do that by myself, shouldn't we all be synced up nicely regarding what branch and revision/commit of a submodule we're using? Especially after a |
I was all up to date and proper. Seems that because the CEGUI deps are not proper targets, after a change of cegui the following happens:
So I needed to delete cache, and do "Configure" with correct extra options from the ground up again. |
The submodule hassle is due to the git mirroring. About the CEGUI CMake cache, yes because CEGUI version has changed. I advise deleting the CEGUI folder generated in build/3rdparty and configure again. Also note that I've tried deleting my build folder and rebuild several times on both Windows and Linux, so it shouldn't meet any serious build problems now. |
Actually OpenSSL building in the source dir is not a problem, because the submodule gets reset and pulled the latest version from the 1.0.2 branch every time it builds ;) Yeah the shaderc thing is a drag, they were supposed to have already fixed it :( I think CEGUI deps should be properly added and statically linked on Linux after we ship BRDF Explorer completely. |
Update: I've experienced #299 when trying to build example 13 in the Release configuration straight away. Nope still same glew linker errors |
Even in Debug build
Are you actually getting your glew from vcpkg or something and not the repo? |
-DCEGUI_BUILD_TOLUAPP=OFF | ||
-DCEGUI_BUILD_XERCES=OFF | ||
-DCEGUI_BUILD_ZLIB=OFF | ||
-DCEGUI_BUILD_EXPAT=ON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #308
I think I found the issue, you're including the dependencies like this
When in-fact they are
|
Damn it, that's not it |
This might be definitely it
sources: |
Now it works, CEGUI needs |
CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES |
Seems not, also the only thing it seems to control is whether to define
No idea how thats possible, maybe you're actually loading glew from a system installed dll. |
Also funny story |
Tested on Windows and Linux. Merged as its 99% complete, further work should be done on a new PR (the helper refactoring etc.) |
#279
MSVC 2019 will be supported first, then Linux GCC.
Changes to irrbaw:
${IRR_PARALLEL_BUILD_JOBS}
, you can use for subprojects tooDevSH's CMake guidelines (copied from Discord chat)
my main guideline for CMake and modules etc
is that build system is not allowed to make files etc outside of the build directory
with the SOLE exception of OpenSSL
also stuff installed SHOULD only be irrlicht headers and irrlicht static lib, there might be a legitimate reason to go against this
dependencies should not install together with that (which means they must be statically linked so they are inside irrlicht lib) - example, none of libpng, libjpeg etc are visible to the outside nor are they installed
the only exception is a dependency of an irr::ext (since irr::ext can be enabled and disabled separately from the main lib, and main lib never actually includes and links extensions)
then headers CAN install (if necessary) to $INSTALL_PREFIX/include/irr/ext/YOUR_EXT_NAME/3rdparty/YOUR_EXTS_3RDPARTY_DEPENDENCY
the library CAN install to $INSTALL_PREFIX/lib/irr/ext/YOUR_EXT_NAME/3rdparty/YOUR_EXTS_3RDPARTY_DEPENDENCY (but why do it if it can be statically linked?)
Example, Bullet with an $INSTALL_PREFIX=./install/win64-msvc/
Sample Header
./install/win64-gcc/include/irr/ext/Bullet/3rdparty/include/bullet/Bullet-C-Api.h
Sample lib
./install/win64-gcc/lib/irr/ext/Bullet/3rdparty/libBulletCollision.so
however if your irr::ext::something requires 3rdparty libraries you should really build it as a static library itself, install the irr::ext::something library and not install the dependencies.
Also think if you "really" need the top level API of your irr::ext to expose the 3rdparty dependency headers... unless you expect the user to want to have access to the internals, maybe don't expose
For example it may be good for users to have access to all of Bullet's API, that saves irr::ext::bullet being a silly pointless wrapper of the entire Bullet API