Commit graph

26 commits

Author SHA1 Message Date
Sam Lantinga
8209e2a9a9 Restored SDL_BLENDMODE_MOD for MAME 2011-02-04 19:50:56 -08:00
Sam Lantinga
348ea88682 Updated for API changes 2011-02-03 02:42:50 -08:00
Sam Lantinga
9623680313 Fixed compiling with the latest API changes 2011-02-02 14:34:24 -08:00
Sam Lantinga
825e1da54d Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
--HG--
extra : rebase_source : f06ea01caa64c8ad14170c723e5af52dad64d779
2011-01-31 23:23:57 -08:00
Sam Lantinga
ce2e619ac9 Fixed compiler warning 2011-01-16 17:48:04 -08:00
Sam Lantinga
a0e019f786 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404438
2010-01-21 06:21:52 +00:00
Sam Lantinga
6da163ab81 Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine().
Added API for rectangle drawing (as opposed to filling)
Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay.
Optimized software line drawing quite a bit.
Added support for Wu's anti-aliased line drawing, currently disabled by default.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404346
2009-12-23 01:55:00 +00:00
Sam Lantinga
c2767e72dd Added a test to check the read/write pixels API
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404306
2009-12-14 06:35:59 +00:00
Sam Lantinga
8ee9720297 Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
    SDL_BlendPoints()
    SDL_BlendLines()
    SDL_DrawLines()
    SDL_FillRects()
    SDL_BlendRects()
    SDL_RenderPoints()
    SDL_RenderLines()
    SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404279
2009-12-09 15:56:56 +00:00
Sam Lantinga
ce410261ab On Windows the minimum window size may be larger than 80, so explicitly request the expected rectangle.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404274
2009-12-07 08:01:20 +00:00
Sam Lantinga
224c8b5bec More fixes to compile under Visual C++
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404223
2009-11-22 07:00:26 +00:00
Sam Lantinga
ccfc72055c Fixed include paths for Visual C++
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404222
2009-11-22 06:42:58 +00:00
Sam Lantinga
02d897e864 We want to be strict on software renderer tests and opaque tests, but give a decent margin for blending inaccuracy for the blended tests.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404218
2009-11-21 07:59:19 +00:00
Sam Lantinga
e3bfc7307d Use 45 degree lines for the diagonal test to avoid aliasing errors in line drawing.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404212
2009-11-21 06:28:25 +00:00
Sam Lantinga
22c1e66180 pixels don't need to be dynamically allocated
Added a dump_screen() function to assist with test failure diagnosis

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404208
2009-11-21 05:25:08 +00:00
Sam Lantinga
fc3f393af6 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404207
2009-11-21 05:05:19 +00:00
Mike Gorchak
cb70cb42eb 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404205
2009-11-20 07:11:29 +00:00
Sam Lantinga
ffed135358 Fixed a bunch of bugs in the blit blend mode tests
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404194
2009-11-18 09:39:32 +00:00
Sam Lantinga
50cac453d4 Fixes for the automated rendering test
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404190
2009-11-18 09:07:13 +00:00
Sam Lantinga
7f4f3792ce Refactored to use render_loadTestFace()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404186
2009-11-18 07:34:05 +00:00
Sam Lantinga
86dbbd0dd3 Fixed endianness of the face image surface
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404185
2009-11-18 07:22:22 +00:00
Sam Lantinga
200856fb2b Compare against the correct image
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404183
2009-11-18 06:15:21 +00:00
Sam Lantinga
508336f894 Debug info to help track down render test failures
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404182
2009-11-17 06:51:14 +00:00
Sam Lantinga
0f620b7fe4 You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
This code still doesn't quite work yet. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404174
2009-11-16 07:13:07 +00:00
Sam Lantinga
df2499a35c Work in progress: SDL_RenderReadPixels() should be implemented soon.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404170
2009-11-15 08:01:07 +00:00
Sam Lantinga
0b31b5070e Merged Edgar's code changes from Google Summer of Code 2009
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403789
2009-09-07 05:06:34 +00:00