Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
should I replace rendertarget with setclip? — Gideros Forum

should I replace rendertarget with setclip?

piepie Member
edited June 2015 in General questions
Hi, I am currently using renderTarget to clip some sprites in my game; since the introduction of setclip I think I could achieve the same results with this method.

Do you think it could be worth the work, or does it look like a waste of time? Is there any significant performance difference between the two? :)

Thank you

Comments

  • hgy29hgy29 Maintainer
    Accepted Answer
    With rendertarget you draw your sprites twice: once in the rendertarget buffer, and then the rendertarget is drawn on screen, so depending on the size of your rendertarget surface it may be more efficient to setClip() and draw in a single pass

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • piepie Member
    thank you
  • antixantix Member
    @hgy29, thanks for the explanation. This seems to be another feature in Gideros where the description in the documentation does not accurately reflect the features operation?

    Will this situation change anytime soon?

    P.S I know you have a small team but documentation and reference material is important to attract new users I think.
  • hgy29hgy29 Maintainer
    @antix, I understand and agree.

    The fact is making a good documentation is rather difficult, because we tend to rely on the fact that readers have somehow enough background to understand what may be implied in some ops. This is not on purpose of course.
    Another fact is that explaining too much is time consuming and may make the whole thing unreadable.

    For example, should we explain that doing a simple 'setRotation()' implies computing a full 4x4 transform matrix that takes position,scale and rotations factors as input ? Some will want to know that, but most would just take as granted that we did the best we could under the hood.

    Also, everyone should keep in mind that, except for kickstarters project, contributors and maintainers are not rewarded for their work. As for myself, I happen to do this because I like it, and because I have some gideros apps projects too. But honestly as a coder I enjoy writing code/debugging/enhancing, but documentation is a pain...

    I still think it is easier for us to do what we can and relying on you all users to spot inaccuracies so that we can improve it.

    Likes: antix, tkhnoman

    +1 -1 (+2 / -0 )Share on Facebook
  • antixantix Member
    @hgy29, thanks. I agree, documentation is the most boring part of any system heheh. The example of setRotation() is not a good one as it really is self explanatory and the documentation clearly states what the function does, the setClip() and renderTarget documentation however is totally vague (to me at least).

    Whilst I appreciate that the development team is small and there are a lot of unrewarded helpers from the community, the community will not grow as well as it should if people get confused by poor documentation and give up.

    There are a few systems that I have just shaken my fist at and uninstalled because there is no concrete documentation to hold the product up.

    Likes: hgy29

    +1 -1 (+1 / -0 )Share on Facebook
  • ar2rsawseenar2rsawseen Maintainer
    @antix if you have any suggestion on improving the text of any function, let me know and I'll update that ;)

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @ar2rsawseen, Awesome, will do.
Sign In or Register to comment.