README-platforms.txt
author Sam Lantinga <slouken@libsdl.org>
Thu, 01 Aug 2013 09:15:36 -0700
changeset 7563 c128ed448c30
parent 7428 9fb919fc2dd3
child 8887 5028716066ce
permissions -rw-r--r--
Fixed bug 1968 - SDL_RenderCopy stretch loses proportion on viewport boundaries for 3D renderers

driedfruit

SDL_RenderCopy clips dstrect against the viewport. Then it adjusts the
srcrect by "appropriate" amount of pixels. This amount is actually
wrong, quite a lot, because of the rounding errors introduced in the "*
factor / factor" scale.

real_srcrect.x += (deltax * real_srcrect.w) / dstrect->w;
real_srcrect.w += (deltaw * real_srcrect.w) / dstrect->w;

For example:

I have a 32 x 32 srcrect and a 64 x 64 dstrect. So far the
stretching is done perfectly, by a factor of 2.

Now, consider dstrect being clipped against the viewport, so it becomes
56 x 64. Now, the factor becomes 1.75 ! The adjustment to "srcrect"
can't handle this, cause srcrect is in integers.

And thus we now have incorrect mapping, with dstrect not being in the
right proportion to srcrect.

The problem is most evident when upscaling stuff, like displaying a 8x8
texture with a zoom of 64 or more, and moving it beyond the corners of
the screen. It *looks* really really bad.

Note: RenderCopyEX does no such clipping, and is right to do so. The fix would be to remove any such clipping from RenderCopy too. And then fix the software renderer, because it has the same fault, independently of RenderCopy.

[attached patch]
this leaves Software Renderer buggy, as it does it's own clipping later on
slouken@7222
     1
slouken@7222
     2
This is a list of the platforms SDL supports, and who maintains them.
slouken@7222
     3
slouken@7222
     4
Officially supported platforms
slouken@7222
     5
==============================
slouken@7222
     6
(code compiles, and thoroughly tested for release)
slouken@7222
     7
==============================
slouken@7237
     8
Windows XP/Vista/7/8
slouken@7237
     9
Mac OS X 10.5+
slouken@7222
    10
Linux 2.6+
slouken@7428
    11
iOS 5.1.1+
slouken@7222
    12
Android 2.3.3+
slouken@7222
    13
slouken@7222
    14
Unofficially supported platforms
slouken@7222
    15
================================
slouken@7222
    16
(code compiles, but not thoroughly tested)
slouken@7222
    17
================================
slouken@7222
    18
FreeBSD
slouken@7222
    19
NetBSD
slouken@7222
    20
OpenBSD
slouken@7222
    21
Solaris
slouken@7222
    22
slouken@7222
    23
Platforms supported by volunteers
slouken@7222
    24
=================================
slouken@7222
    25
Haiku - maintained by Axel Dörfler <axeld@pinc-software.de>
slouken@7222
    26
PSP - maintained by 527721088@qq.com
slouken@7222
    27
Pandora - maintained by Scott Smith <pickle136@sbcglobal.net>
slouken@7222
    28
slouken@7222
    29
Platforms that need maintainers
slouken@7222
    30
===============================