Sam Lantinga
fc6a229f72
Increased tolerance a little bit more for multiple blending passes accumulating error.
2009-11-21 07:46:12 +00:00
Sam Lantinga
24d9e6a497
Added comment for pixel-perfect line workaround.
2009-11-21 07:26:52 +00:00
Sam Lantinga
dd6317ef08
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.
2009-11-21 07:22:59 +00:00
Sam Lantinga
cda15a93c7
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.
2009-11-21 07:14:21 +00:00
Sam Lantinga
4cbe158f13
Fixed the coordinates for pixel coverage in blits
2009-11-21 06:34:43 +00:00
Sam Lantinga
7863b8a31b
Use 45 degree lines for the diagonal test to avoid aliasing errors in line drawing.
2009-11-21 06:28:25 +00:00
Sam Lantinga
d0c931c89a
It's not the last pixel, it's the rightmost pixel, or if they're both the same x coordinate, the bottommost pixel.
2009-11-21 06:19:34 +00:00
Mike Gorchak
f351b80476
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.
2009-11-21 06:17:50 +00:00
Sam Lantinga
58effb88d3
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! :)
2009-11-21 05:29:31 +00:00
Sam Lantinga
3808553966
pixels don't need to be dynamically allocated
...
Added a dump_screen() function to assist with test failure diagnosis
2009-11-21 05:25:08 +00:00
Sam Lantinga
32188b63d3
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.
2009-11-21 05:05:19 +00:00
Mike Gorchak
744dfa75a8
Support for UTF-8 text input has been added.
2009-11-20 14:42:40 +00:00
Mike Gorchak
b6c6b41bb5
1. SDL_RenderPresent() call has been added after each test to be sure, that all graphics output is flushed in case if it was asynchronous.
...
2. After each renderer test window recreation has been added.
2009-11-20 07:11:29 +00:00
Mike Gorchak
e7e2a01f50
Output last SDL error in case of test was failed.
2009-11-20 07:08:28 +00:00
Mike Gorchak
516d648ebd
RenderReadPixels and RenderWritePixels now work properly.
2009-11-20 07:07:41 +00:00
Mike Gorchak
ada6df0ab1
Deinitialization fixes, in case if QNXGF driver is not initialized properly.
2009-11-20 07:06:50 +00:00
Mike Gorchak
8a2f3c4aeb
Added support for generic getopt() function instead of getopt_long(). Because not all platforms have getopt_long().
2009-11-19 09:07:09 +00:00
Mike Gorchak
00648d42b4
Support for RendererReadPixels and RendererWritePixels has been added to photon renderer.
2009-11-19 08:44:07 +00:00
Sam Lantinga
e665ed1ee6
Mike Gorchak to Sam
...
Hello Sam!
You have reverted back my patches for OpenGL renderer :)
To reproduce an issue, compare graphics output while running these tests:
testdraw2 --renderer opengl --blend mask --cyclealpha
and
testdraw2 --renderer software --blend mask --cyclealpha
You will see, that software renderer output is different from opengl renderer output.
Thanks!
2009-11-19 08:02:00 +00:00
Sam Lantinga
287d2b84fc
Found a way to implement mask semantics in OpenGL
2009-11-19 05:33:41 +00:00
Sam Lantinga
98198245bc
Allow some variation in the pixel values to account for blending accuracy differences.
2009-11-19 05:06:01 +00:00
Sam Lantinga
abb42ffd01
Include the endpoint in the line we're drawing
2009-11-19 04:59:19 +00:00
Sam Lantinga
36c5366455
Adjust the vertices to be over the texel center.
2009-11-19 04:33:35 +00:00
Sam Lantinga
dce6c3f274
Fixed a bunch of bugs in the blit blend mode tests
2009-11-18 09:39:32 +00:00
Sam Lantinga
e671076c62
Use SDL's string and memory functions instead of stdlib
2009-11-18 09:28:35 +00:00
Sam Lantinga
3e539ff849
Implemented SDL_RenderReadPixels()/SDL_RenderWritePixels() for the dummy renderer.
...
This is helpful to validate the automated test suite, since this renderer is super simple and should always pass tests.
2009-11-18 09:20:01 +00:00
Sam Lantinga
9cc7fc361e
Don't add the OpenGL renderers for drivers that don't support OpenGL
2009-11-18 09:17:29 +00:00
Sam Lantinga
8259a10e12
Fixes for the automated rendering test
2009-11-18 09:07:13 +00:00
Sam Lantinga
46db19c1fd
If we explicitly request a driver, try to initialize it.
2009-11-18 08:54:13 +00:00
Sam Lantinga
9cc81118d2
Fixed GL_RenderReadPixels() - thanks Ryan!
2009-11-18 08:07:37 +00:00
Sam Lantinga
a9553c1c3d
First pass (untested) at RenderWritePixels()
2009-11-18 07:35:00 +00:00
Sam Lantinga
f07fad9ec7
Refactored to use render_loadTestFace()
2009-11-18 07:34:05 +00:00
Sam Lantinga
cacae661e6
Fixed endianness of the face image surface
2009-11-18 07:22:22 +00:00
Sam Lantinga
ae3824a9bf
Trying to figure out why the OpenGL tests are failing...
2009-11-18 06:15:44 +00:00
Sam Lantinga
754e60b870
Compare against the correct image
2009-11-18 06:15:21 +00:00
Sam Lantinga
c14ffddbcc
Debug info to help track down render test failures
2009-11-17 06:51:14 +00:00
Sam Lantinga
e306484919
Added missing return values
2009-11-17 06:50:29 +00:00
Sam Lantinga
6820ff5982
Fixed some bugs in the automated test suite, revealed by working SDL_RenderReadPixels()
2009-11-17 05:17:11 +00:00
Sam Lantinga
cd1a4a74e5
Scott to slouken
...
Heres the wiz patch and additional files. (I think I got everything)
2009-11-17 04:53:15 +00:00
Sam Lantinga
e024bcf596
Thank you automated tests (and bobbens!), fixed alpha blending for accuracy
2009-11-16 09:47:34 +00:00
Sam Lantinga
0b1a37f8ba
Fixed memory corruption in SW_RenderReadPixels()
2009-11-16 07:39:08 +00:00
Sam Lantinga
7a40c23469
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
...
This code still doesn't quite work yet. :)
2009-11-16 07:13:07 +00:00
Sam Lantinga
c12a32c64b
Added a utility function to convert blocks of pixels
2009-11-15 09:21:46 +00:00
Sam Lantinga
08efca1a63
Hmm, this isn't going to work, is it?
2009-11-15 08:01:34 +00:00
Sam Lantinga
1e8b087237
Work in progress: SDL_RenderReadPixels() should be implemented soon.
2009-11-15 08:01:07 +00:00
Sam Lantinga
06a7514a17
Work in progress on OpenGL ReadPixels/WritePixels interface
2009-11-15 04:58:03 +00:00
Sam Lantinga
b6a95db8fa
Updated for the new pixel format structure
2009-11-11 06:34:33 +00:00
Sam Lantinga
955c767ade
The docs directory doesn't exist anymore
2009-11-11 06:23:19 +00:00
Sam Lantinga
b66aacd5f4
Fixed gcc warning
2009-11-09 15:12:31 +00:00
Sam Lantinga
cb3902eb6c
Work in progress on implementation of SDL_RenderReadPixels() and SDL_RenderWritePixels(), code untested.
2009-11-09 05:20:11 +00:00