hey,
currently I want to create a fade-in effect. however I have the problem that the object disappears as soon, as the FX is over.
attached you will find a minimal failing example.
the text will slowly fade in. once the FX is over and the alpha should be 1.0 the text will suddenly disappear.
I have this problem not only with text objects.
Am I doing anything wrong or is this a bug?
I used the most recent SVN snapshot and built orx using Codelite on a windows 7 machine.
https://forum.orx-project.org/uploads/legacy/fbfiles/files/BugReproduceProject.zip
Comments
As for the scale, you're using a camera that has a huge frustum rendered in a smaller viewport, hence small letters. Also, when using parenting don't forget about the new scale (0-1) as mentioned in my other post.
It's not supposed to look good/have the right size
I have a bad news. It's that the orxFX issue won't be easy to track. It doesn't repro with visual studio nor with gcc/mingw 3.4.5.
However I got a repro, release only, with gcc 4.4.1. (Your test project links the debug version against the release orx library, that's why it happens in both versions).
When compiling orx with -O1 instead of -O2/-O3, the bug disappears. Even when the bug is here with gcc 4.4.1 and -O2, it doesn't repro for all the values.
So it's basically a wrong float approximation made by the compiler in release only. Might take a while to find the precise cause! ^^
Which version of gcc are you using? I'll try to reproduce the issue on linux and mac to see if I have it there. My home installation is using gcc 3.4.5 which works fine. So as to not get blocked you can either use this version of gcc for compiling orx or using -O1 for the release build instead of the default -O3.
If you find more info, just let me know!
I'm beginning to suspect a bug with latest mingw/gcc versions.
I had also some other problems with this compiler version so I'm hoping they will switch to a newer version soon.
I will switch to gcc 4.4.5 right now.
but if this bug only occurs with this specific version of gcc it's probably not worth tracking down, as long we make sure that the orx engine is not built using this version.
using some preprocessor defines(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) we could print out some warning or rather stop compiling.
It's when this kind of debugging info using compiler/vendor defines are added to a project that it really becomes a serious one!
Hopefully 4.4.5 will work fine. I don't have it at hand to test. I've been releasing all orx's version with gcc 3.4.5 for mingw as later versions often gave me issues (some versions of gcc/mingw even crash when compiling the static non-embedded version of orx!).
Let me know if it works for you!
but now everything works!