Sat, 21 Nov 2009 07:26:52 +0000Added comment for pixel-perfect line workaround.
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 07:26:52 +0000] rev 3475
Added comment for pixel-perfect line workaround.

Sat, 21 Nov 2009 07:22:59 +0000Of COURSE that trick wouldn't work on all renderers. Fall back to something for now, hopefully figure out a better way to do this later.
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 07:22:59 +0000] rev 3474
Of COURSE that trick wouldn't work on all renderers. Fall back to something for now, hopefully figure out a better way to do this later.

If we have to, we can use vertical line and horizontal line textures for vertical and horizontal lines, and then create custom textures for diagonal lines and software render those. It's terrible, but at least it would be pixel perfect.

Sat, 21 Nov 2009 07:14:21 +0000This is terrible, but the OpenGL standard says that lines are half open, which means that one endpoint is not covered so adjoining lines don't overlap. It also doesn't define which end is open, and indeed Mac OS X and Linux differ. Mac OS X seems to leave the second endpoint open, but Linux uses the right-most endpoint for x major lines and the bottom-most endpoint for y major lines.
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 07:14:21 +0000] rev 3473
This is terrible, but the OpenGL standard says that lines are half open, which means that one endpoint is not covered so adjoining lines don't overlap. It also doesn't define which end is open, and indeed Mac OS X and Linux differ. Mac OS X seems to leave the second endpoint open, but Linux uses the right-most endpoint for x major lines and the bottom-most endpoint for y major lines.

Sat, 21 Nov 2009 06:34:43 +0000Fixed the coordinates for pixel coverage in blits
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 06:34:43 +0000] rev 3472
Fixed the coordinates for pixel coverage in blits

Sat, 21 Nov 2009 06:28:25 +0000Use 45 degree lines for the diagonal test to avoid aliasing errors in line drawing.
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 06:28:25 +0000] rev 3471
Use 45 degree lines for the diagonal test to avoid aliasing errors in line drawing.

Sat, 21 Nov 2009 06:19:34 +0000It's not the last pixel, it's the rightmost pixel, or if they're both the same x coordinate, the bottommost pixel.
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 06:19:34 +0000] rev 3470
It's not the last pixel, it's the rightmost pixel, or if they're both the same x coordinate, the bottommost pixel.

Sat, 21 Nov 2009 06:17:50 +0000RenderReadPixels and RenderWritePixels functions work with back buffer now and all asynchronous operations are flushed before reading or writing to backbuffer. Thanks Sam for clarification of this.
Mike Gorchak <lestat@i.com.ua> [Sat, 21 Nov 2009 06:17:50 +0000] rev 3469
RenderReadPixels and RenderWritePixels functions work with back buffer now and all asynchronous operations are flushed before reading or writing to backbuffer. Thanks Sam for clarification of this.

Sat, 21 Nov 2009 05:29:31 +0000My first OpenGL shader! Momma will be so proud!
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 05:29:31 +0000] rev 3468
My first OpenGL shader! Momma will be so proud!

This shader implements the software renderer mask semantics where the source pixel is multiplied by the color and alpha modulation values and then any pixel with non-zero alpha is fully opaque.

The OpenGL renderer on Mac OS X now passes all the automated render tests! :)

Sat, 21 Nov 2009 05:25:08 +0000pixels don't need to be dynamically allocated
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 05:25:08 +0000] rev 3467
pixels don't need to be dynamically allocated
Added a dump_screen() function to assist with test failure diagnosis

Sat, 21 Nov 2009 05:05:19 +0000SDL_RenderReadPixels() needs to flush asynchronous operations before it reads.
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Nov 2009 05:05:19 +0000] rev 3466
SDL_RenderReadPixels() needs to flush asynchronous operations before it reads.
The semantics are that it reads the back buffer, and those pixels may not be available once SDL_RenderPresent() has happened.