Non stretchy "fill" layout in 3D?

About Monkey 2 Forums Monkey 2 Programming Help Non stretchy "fill" layout in 3D?

This topic contains 9 replies, has 3 voices, and was last updated by  Ethernaut 1 year, 2 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #12502

    Ethernaut
    Participant

    Hi,

    I’m trying to get the 3D renderer to use all available pixels when I resize the window. Currently, when I set the Layout to “fill” and resize the window, it stretches the rendered image (which is what I expect from the “stretch” layout).

    What I want is that the aspect ratio should change as I resize, ideally keeping the vertical FOV (horizontal FOV is added/removed, changing the effective aspect ratio). Bonus points if I can set limit aspect ratios (min=1.0, max=2.35, etc), beyond which it would letterbox/pillarbox as needed.

    I tried passing the window frame resolution inside OnMeasure(), but no luck.

    #12504

    Xaron
    Participant
    #12507

    Ethernaut
    Participant

    That works for 2D, but doesn’t work for the 3D renderer! 🙂
    See in the image below, the circle looks fine when I resize the window, but the sphere is rendered stretched.

    <edit> For some reason the forum’s layout is messed up, and there’s a giant box with the link on top of the text. What I said up there, in case you can’t see it like me, is “That works for 2D, but doesn’t work for the 3D renderer!”

    #12508

    Xaron
    Participant

    My bad, sorry.

    #12510

    Xaron
    Participant

    But looking at the examples, it looks like it works just fine. Take the morpher example for instance? Or do I get you wrong?

    #12513

    Ethernaut
    Participant

    Are you testing it on Windows? Maybe it works in Windows but not in MacOS.
    In MacOS the morpher example stretches as I resize the window around.

    #12514

    Xaron
    Participant

    Ah yes, running Windows 10 here. It doesn’t stretch there.

    #12975

    Xaron
    Participant

    Ok, I was wrong. Apparently I have indeed the same issue under Windows 7 and 10.

    Mark, how to deal with that?

    #12995

    Mark Sibly
    Keymaster

    Fixes coming soon…

    #13198

    Ethernaut
    Participant

    Works now!

    From now on, remember to set “camera.View = Self” from the main window for it to work properly.

    Super wide window

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

You must be logged in to reply to this topic.