319 Commits

Author SHA1 Message Date
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
Mike Gorchak
6a7f207cd7 Optimizations.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404134
2009-10-22 06:07:05 +00:00
Mike Gorchak
78dec43e00 Support for GL initialization parameters has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404131
2009-10-21 14:51:42 +00:00
Mike Gorchak
78ffba1ff2 Fixed memory allocation size.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404086
2009-10-13 20:16:23 +00:00
Mike Gorchak
b0a410eb46 Fixed handling of the initial window size.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404085
2009-10-13 18:14:22 +00:00
Mike Gorchak
c6540a326c Options --double --triple have been added to test double and triple buffering.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404082
2009-10-13 11:24:36 +00:00
Mike Gorchak
5095178f48 Revert back. Sorry.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404045
2009-10-10 17:07:49 +00:00
Mike Gorchak
f050f1289b Call CommonQuit() at exit has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404040
2009-10-10 13:22:05 +00:00
Mike Gorchak
ae04b1afaf Created windows must be destroyed at CommonQuit().
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404039
2009-10-10 13:21:21 +00:00
Ryan C. Gordon
fa8e2f2155 Use new 1.3 API for getting audio driver name.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404003
2009-10-10 06:39:59 +00:00
Ryan C. Gordon
edf88f55b0 Added some debug output to loopwave.c
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404001
2009-10-10 06:32:11 +00:00
Sam Lantinga
00fcbc745d Fixed bug #817
Daniele Forghieri      2009-09-30 15:48:24 PDT

Some tests doesn't use the correct include statement (and there are some
missing declaration) and some test use C++ variable after statement, preventing
compile wicth Open Watcom

The patch attached fixes this

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403962
2009-10-04 09:55:20 +00:00
Sam Lantinga
ff4d85fc9e Better cross-platform macros for printing 32 and 64 bit values
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403938
2009-09-29 01:19:14 +00:00
Bob Pendleton
6e7a184bcf Ok, added long casts to get rid of compiler warnings.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403935
2009-09-28 18:44:26 +00:00
Sam Lantinga
06e83a3640 Added renderer information for dynamic OpenGL test
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403931
2009-09-28 15:32:19 +00:00
Sam Lantinga
a305eb8541 Fixed bug #777
Implemented SDL_GetPlatform()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403911
2009-09-26 10:32:14 +00:00
Sam Lantinga
55214000e1 Fixed bug #705
Sami N      2009-02-21 11:15:39 PST

Patches two tests that had broken format strings in their *printf()'s.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403904
2009-09-26 09:57:32 +00:00
Sam Lantinga
b827e9297f Fixed bug #705
Sami N      2009-02-21 11:15:39 PST

Patches two tests that had broken format strings in their *printf()'s.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403903
2009-09-26 09:56:26 +00:00
Bob Pendleton
eb32c5737d int testmmousetable.c the arguments to main() are not compatible with what is required in SDL_main.h
Cleaned up testatomic.c to use the same syntax as every other test program.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403881
2009-09-23 02:52:11 +00:00
Sam Lantinga
a78ed924f8 Whoops, this breaks building on Mac OS X 10.4
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403874
2009-09-22 02:20:56 +00:00
Sam Lantinga
59bb46e70d Fixed bug #674
Matej     2009-01-08 09:25:34 PST

Hello,
I maintain a cross-platform project that uses SDL.
One of the users who runs OSX has told me that he has problems with linking to
SDL due to missing -framework option.
I think that the problem is because of this:
'sdl-config --libs' outputs '-L/opt/local/lib -lSDLmain -lSDL
-Wl,-framework,Cocoa'
All the options are passed to the linker except the last one. I think that the
good output should be just:
'-L/opt/local/lib -lSDLmain -lSDL -framework Cocoa'
since those options (--libs) are passed to the linker, so the '-Wl' option is
redundant and possibly harmful in this very case
I use autotools with libtool to do the build...
Regards,
Matej

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403862
2009-09-21 10:23:19 +00:00
Sam Lantinga
bfb982d926 Fixed bug #615
Scott McCreary      2008-08-21 10:48:14 PDT

This patch adds support for Haiku.
http://ports.haiku-files.org/browser/haikuports/trunk/media-libs/libsdl/SDL-1.2.13-haiku.diff
Haiku is an open-source recreation of BeOS.  It has better POSIX compliance
than beOS did, and other improved features, which in some cases causes us to
have to "undo" previous BeOS workarounds.
Here's our port log entry for it, showing the steps to force the changes into
configure and Makefile:
http://ports.haiku-files.org/wiki/media-libs/libsdl/1.2.13/1
Note that this was only tried on 1.2.13 stable so far.
Haiku is using a newer config.guess / config.sub that doesn't yet seem to be in
the released libtool, so we are having to copy it in for now.
http://haiku-files.org/files/optional-packages/

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403855
2009-09-21 09:21:00 +00:00
Sam Lantinga
0a027f75d0 Fall back to opaque sprite if no formats with alpha are supported.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403835
2009-09-20 23:09:30 +00:00
Bob Pendleton
1dc16d423f I'm gussing that this was never compiled where TTF support was missing. As a result a call to SDL_GetError and a call to TTF_GetError were swapped.
I "fixed" it. That is it now compiles.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403825
2009-09-19 15:22:33 +00:00
Sam Lantinga
d4f133c2bf Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403823
2009-09-19 13:29:40 +00:00
Sam Lantinga
a5b7ba39e6 More test coverage
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403807
2009-09-19 05:45:49 +00:00
Sam Lantinga
117273ed79 Added more tests for the different primitive types
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403806
2009-09-19 05:43:15 +00:00
Sam Lantinga
1d966b1f67 Fixed bug #783
Fixed coordinate positioning with OpenGL renderer, and added a test case

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403805
2009-09-19 05:12:26 +00:00
Bob Pendleton
11921a8b7d The new, cleaner, version of the atomic operations. The dummy code is what you should start working with to port atomic ops.
The linux code appears to be complete and *should* be the base of all Unix and GCC based versions. The macosx and win32 versions
are currently just copies of the dummy code. I will begin working on the windows version as soon as this check in is done. I
need someone to work on the Mac OS X version.

I'm afraid that this check in will break QNX (Sorry!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403802
2009-09-17 20:35:12 +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
Sam Lantinga
633d710201 CD-ROM support is so passé :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403773
2009-09-05 09:11:03 +00:00
Bob Pendleton
96e3a0d5c7 Start of redesign, getting rid of 8 and 16 bit operations in .h and test files.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403763
2009-08-11 21:27:19 +00:00
Bob Pendleton
66de021c3d volitile... duh, yeah the variable need to be labeled volitile
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403698
2009-07-09 21:31:27 +00:00
Bob Pendleton
dad8f05067 I've made so many changes I don't dare continue until I check the current stuff in.
/test/testatomic.c performs absolutely basic tests to show that the function work as expected. Need a second test to do more detailed tests.

/include/SDL_atomic.h provides declarations for all included functions.

/src/atomic/linux/SDL_atomic.c provided all the functions. On a generic built the 64 bit functions work, but they are emulated. On a build for -march=pentium and above the 64 bit functions use native instructions
/src/atomic/dummy/SDL_atomic.c emulates all the operations using SDL_mutex.h.
/src/atomic/win32/SDL_atomic.c is a copy of dummy
/src/atomic/macosx/SDL_atomic.s is a copy of dummy

These versions of SDL_atomic.c provide a frame work for building the library with a mixture of native and emulated functions. This allows the whole library to be provided on all platforms. (I hope.)
I hope this fits with the SDL philosophy of either providing a common subset or emulating when the platform is missing a feature.

I have not added dummy, macosx, or win32 to the build. They are there as place holders for future work.

I have modified congifure.in to compile sources in /src/atomic/linux. (The SDL configure.in file is an amazing piece of work and I hope I didn't mess it up. :-)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403671
2009-06-29 19:54:43 +00:00