Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › BackgroundImage and the window size

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

    s4ge

    Hello again,I’m trying to figure out how the BackgroundImage component works as stated in the documentation.

    The image version (sd,hd,hd2) for the background should be automatically chosen by the current resolution.

    However, if a load a Scene through the QML Loader component, BackgroundImage always loads the sd version of the image, while when i create a direct instance of the scene it always loads the hd version. Even if i change the resolution at runtime (using the hotkeys) the loaded image always stays the same. I don’t now why i then should use this component. Am i doing anything wrong?

    #6693

    s4ge

    Just to clarify, the problem is that when i’m loading the scene through the QML Loader component, the BackgroundImage component always loads the sd image, even when the hd image should be correct.

    #6698

    Alex
    Felgo Team

    Hi,

    first of all, when switching the resolution with the hotkeys at runtime, the images won’t get changed, to save performance. However you can change the dimension of your GameWindow at startup, to test your different image versions.

    By default, the GameWindow is 960×640, therefore the hd version is loaded and not changed during runtime.

    Please try this test example and let me know if it loads the correct image.

    Cheers,
    Alex

    • This reply was modified 10 years, 2 months ago by  Alex.
    #6704

    s4ge

    Hi Alex,

    okay this seems to be legit, since a real target device will never change it’s resolution, however, your small example seems to be working correct.

    I would show you my code, but i already went away from lazy generated scenes.

     

    I was loading the scenes on states, so instead of setting active scene instance on state changes, i used a loader who first loads this scenes. The big difference to your example would maybe that my background image wasn’t the first child inside my scene.

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

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded