how to change display dynamic

edited June 2010 in Help request
Screen resolution problem.I need to decide the game's resolution depending on the devices,and
change it in runtime.
But I found orx read the original config in init time and create the window.When the first time I get the control in Init callback.The Screen resolution is decided.
How could I change it in runtime whith the right config file?

I tried to find some answer in orx source.
But I didn't found a way to do it.
new a sf::RenderWindow myself?It's kind of strange.

Comments

  • edited June 2010
    You want the functions orxDisplay_GetVideoMode(), orxDisplay_SetVideoMode() & orxDisplay_IsVideoModeAvailable().

    They might have been added after 1.1, don't remember.

    EDIT: There's a test of resolution change on the fly in orx's default testbed called orxBounce.
  • edited June 2010
    iarwain wrote:
    You want the functions orxDisplay_GetVideoMode(), orxDisplay_SetVideoMode() & orxDisplay_IsVideoModeAvailable().

    They might have been added after 1.1, don't remember.

    EDIT: There's a test of resolution change on the fly in orx's default testbed called orxBounce.


    That's not right, I tested the orxDisplay_SetVideoMode, But It not works. Because that's not I need. I didn't want to change the VideoMode, I want to change the Window Size.

    And I can't change the Video mode as I want as a WIndow Size. It find all the valid screen resolution of my screen to limit this.
    In orxDisplay_SFML_IsVideoModeAvailable...
  • edited June 2010
    jtianling wrote:
    iarwain wrote:
    You want the functions orxDisplay_GetVideoMode(), orxDisplay_SetVideoMode() & orxDisplay_IsVideoModeAvailable().

    They might have been added after 1.1, don't remember.

    EDIT: There's a test of resolution change on the fly in orx's default testbed called orxBounce.


    That's not right, I tested the orxDisplay_SetVideoMode, But It not works. Because that's not I need. I didn't want to change the VideoMode, I want to change the Window Size.

    And I can't change the Video mode as I want as a WIndow Size. It find all the valid screen resolution of my screen to limit this.
    In orxDisplay_SFML_IsVideoModeAvailable...

    You can't resize a window without changing the video surface associated with it. Changing the window size implies changing the display surface, hence changing the video mode.

    What do you want to achieve exactly?

    As for IsVideoMode available, it concerns full screen available video mode, supported by your graphic cards & drivers.
  • edited June 2010
    I still can't catch what you means and I forgot ask it yesterday. Maybe I should see the orxBounce at first and ask you later.
Sign In or Register to comment.