Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 1 Support › Polygonitem texture

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6940

    Heini

    Hi,

    I am using a PolygonItem, filled by a texture. On low resolutions everything looks fine, but when I set a higher screen resolution, the texture image is getting upscaled and is looking quite pixelated then. Providing different versions of images for -sd, -hd, and -hd2 does not seem to be supported within the texture. How can I solve this?

     

    Thanks,

    Heini

    #6941

    Christian
    Felgo Team

    Hi Heini,

    you again brought up a good point!

    The PolygonItem does not suppot content-scaling like the MultiResolutionImage does. So you would need to implent this “content-scaling” on your own.This is a suggestion how to do that:

    Set the texture property to your hd2 image, and then set the scale property of your PolygonItem to 0.25. If you use the hd image, set the scale to 0.5.

    Ideally you can then find out based on the xScaleForScene which image and scale factor you should take. Have a look at the implementation of the and MultiResolutionImage component and ContentScaleFileChooser (this one is not in the doc but in the engine sources).

     

    That way your images should look sharp on any resolution.

     

    Cheers, Chris

    #6950

    Heini

    Hi Chris,

    its working well, thank you!

     

    Cheers,

    Heini

    #6951

    Christian
    Felgo Team

    That’s good to hear! 🙂

    Cheers, Chris

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.