fade in effect

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

  • edited December 2010
    Tried it quickly and the fade in is definitely a bug. It's reverting back to its initial alpha after the FX is done, I need to check why. I don't think it's related to orxFX as nothing changed there for ages so it might be something with the latest display batching changes. I'll try to fix that tonight.

    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.
  • edited December 2010
    Tried it quickly and the fade in is definitely a bug. It's reverting back to its initial alpha after the FX is done, I need to check why. I don't think it's related to orxFX as nothing changed there for ages so it might be something with the latest display batching changes. I'll try to fix that tonight.
    thanks in advance!!
    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.
    I just copied it from another project, in order to narrow down the problem.
    It's not supposed to look good/have the right size ;)
  • edited December 2010
    Soooo.

    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! =)
  • edited December 2010
    Quick update: ubuntu 8.04 with gcc 4.2.4 works fine too.
    I'm beginning to suspect a bug with latest mingw/gcc versions.
  • edited December 2010
    Works on OSX 10.6.4 with gcc 4.2.1 too. :(
  • edited December 2010
    I'm using the default version of gcc, which is 4.4.1.
    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.
  • edited December 2010
    That's a very good idea.

    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!).
  • edited December 2010
    Did a very quick test with mingw/gcc 4.5.0 and it worked fine for me. However I had to recompile Box2D first as name mangling apparently changed since gcc 3.4.5. :?

    Let me know if it works for you!
  • edited December 2010
    same for me. had to recompile box2d.
    but now everything works!
Sign In or Register to comment.