Commit graph

1252 commits

Author SHA1 Message Date
Sam Lantinga
d663865d8c Quiet tests shouldn't prompt during assertions
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404409
2010-01-13 08:52:47 +00:00
Ryan C. Gordon
b9cd3d04fb Removed incorrect SDL_GetAudioDeviceName() call from loopwave.c.
SDL_GetAudioDeviceName(1, 0) does not mean "name of the default output device."

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404389
2010-01-11 07:58:55 +00:00
Ryan C. Gordon
896072b2b1 Call SDL_Init() before SDL_GetNumAudioDrivers().
Not sure why that was reversed.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404386
2010-01-10 19:09:57 +00:00
Ryan C. Gordon
9d95b50471 Merged r4874:4875 from branches/SDL-1.2: testwm keyboard debug output.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404385
2010-01-10 18:25:04 +00:00
Ryan C. Gordon
f30bac45d2 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404374
2010-01-10 05:06:03 +00:00
Ryan C. Gordon
065e14eb5d Merged r4784:4785 from branches/SDL-1.2: Mac OS X linker command line fixes.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404373
2010-01-10 04:42:45 +00:00
Sam Lantinga
1411a41ebd Added missing include for stdio
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404351
2009-12-24 21:00:42 +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
b634dea37a Fixed bug #841
The redefinition of M_PI is no longer necessary...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404338
2009-12-17 06:08:20 +00:00
Ryan C. Gordon
8b304825b5 Initial band-aids on SDL_GetMouseState() API breakage. More work to come.
Fixes Bugzilla #758.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404334
2009-12-16 19:50:51 +00:00
Ryan C. Gordon
791f5dbce4 Implemented SDL_setenv(), moved SDL_putenv() to compat.
Fixes Bugzilla #779.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404330
2009-12-16 10:59:51 +00:00
Sam Lantinga
29601c280b Added SDL_GetCPUCount() to see how many cores are available.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404328
2009-12-16 06:53:53 +00:00
Sam Lantinga
3f0f9188ed Fixed bug #741
The thread ID is an unsigned long so it can hold pthread_t so people can do naughty things with it.

I'm going to be adding additional useful thread API functions, but this should prevent crashes in people's existing code on 64-bit architectures.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404327
2009-12-16 04:48:11 +00:00
Sam Lantinga
777b877a72 Added testfill to test raw fill performance
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404325
2009-12-16 02:08:59 +00:00
Sam Lantinga
240b5fcaab Default to allow either accelerated or not
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404320
2009-12-15 20:53:09 +00:00
Sam Lantinga
fe2b42f86c OpenGL hardware acceleration defaults on
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404319
2009-12-15 20:36:31 +00:00
Sam Lantinga
0158b925d3 The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404309
2009-12-14 23:29:37 +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
9888012562 Allow points to be outside the window bounds, stress testing the clipping code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404294
2009-12-12 00:08:45 +00:00
Sam Lantinga
0e0b96d72f Added mouse position for button handling
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404293
2009-12-12 00:08:02 +00:00
Sam Lantinga
1ba0c1618e Added an automated test for rectangle routines, currently only testing line clipping.
Use the Cohen-Sutherland algorithm for line clipping which uses integer math and preserves ordering of clipped points.

Removed getopt() support in testsdl.c, replaced with simple argv scanning.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404285
2009-12-11 09:22:34 +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
52f2433c29 Added an API function to query geometry of multiple monitors:
SDL_GetDisplayBounds()

Implemented multi-monitor window positions on Windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404271
2009-12-06 08:03:38 +00:00
Sam Lantinga
3c1211c031 Added Ctrl-Z common key binding
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404255
2009-12-02 07:56:09 +00:00
Sam Lantinga
1cd715e9db Work in progress on multi-display support:
* Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one.
* The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height.  It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404241
2009-12-01 05:57:15 +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
Mike Gorchak
21ee95a08f Added support for QNX default font. Backspace and Return keys now handled.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404219
2009-11-21 08:42:42 +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
e957ccc22a Increased tolerance a little bit more for multiple blending passes accumulating error.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404217
2009-11-21 07:46:12 +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
Mike Gorchak
4fd1d48088 Output last SDL error in case of test was failed.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404204
2009-11-20 07:08:28 +00:00
Mike Gorchak
413e9a6218 Added support for generic getopt() function instead of getopt_long(). Because not all platforms have getopt_long().
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404201
2009-11-19 09:07:09 +00:00
Sam Lantinga
92f130691a Allow some variation in the pixel values to account for blending accuracy differences.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404197
2009-11-19 05:06:01 +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
ae9dabec32 Use SDL's string and memory functions instead of stdlib
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404193
2009-11-18 09:28:35 +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
c635254fa1 Fixed some bugs in the automated test suite, revealed by working SDL_RenderReadPixels()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404180
2009-11-17 05:17:11 +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
1599f33522 Fixed compile error
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404142
2009-10-28 06:08:48 +00:00
Sam Lantinga
6d92d75009 Automatically initialize the video system and create a renderer to simplify use.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404141
2009-10-28 06:04:07 +00:00