We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 780 - Rendering platform differences
Summary: Rendering platform differences
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-13 07:31 UTC by Mike
Modified: 2009-12-14 12:12 UTC (History)
0 users

See Also:


Attachments
Sample program (3.05 KB, text/plain)
2009-08-13 07:31 UTC, Mike
Details
Snapshot on Linux (5.61 KB, image/png)
2009-08-13 07:33 UTC, Mike
Details
Snapshot on Vista (8.70 KB, image/png)
2009-08-13 07:33 UTC, Mike
Details
Snapshot on XP (6.94 KB, image/png)
2009-08-13 07:34 UTC, Mike
Details
Line rendering difference (16.57 KB, image/png)
2009-10-14 03:37 UTC, Mike
Details
Sample program: line rendering - one pixel difference demo (2.82 KB, text/x-csrc)
2009-10-14 03:40 UTC, Mike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2009-08-13 07:31:07 UTC
Created attachment 345 [details]
Sample program

SDL_RenderLine() and SDL_RenderFill() are mismatch in the reference grid.
I've attached a listing of the program that draws a cross, using both this functions, in the same coordinates.
Linux:
   one "extra" pixel at the bottom and right for SDL_RenderLine()
Windows:
   both XP and Vista has shifting to one pixel to right-bottom for SDL_RenderFill() against SDL_RenderLine().
Comment 1 Mike 2009-08-13 07:33:18 UTC
Created attachment 346 [details]
Snapshot on Linux
Comment 2 Mike 2009-08-13 07:33:58 UTC
Created attachment 347 [details]
Snapshot on Vista
Comment 3 Mike 2009-08-13 07:34:46 UTC
Created attachment 348 [details]
Snapshot on XP
Comment 4 Sam Lantinga 2009-09-26 03:33:34 UTC
Can you retest with the current SDL snapshot?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 5 Mike 2009-10-14 03:34:35 UTC
Expecting that
{{{
	SDL_SetRenderDrawColor(255, 0, 0, SDL_ALPHA_OPAQUE);
	SDL_RenderPoint(point1X, point1Y);
	SDL_RenderPoint(point2X, point2Y);

	SDL_SetRenderDrawColor(255, 255, 0, SDL_ALPHA_OPAQUE);
	SDL_RenderLine(point1X, point1Y, point2X, point2Y);
}}}
works similar, but for linux a line covers both points, for win32 - only one: top (for vertical lines) or left (for horizontal).

Linux: software renderer
Win32: D3D renderer

Tested with SDL-1.3.0-5097 snapshot.
Attaching an image for comparison and code of the test program
Comment 6 Mike 2009-10-14 03:37:41 UTC
Created attachment 416 [details]
Line rendering difference
Comment 7 Mike 2009-10-14 03:40:04 UTC
Created attachment 417 [details]
Sample program: line rendering - one pixel difference demo
Comment 8 Sam Lantinga 2009-10-16 21:04:45 UTC
Thanks, I'll take a look at this after I get the 1.2 release wrapped up.
Comment 9 Sam Lantinga 2009-12-13 23:01:49 UTC
Whew, it took a while, but I've got the automated tests working and fixed lots of problems with the line rendering on various platforms.

Can you try in the latest snapshot?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 10 Mike 2009-12-14 03:27:10 UTC
The issue was solved!

Thanks!
Comment 11 Sam Lantinga 2009-12-14 12:12:47 UTC
Yay, thanks!