Rotation and Draw Primitives at Virtual Resolutions using native res?

About Monkey 2 Forums Monkey 2 Development Rotation and Draw Primitives at Virtual Resolutions using native res?

This topic contains 4 replies, has 4 voices, and was last updated by  cocon 1 year, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12029

    therevills
    Participant

    When rotation and drawing primatives (eg Oval) using a virtual resolution there are rotated and draw as the native resolution.

    I’ve got around this by rendering to texture, but is there a better way or fix?

    #12042

    Mark Sibly
    Keymaster

    Can’t think of anything off hand. Possibly a shader could be used to ‘snap’ vertices, but then you’d end up with a lot of overdraw and it would be likely to be considerably slower.

    I think the ‘draw stuff offscreen’ approach is pretty much the way HW expects things to be done these days. I have also recently found a ‘blit framebuffer’ GL extension that should make this even faster in some cases, not that I’ve ever found it to be too slow or anything so far.

    #12049

    Ethernaut
    Participant

    The current behavior seems correct to me!

    Virtual resolution is about relative sizes (and aspect ratio), not about the resolution itself. Doing the two step, “render to texture then draw texture” seems to be the correct path to draw “actual” low res images at a high resolution monitor, I think.

    If you really don’t want to deal with it, you can extend the Window class into a window that does the texture rendering “behind the scenes”. You can even switch between low res and high res on the fly while maintaining the framing and size of everything, which is neat!

    Cheers!

    #12062

    Mark Sibly
    Keymaster

    Actually, my idea is bollocks anyway, it’d just ‘pointilize’ everything.

    #12071

    cocon
    Participant

    This render to texture effect is nice for various purposes, such as pixel art etc.

    However for the real deal there should be another much better way. Many others have tried to tackle the problem of virtual resolutions, I remember Diddy Framework (previous monkey-x) had quite a cool way to handle virtual resolutions, that handles scaling, nicely.

     

    My take on the subject so far is to convert values form a range to another.

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

You must be logged in to reply to this topic.