Commit Graph

2446 Commits

Author SHA1 Message Date
Sam Lantinga
686e035308 Added test program to verify fill functionality 2008-12-21 08:24:32 +00:00
Sam Lantinga
a4fed15d99 Date: Sat, 20 Dec 2008 23:25:19 +0100
From: Couriersud
Subject: 32 & 16 bit versions of blendrect and blendline

attached are 32, 16 and 15 bit versions of the blendrect and blendline
functionality. There was an issue with the bresenham alg. in drawline
which I also fixed.
2008-12-20 23:19:20 +00:00
Sam Lantinga
6fa6a75e4c indent 2008-12-20 23:10:20 +00:00
Sam Lantinga
b5201d604f Added missing return 2008-12-20 18:56:35 +00:00
Sam Lantinga
be0e05d990 Turn on line antialiasing (requires blending to be enabled) 2008-12-20 18:40:30 +00:00
Sam Lantinga
03a3cba901 Add a few test pattern lines 2008-12-20 18:26:06 +00:00
Sam Lantinga
40274d476d indent 2008-12-20 13:55:45 +00:00
Sam Lantinga
04239d1026 Placeholder for line drawing algorithm (current code doesn't work) 2008-12-20 13:54:19 +00:00
Sam Lantinga
b9692e08c9 Fixed crash in software line drawing 2008-12-20 13:53:54 +00:00
Sam Lantinga
f2c09059c1 Added stubs for software implementations of blending fills and line drawing 2008-12-20 13:14:28 +00:00
Sam Lantinga
7c31254bef Added a test program for line drawing 2008-12-20 12:32:53 +00:00
Sam Lantinga
18ce8e4eca Minor corrections 2008-12-20 12:32:38 +00:00
Sam Lantinga
ad3074b376 indent 2008-12-20 12:32:25 +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
daf038ecc4 indent 2008-12-20 08:41:05 +00:00
Sam Lantinga
a74cf87942 Fixed crash when resizing YUV textures 2008-12-20 06:46:37 +00:00
Ryan C. Gordon
e0728d1927 More resampling fixes. 2008-12-19 09:15:59 +00:00
Ryan C. Gordon
29777ee64b Allocate SDL_AudioCVT::coeff before using it.
FIXME: this is a memory leak. We don't have an SDL_FreeAudioCVT() yet.
2008-12-19 08:30:26 +00:00
Ryan C. Gordon
809690101a Use SDL_zerop instead of SDL_memset. 2008-12-19 06:43:41 +00:00
Ryan C. Gordon
59c33d9a0b Zero out SDL_AudioCVT struct before using it, to ensure it's all initialized. 2008-12-19 06:01:03 +00:00
Sam Lantinga
f0d933f425 Reminder to implement icon support 2008-12-19 04:42:18 +00:00
Sam Lantinga
2dd3c64cfe indent 2008-12-17 07:19:55 +00:00
Sam Lantinga
5d10dfeab6 * Implemented X11 fullscreen input grab
* Progress towards being able to toggle in and out of fullscreen mode
2008-12-17 07:17:54 +00:00
Sam Lantinga
1e0de4517d indent 2008-12-16 17:44:10 +00:00
Sam Lantinga
e983f2162d Progress on fullscreen mode switching on X11 2008-12-16 17:41:03 +00:00
Sam Lantinga
9ad4a87532 Use the desktop format instead of an arbitrary one. 2008-12-16 17:40:30 +00:00
Sam Lantinga
893e52b5a0 Corrected case for TargetConditionals.h 2008-12-14 07:22:15 +00:00
Sam Lantinga
e7f3d9dc3e The X11 window and all pixmaps and images share the same visual and depth. 2008-12-14 04:36:32 +00:00
Sam Lantinga
b0a80e17f6 Whoops, the X11 driver doesn't support fullscreen modes (yet) 2008-12-13 13:30:11 +00:00
Sam Lantinga
d46fe961f6 Fixed BadMatch error in X11 renderer 2008-12-13 13:10:53 +00:00
Sam Lantinga
3e8002422c Updated test for API changes 2008-12-13 12:34:28 +00:00
Sam Lantinga
c5a8886195 Fixed SDL 1.2 compatibility problem.
The API specifies that SDL_OpenAudio() will fill out the 'desired' audio spec
with the correct samples and size set by the driver.  This value is important
since it may be used by applications that size audio buffers, etc.

However, we want to allow advanced applications to call SDL_OpenAudioDevice()
which gets passed a const 'desired' parameter, and have the correct data filled
into the 'obtained' parameter, possibly allowing or not allowing format changes.

So... 'obtained' becomes the audio format the user callback is expected to use,
and we add flags to allow the application to specify which format changes are
allowed.

Note: We really need to add a way to query the 'obtained' audio spec.
2008-12-13 06:36:47 +00:00
Sam Lantinga
b252c87d35 indent 2008-12-13 06:27:58 +00:00
Sam Lantinga
ca75771ea7 Updated TODO list 2008-12-13 04:11:24 +00:00
Edgar Simo
409cae2c08 Some error checking when destroying the HelperWindow. 2008-12-12 15:51:57 +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
7b22359c71 Updated TODO list 2008-12-10 08:39:00 +00:00
Sam Lantinga
57af796d2c Date: Sun, 07 Dec 2008 13:35:23 +0100
From: Couriersud
Subject: SDL: Mouse last_x, last_y into SDL_Mouse

the attached diff moves the static vars last_x and last_y into
SDL_Mouse. These, as far as I understand it, should be tied to the
individual mouse.

The patch also makes the code check for out of window conditions of
mouse->x,y when relative movements are passed to MouseSendMotion.

Also attached is the latest DirectFB code (dfb20081208) supporting
multiple mice and keyboards. This works quite well with sdlmame now. It
however needs more testing with different directfb configurations.
2008-12-08 00:52:12 +00:00
Sam Lantinga
befb0f7f42 Updated copyright date 2008-12-08 00:27:32 +00:00
Sam Lantinga
8d3aa51736 A little cleanup for SDL snapshot release 2008-12-08 00:24:15 +00:00
Sam Lantinga
90c8eaaaa4 Don't need multi-threaded X11 for SDL 1.3
Plus, this fixes lots of duplicate define warnings on Mac OS X
2008-12-07 23:57:42 +00:00
Sam Lantinga
fbb82fa616 Default SSE2 off on iX86, since gcc will use it for floating point operations
even if -mfpmath=387 is set.  Grr...
2008-12-07 23:25:39 +00:00
Sam Lantinga
dc5ac3d35a Fixed palette sharing 2008-12-07 22:56:18 +00:00
Sam Lantinga
15b9112374 Fixed updating the video surface when the palette changes 2008-12-07 22:48:06 +00:00
Sam Lantinga
fa3ec5263d Fixed picking blit function when RLE fails 2008-12-07 22:37:40 +00:00
Sam Lantinga
6b0a2a6894 Better default format for Mac OS X 2008-12-07 22:29:58 +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
f29cdbb9b7 Whoops, fixed pitch bug after resizing a surface 2008-12-07 22:04:24 +00:00
Sam Lantinga
d7b138d966 There's no reason to add extra code to notify the mice of window size changes.
Just query the window size when we care about it. :)
2008-12-07 21:53:28 +00:00
Ryan C. Gordon
327d037f8c Comment cleanup. 2008-12-07 07:16:40 +00:00