omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    How to use filtering__mode for Texture?

    Pythonista
    3
    4
    2042
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TheClingyFox
      TheClingyFox last edited by TheClingyFox

      So long story short I saw this post and it made me realize that I wanted to use low resolution sprites because of how easy they are to make. I got a hold of using subtexture but I can't seem to get filtering_mode to work. Can someone give an example?

      P.S. This is in the context of the scene module. Also I am new to Python. Thanks for helping me out!

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by omz

        Congrats, you found a bug! ;)

        In short, the FILTERING_NEAREST constant is defined incorrectly, so it actually has the same value as FILTERING_LINEAR (the default). As a workaround, just set the filtering_mode attribute to 1 instead of using the named constant. This will continue to work, even when the bug is fixed in the next update.

        One more thing: If you're working with subtextures, you need to set the filtering_mode for each subtexture separately; the main texture's mode has no effect on subtextures that are created from it.

        1 Reply Last reply Reply Quote 1
        • TheClingyFox
          TheClingyFox last edited by

          Oh my gosh you're a life saver Omz. Thank you!

          1 Reply Last reply Reply Quote 0
          • ellie_ff1493
            ellie_ff1493 last edited by

            When’s this bug getting fixed?
            Just spent a week trying to find the bug in “my” code

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors