Commit Graph

451 Commits

Author SHA1 Message Date
Ryan C. Gordon
02bb46f347 Removed incorrect SDL_GetAudioDeviceName() call from loopwave.c.
SDL_GetAudioDeviceName(1, 0) does not mean "name of the default output device."
2010-01-11 07:58:55 +00:00
Ryan C. Gordon
0c92f2de0b Call SDL_Init() before SDL_GetNumAudioDrivers().
Not sure why that was reversed.
2010-01-10 19:09:57 +00:00
Ryan C. Gordon
9b0b122375 Merged r4874:4875 from branches/SDL-1.2: testwm keyboard debug output. 2010-01-10 18:25:04 +00:00
Ryan C. Gordon
609eb81e23 Reverted r5460 ... this was merged from 1.2, but was later reverted there. 2010-01-10 05:06:03 +00:00
Ryan C. Gordon
b7bf9f415e Merged r4784:4785 from branches/SDL-1.2: Mac OS X linker command line fixes. 2010-01-10 04:42:45 +00:00
Sam Lantinga
6491208ef7 Added missing include for stdio 2009-12-24 21:00:42 +00:00
Sam Lantinga
c3629ff44a 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.
2009-12-23 01:55:00 +00:00
Sam Lantinga
ba9b7bf6ff Fixed bug #841
The redefinition of M_PI is no longer necessary...
2009-12-17 06:08:20 +00:00
Ryan C. Gordon
61382a9f93 Initial band-aids on SDL_GetMouseState() API breakage. More work to come.
Fixes Bugzilla #758.
2009-12-16 19:50:51 +00:00
Ryan C. Gordon
f644ae86a9 Implemented SDL_setenv(), moved SDL_putenv() to compat.
Fixes Bugzilla #779.
2009-12-16 10:59:51 +00:00
Sam Lantinga
dc1ed9e7ef Added SDL_GetCPUCount() to see how many cores are available. 2009-12-16 06:53:53 +00:00
Sam Lantinga
75e75ae0c3 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.
2009-12-16 04:48:11 +00:00
Sam Lantinga
b06c70e89d Added testfill to test raw fill performance 2009-12-16 02:08:59 +00:00
Sam Lantinga
e250d2e0f5 Default to allow either accelerated or not 2009-12-15 20:53:09 +00:00
Sam Lantinga
0493dd19b1 OpenGL hardware acceleration defaults on 2009-12-15 20:36:31 +00:00
Sam Lantinga
2ac49a53bd The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code. 2009-12-14 23:29:37 +00:00
Sam Lantinga
c49568972f Added a test to check the read/write pixels API 2009-12-14 06:35:59 +00:00
Sam Lantinga
d3941d1098 Allow points to be outside the window bounds, stress testing the clipping code. 2009-12-12 00:08:45 +00:00
Sam Lantinga
a127883a56 Added mouse position for button handling 2009-12-12 00:08:02 +00:00
Sam Lantinga
0a3768436b 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.
2009-12-11 09:22:34 +00:00
Sam Lantinga
70a40d51b2 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()
2009-12-09 15:56:56 +00:00
Sam Lantinga
4969fa9624 On Windows the minimum window size may be larger than 80, so explicitly request the expected rectangle. 2009-12-07 08:01:20 +00:00
Sam Lantinga
586f3e0dda Added an API function to query geometry of multiple monitors:
SDL_GetDisplayBounds()

Implemented multi-monitor window positions on Windows
2009-12-06 08:03:38 +00:00
Sam Lantinga
262da78936 Added Ctrl-Z common key binding 2009-12-02 07:56:09 +00:00
Sam Lantinga
8adb9fc3cc 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.
2009-12-01 05:57:15 +00:00
Sam Lantinga
c0f5e8a979 More fixes to compile under Visual C++ 2009-11-22 07:00:26 +00:00
Sam Lantinga
411ee2e374 Fixed include paths for Visual C++ 2009-11-22 06:42:58 +00:00
Mike Gorchak
f54a8cc44d Added support for QNX default font. Backspace and Return keys now handled. 2009-11-21 08:42:42 +00:00
Sam Lantinga
7125fdbe63 We want to be strict on software renderer tests and opaque tests, but give a decent margin for blending inaccuracy for the blended tests. 2009-11-21 07:59:19 +00:00
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
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
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
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
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
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
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
8259a10e12 Fixes for the automated rendering test 2009-11-18 09:07:13 +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
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
6820ff5982 Fixed some bugs in the automated test suite, revealed by working SDL_RenderReadPixels() 2009-11-17 05:17:11 +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
1e8b087237 Work in progress: SDL_RenderReadPixels() should be implemented soon. 2009-11-15 08:01:07 +00:00
Sam Lantinga
ed1b37d2bc Fixed compile error 2009-10-28 06:08:48 +00:00
Sam Lantinga
bce225654d Automatically initialize the video system and create a renderer to simplify use. 2009-10-28 06:04:07 +00:00
Mike Gorchak
a96535b75f Optimizations. 2009-10-22 06:07:05 +00:00
Mike Gorchak
f53e17a4df Support for GL initialization parameters has been added. 2009-10-21 14:51:42 +00:00
Mike Gorchak
b77e19d366 Fixed memory allocation size. 2009-10-13 20:16:23 +00:00
Mike Gorchak
aa0ea9891e Fixed handling of the initial window size. 2009-10-13 18:14:22 +00:00
Mike Gorchak
aafbae15c5 Options --double --triple have been added to test double and triple buffering. 2009-10-13 11:24:36 +00:00
Mike Gorchak
696387e501 Revert back. Sorry. 2009-10-10 17:07:49 +00:00
Mike Gorchak
0083177b43 Call CommonQuit() at exit has been added. 2009-10-10 13:22:05 +00:00
Mike Gorchak
2b98843157 Created windows must be destroyed at CommonQuit(). 2009-10-10 13:21:21 +00:00
Ryan C. Gordon
e189bdc695 Use new 1.3 API for getting audio driver name. 2009-10-10 06:39:59 +00:00
Ryan C. Gordon
22051c78fb Added some debug output to loopwave.c 2009-10-10 06:32:11 +00:00
Sam Lantinga
0d51e1e26a 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
2009-10-04 09:55:20 +00:00
Sam Lantinga
c2a31c3fec Better cross-platform macros for printing 32 and 64 bit values 2009-09-29 01:19:14 +00:00
Bob Pendleton
821a7b0630 Ok, added long casts to get rid of compiler warnings. 2009-09-28 18:44:26 +00:00
Sam Lantinga
244f6a3ccf Added renderer information for dynamic OpenGL test 2009-09-28 15:32:19 +00:00
Sam Lantinga
bd908a682f Fixed bug #777
Implemented SDL_GetPlatform()
2009-09-26 10:32:14 +00:00
Sam Lantinga
f0bf2e399c Fixed bug #705
Sami N      2009-02-21 11:15:39 PST

Patches two tests that had broken format strings in their *printf()'s.
2009-09-26 09:57:32 +00:00
Sam Lantinga
731c5d1558 Fixed bug #705
Sami N      2009-02-21 11:15:39 PST

Patches two tests that had broken format strings in their *printf()'s.
2009-09-26 09:56:26 +00:00
Bob Pendleton
14a51aa4c4 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.
2009-09-23 02:52:11 +00:00
Sam Lantinga
08761c33de Whoops, this breaks building on Mac OS X 10.4 2009-09-22 02:20:56 +00:00
Sam Lantinga
4fb13ccee8 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
2009-09-21 10:23:19 +00:00
Sam Lantinga
a1ee906546 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/
2009-09-21 09:21:00 +00:00
Sam Lantinga
8ced47d33f Fall back to opaque sprite if no formats with alpha are supported. 2009-09-20 23:09:30 +00:00
Bob Pendleton
0d9cd7636c 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.
2009-09-19 15:22:33 +00:00
Sam Lantinga
95c8f7a517 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009 2009-09-19 13:29:40 +00:00
Sam Lantinga
6bb3053c3b More test coverage 2009-09-19 05:45:49 +00:00
Sam Lantinga
7c90c0e871 Added more tests for the different primitive types 2009-09-19 05:43:15 +00:00
Sam Lantinga
1ef102a99f Fixed bug #783
Fixed coordinate positioning with OpenGL renderer, and added a test case
2009-09-19 05:12:26 +00:00
Bob Pendleton
9861510378 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!)
2009-09-17 20:35:12 +00:00
Sam Lantinga
30ebf925f0 Merged Edgar's code changes from Google Summer of Code 2009 2009-09-07 05:06:34 +00:00
Sam Lantinga
2a96e84434 CD-ROM support is so passé :) 2009-09-05 09:11:03 +00:00
Bob Pendleton
7e05ef1526 Start of redesign, getting rid of 8 and 16 bit operations in .h and test files. 2009-08-11 21:27:19 +00:00
Bob Pendleton
a71b57e1f0 volitile... duh, yeah the variable need to be labeled volitile 2009-07-09 21:31:27 +00:00
Bob Pendleton
e53cd95852 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. :-)
2009-06-29 19:54:43 +00:00
Bob Pendleton
9302a68559 Disabling 64 bit atomics operations until I figure out why they do not link. 2009-06-24 22:24:23 +00:00
Bob Pendleton
0b5bc4d23b This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
It also update configure.in to compile the linux version of the library. The three versions are all dummies
implementations that do nothing. They are being checked in as place holders. Mostly, I just wanted to get
place holders and the configure.in checked in.
2009-06-24 20:04:08 +00:00
Mike Gorchak
2949fd46f1 Proper window resize handling in GLES test application. 2009-06-11 06:03:05 +00:00
Sam Lantinga
aed8be2521 indent 2009-06-10 13:34:20 +00:00
Mike Gorchak
49687f83c0 SDL pixel format string is printed near mode number in form of SDL_PIXELFORMAT_XXXXX, when --info option is passed. It is usefull for debugging. 2009-06-10 05:56:36 +00:00
Mike Gorchak
f5c427f988 Support for 15/16/24/32 bpps of icon.bmp has been added, in case if not an original icon.bmp (8bpp with palette) is used for tests. 2009-06-10 05:54:19 +00:00
Bob Pendleton
361a88d8db First commit for SDL atomic operations.
On my linux box it compiles and installs correctly and testatomic runs without errors.
2009-06-09 17:33:44 +00:00
Ryan C. Gordon
1a2c2eebd2 Initial work on power subsystem for SDL 1.3. 2009-06-07 06:06:35 +00:00
Sam Lantinga
83d7309416 indent 2009-05-23 22:41:08 +00:00
Mike Gorchak
d6599a968a Default video mode has been changed from 320x200 to 640x480, since fullscreen 320x200 is often unavailable. 2009-04-28 04:41:25 +00:00
Mike Gorchak
4652a067c9 Added OpenGL ES context creation for the each window which has been created (for --windows=N option). 2009-04-28 04:38:51 +00:00
Sam Lantinga
3532a3491b Date: Mon, 23 Mar 2009 09:17:24 +0200
From: "Mike Gorchak"
Subject: New QNX patches

Please apply patch qnx4.diff, which is attached. What has been done:
1)Added back OpenGL ES renderer for QNX target. Added few corrections to
OpenGL ES renderer to let it work under QNX. OpenGL ES renderer do not
support textures under QNX, so I think some additional work must be done.
2) Added GL_OES_query_matrix extension to SDL_opengles.h header file, which
required by OpenGL ES 1.1 specification.
3) Added attribute clearing at the entrance of function
SDL_GL_GetAttribure(). Added error checking into the function
SDL_GL_GetAttribure(), because some attributes can't be obtained in OpenGL
ES 1.0.
4) Porting testdyngles to OpenGL ES 1.0 (1.1 has glColor4ub() and
glColor4f() functions, but 1.0 has glColor4f() only).
5) Added error checking after obtaining attributes using
SDL_GL_GetAttribute() function to the testgl2 and testgles.
6) Small correction to testmultiaudio with printing errors.
7) Added software and accelerated OpenGL ES 1.0 support into the QNX GF
driver.

Please remove ./src/audio/nto directory - it will not be used anymore.
Please create ./src/audio/qsa directory and add content of the archive
qsa.tar.gz into this directory. I rewrote some sound code, added support for
multiple audio cards, enumeration, etc. Added initial support for capture.

As far as I can understand SDL 1.3 is not supporting audio capture right now
? Sam, Am I right ? Or audio capture must be supported through the
PlayDevice routine ?

And last, please put file SDL_gf_opengles.c to  the ./src/video/qnxgf
directory. It is OpenGL ES 1.1 emulation layer for some functions, which are
not supported by OpenGL ES 1.0.
2009-03-24 10:33:12 +00:00
Sam Lantinga
983362f89f Fixed potential crash in testbitmap 2009-03-22 06:56:37 +00:00
Sam Lantinga
160ca01b9a Fixed OpenGL library linking issue 2009-03-12 03:51:39 +00:00
Sam Lantinga
4df57c1da2 Date: Wed, 4 Mar 2009 15:38:22 +0200
From: "Mike Gorchak"
Subject: Re: About QNX support in SDL 1.3

Here is another batch of patches.

1) Makefile.in - added SDL_opengles.h header as header to install.
2) configure.in - Added special define to detect Common Lite OpenGL ES
library in case if Common library is not installed. Added check for
clock_gettime in libc (in QNX it is in libc).
3) SDL_config.h.in - Added SDL_VIDEO_RENDER_OPENGL_ES and
SDL_VIDEO_OPENGL_ES declarations for configure script autodetection.
4) SDL_opengles.h - Added GL_API definition if it is not defined. Added
extension GL_OES_draw_texture because OpenGL ES Renderer uses it without
declaration. Added GL_OES_vertex_buffer_object extension, which is supported
under QNX OpenGL ES. Added GL_OES_single_precision extension.
5) To the test directory I've added building OpenGL ES test applications
through the autotools suite. Was support for iPhone IDE building only.
2009-03-04 15:10:47 +00:00
Sam Lantinga
34ec22eedd indent 2009-02-17 05:57:54 +00:00
Sam Lantinga
17a7c7045f Fixed bug #681
Description From  Philipp   2009-01-16 20:50:01   (-) [reply]

The File test/README from the svn says this:

    testgl        A very simple example of using OpenGL with SDL
    testgl2        Improved version of testgl

It is actually exchanged.

testgl.c is the improved version right now and testgl2.c the simple one.
2009-02-17 05:44:49 +00:00
Sam Lantinga
33ba78ff59 More of the same 2009-02-09 06:42:38 +00:00
Sam Lantinga
5dcf7511db Implemented Win32 version of the native window test 2009-02-09 06:41:49 +00:00
Sam Lantinga
8cb6792622 Whoops, missed a file 2009-02-09 06:28:45 +00:00
Sam Lantinga
e141340a20 Added test program for SDL_CreateWindowFrom()
Make sure OpenGL library is loaded before working with OpenGL windows,
even those created with SDL_CreateWindowFrom()
2009-02-09 05:32:12 +00:00
Sam Lantinga
765fb4319c indent 2009-01-14 04:25:32 +00:00
Ryan C. Gordon
b6c7cede3d testresample.c: Write out correct size for resampled buffer. 2009-01-11 04:29:36 +00:00
Ryan C. Gordon
3194059973 Added testresample.c 2009-01-11 04:05:28 +00:00
Sam Lantinga
773c885015 indent 2009-01-04 23:41:09 +00:00
Sam Lantinga
eb2a8d36a0 Date: Sat, 3 Jan 2009 22:11:18 -0500
From: "Donny Viszneki"
Subject: Re: [SDL] Want to help with SDL 1.3?

>> > For example, here's a good quick project for someone from the TODO list:
>> > * Add diagonal line clipping to SDL_IntersectRectAndLine()

Just wanted to point out that the patch is available at
http://codebad.com/rect-line-ix.patch

I hereby grant Sam Lantinga an irrevocable non-exclusive distribution
license to this patch to do with as he wishes.
2009-01-04 19:33:21 +00:00
Sam Lantinga
e19ae7644f Fine tuned revision code, updated testver 2009-01-04 05:27:13 +00:00
Sam Lantinga
658ede9913 Correct the test program 2008-12-24 13:04:18 +00:00
Sam Lantinga
8074db74ef Fixed crash in testdraw2, added more points 2008-12-21 17:55:02 +00:00
Sam Lantinga
8318ef98b6 Added RenderPiont() API
Merged the drawing tests into a single test program
2008-12-21 17:39:41 +00:00
Sam Lantinga
686e035308 Added test program to verify fill functionality 2008-12-21 08:24:32 +00:00
Sam Lantinga
6fa6a75e4c indent 2008-12-20 23:10:20 +00:00
Sam Lantinga
03a3cba901 Add a few test pattern lines 2008-12-20 18:26:06 +00:00
Sam Lantinga
7c31254bef Added a test program for line drawing 2008-12-20 12:32:53 +00:00
Sam Lantinga
94e70de686 Date: Fri, 19 Dec 2008 20:17:35 +0100
From: Couriersud
Subject: Re: Aw: Experience using SDL1.3 in sdlmame/Proposal for api additions

> For consistency you'd probably want:
> SDL_SetRenderDrawColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
> SDL_SetRenderDrawBlendMode(SDL_BlendMode blendMode);
> SDL_RenderLine(int x1, int y1, int x2, int y2);
> SDL_RenderFill(SDL_Rect *rect);
>
> You probably also want to add API functions query the current state.
>

I have implemented the above api for the opengl, x11, directfb and
software renderers. I have also renamed *TEXTUREBLENDMODE* constants to
BLENDMODE*. The unix build compiles. The windows renderer still needs to
be updated, but I have no windows development machine at hand. Have a
look at the x11 renderer for a sample.

Vector games now run at 90% both on opengl and directfb in comparison to
sdlmame's own opengl renderer. The same applies to raster games.

The diff also includes

a) Changed XDrawRect to XFillRect in x11 renderer
b) A number of changes to fix blending and modulation issues in the
directfb renderer.
2008-12-20 12:00:00 +00:00
Sam Lantinga
3e8002422c Updated test for API changes 2008-12-13 12:34:28 +00:00
Sam Lantinga
369350caa0 Added current_w and current_h to SDL_VideoInfo for SDL 1.2 compatibility 2008-12-12 06:46:20 +00:00
Sam Lantinga
dc5ac3d35a Fixed palette sharing 2008-12-07 22:56:18 +00:00
Sam Lantinga
7e9c50dc26 Fixed crash in testpalette and potential crash in SDL_LoadBMP_RW() 2008-12-07 22:25:16 +00:00
Sam Lantinga
03719ab259 minor bug 2008-12-05 07:01:12 +00:00
Sam Lantinga
b19a33def3 Removed unused function 2008-12-02 16:10:21 +00:00
Sam Lantinga
a042a1ebc0 You can't use memset() on screen formats with an alpha channel 2008-12-02 16:09:58 +00:00
Sam Lantinga
420db1dc91 Fixed testalpha screen clear for screen formats with an alpha channel 2008-11-29 11:24:18 +00:00
Sam Lantinga
225831e41c Again, map the color with the alpha channel filled in. 2008-11-28 20:09:32 +00:00
Sam Lantinga
6692a9cb93 Map to black, not necessarily 0 2008-11-28 17:44:28 +00:00
Sam Lantinga
1a2a7e3b1d Show the grey background first before starting to blit sprites 2008-11-27 04:51:34 +00:00
Sam Lantinga
7c8033930d Both testsprite and testsprite2 use a grey background 2008-11-26 15:52:00 +00:00
Sam Lantinga
8f182d2156 indent 2008-11-25 02:21:53 +00:00
Sam Lantinga
cb6c4de7d8 2008-11-25 00:48:25 +00:00
Sam Lantinga
b0b75884f3 Fixed Direct3D rendering 2008-11-25 00:29:44 +00:00
Sam Lantinga
825b0b08f1 Fixed Bugzilla bug #205
Removed SDL_KillThread() from the API, as it isn't safe on many platforms.
2008-11-24 00:18:42 +00:00
Sam Lantinga
92c3984118 Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga
2008-10-04 06:46:59 +00:00
Darren Alton
242cd3897b Fixes to the NDS sprite2 test. Illustrates partially working texture-as-sprite functionality. 2008-09-06 04:31:34 +00:00
Edgar Simo
1e595453ac Allow testing haptic devices by index. 2008-09-04 13:43:39 +00:00
Sam Lantinga
708f4c7ac5 indent 2008-08-31 16:03:55 +00:00
Sam Lantinga
9c4b835e49 Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
2008-08-27 15:10:03 +00:00
Szymon Wilczek
5d823facd5 Many mouse and tablet linux test file added 2008-08-27 13:37:19 +00:00
Sam Lantinga
a6fa308712 Final merge of Google Summer of Code 2008 work...
Force Feedback for SDL
by Edgar Simo, mentored by Ryan C. Gordon
2008-08-25 09:55:03 +00:00
Sam Lantinga
474cfaad1e Final merge of Google Summer of Code 2008 work...
Many-mouse and tablet support
by Szymon Wilczek, mentored by Ryan C. Gordon

Everything concerning the project is noted on the wiki:
http://wilku.ravenlord.ws/doku.php?id=start
2008-08-25 06:33:00 +00:00
Bob Pendleton
b6e476a69b re: bug#563. checking in some commented out trace code and a fix so that the in testalpha.c the background only flashes when alpha == 255. The problem that is being
fixed is caused by clearing SDL_COPY_RLE_COLORKEY without setting SDL_COPY_RLE_DESIRED in SDL_UnRELSurface.
2008-03-14 18:17:49 +00:00
Bob Pendleton
98acd1149c In testdyngl.c the event type was being anded (&) with SDL_KEYDOWN and if the result was none zero the program was quiting. This is very weird because it was
working earlier this week.

I added some more trace code to SDL_x11events.c

In SDL_X11opengl.c I modified SDL_GL_GetSwapInterval() so that it returns a pretty good value even if you have the SGI swap extension instead of the MESA swap
extension. I just saved the value you set and return it too you.
2008-03-07 23:57:15 +00:00
Sam Lantinga
0a91c7905c Now the program will process all events and then terminate. :) 2008-02-23 05:10:40 +00:00
Bob Pendleton
c6f95692fa HandleEvent() returns done each time it is called. If done was set to 0 the program should quit, but because done is not checked until *all* events are handled a
following event can reset done to 1 and prevent the program from terminating when told to. I fixed the while loop that handles events to check for the state of done
after handling each event. That could leave some events unhandled when the program exits, but it ensures that the program will exit.
2008-02-20 23:27:33 +00:00
Sam Lantinga
4b2404a4eb Show integer scancode, since that's how it's defined in the header. 2008-02-10 17:29:23 +00:00
Sam Lantinga
27fce8ebae Fixed array overrun 2008-02-07 16:14:43 +00:00
Sam Lantinga
0e59c9db53 Fixed compile errors 2008-02-07 16:00:29 +00:00
Sam Lantinga
37131333be First pass of new SDL scancode concept for X11. 2008-02-07 15:31:09 +00:00
Sam Lantinga
0f9d544f5e First pass implementation of new SDL scancode concept, as discussed with
Christian Walther.  Currently only implemented on Mac OS X for sanity
checking purposes.
2008-02-05 07:19:23 +00:00