Forums

OverviewV-Play 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
    V-Play 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 4 years, 9 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support