Commit graph

2443 commits

Author SHA1 Message Date
Sam Lantinga
4058b718a5 Added missing return
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403356
2008-12-20 18:56:35 +00:00
Sam Lantinga
bb191f10ff Turn on line antialiasing (requires blending to be enabled)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403355
2008-12-20 18:40:30 +00:00
Sam Lantinga
c24222cb7a Add a few test pattern lines
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403354
2008-12-20 18:26:06 +00:00
Sam Lantinga
67946ae5db indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403353
2008-12-20 13:55:45 +00:00
Sam Lantinga
bab3f5e8a3 Placeholder for line drawing algorithm (current code doesn't work)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403352
2008-12-20 13:54:19 +00:00
Sam Lantinga
6efea2c6d6 Fixed crash in software line drawing
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403351
2008-12-20 13:53:54 +00:00
Sam Lantinga
af67559465 Added stubs for software implementations of blending fills and line drawing
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403350
2008-12-20 13:14:28 +00:00
Sam Lantinga
34bffd20f5 Added a test program for line drawing
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403349
2008-12-20 12:32:53 +00:00
Sam Lantinga
d29d0c965f Minor corrections
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403348
2008-12-20 12:32:38 +00:00
Sam Lantinga
2092365e5a indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403347
2008-12-20 12:32:25 +00:00
Sam Lantinga
9ba7210778 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403346
2008-12-20 12:00:00 +00:00
Sam Lantinga
60c39418a7 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403345
2008-12-20 08:41:05 +00:00
Sam Lantinga
03fa156604 Fixed crash when resizing YUV textures
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403344
2008-12-20 06:46:37 +00:00
Ryan C. Gordon
b18cb0012e More resampling fixes.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403343
2008-12-19 09:15:59 +00:00
Ryan C. Gordon
83de18855b Allocate SDL_AudioCVT::coeff before using it.
FIXME: this is a memory leak. We don't have an SDL_FreeAudioCVT() yet.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403342
2008-12-19 08:30:26 +00:00
Ryan C. Gordon
45ed26c3c2 Use SDL_zerop instead of SDL_memset.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403341
2008-12-19 06:43:41 +00:00
Ryan C. Gordon
d7d4dc4b7e Zero out SDL_AudioCVT struct before using it, to ensure it's all initialized.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403340
2008-12-19 06:01:03 +00:00
Sam Lantinga
61fbcbc956 Reminder to implement icon support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403339
2008-12-19 04:42:18 +00:00
Sam Lantinga
67861b2241 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403338
2008-12-17 07:19:55 +00:00
Sam Lantinga
c0775dd47f * Implemented X11 fullscreen input grab
* Progress towards being able to toggle in and out of fullscreen mode

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403337
2008-12-17 07:17:54 +00:00
Sam Lantinga
67426e7b9f indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403336
2008-12-16 17:44:10 +00:00
Sam Lantinga
a01b1f5aec Progress on fullscreen mode switching on X11
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403335
2008-12-16 17:41:03 +00:00
Sam Lantinga
3bb3945daa Use the desktop format instead of an arbitrary one.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403334
2008-12-16 17:40:30 +00:00
Sam Lantinga
57ccddd982 Corrected case for TargetConditionals.h
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403333
2008-12-14 07:22:15 +00:00
Sam Lantinga
8f9aba9215 The X11 window and all pixmaps and images share the same visual and depth.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403332
2008-12-14 04:36:32 +00:00
Sam Lantinga
9e64157aee Whoops, the X11 driver doesn't support fullscreen modes (yet)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403331
2008-12-13 13:30:11 +00:00
Sam Lantinga
b2aebcc980 Fixed BadMatch error in X11 renderer
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403330
2008-12-13 13:10:53 +00:00
Sam Lantinga
8e523bb721 Updated test for API changes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403329
2008-12-13 12:34:28 +00:00
Sam Lantinga
170521f21e 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403328
2008-12-13 06:36:47 +00:00
Sam Lantinga
0e5cb512e3 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403327
2008-12-13 06:27:58 +00:00
Sam Lantinga
8437f9f8d2 Updated TODO list
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403326
2008-12-13 04:11:24 +00:00
Edgar Simo
f6dfd2babf Some error checking when destroying the HelperWindow.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403325
2008-12-12 15:51:57 +00:00
Sam Lantinga
1d49195b8c Added current_w and current_h to SDL_VideoInfo for SDL 1.2 compatibility
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403324
2008-12-12 06:46:20 +00:00
Sam Lantinga
9719f4078b Updated TODO list
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403323
2008-12-10 08:39:00 +00:00
Sam Lantinga
61a7bca88f 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403322
2008-12-08 00:52:12 +00:00
Sam Lantinga
0c30a927ed Updated copyright date
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403321
2008-12-08 00:27:32 +00:00
Sam Lantinga
6e7ef5d5b1 A little cleanup for SDL snapshot release
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403319
2008-12-08 00:24:15 +00:00
Sam Lantinga
46a9b85814 Don't need multi-threaded X11 for SDL 1.3
Plus, this fixes lots of duplicate define warnings on Mac OS X

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403318
2008-12-07 23:57:42 +00:00
Sam Lantinga
d60660c1de Default SSE2 off on iX86, since gcc will use it for floating point operations
even if -mfpmath=387 is set.  Grr...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403317
2008-12-07 23:25:39 +00:00
Sam Lantinga
f9312a8957 Fixed palette sharing
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403316
2008-12-07 22:56:18 +00:00
Sam Lantinga
6096d0f8e1 Fixed updating the video surface when the palette changes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403315
2008-12-07 22:48:06 +00:00
Sam Lantinga
cc01f2a867 Fixed picking blit function when RLE fails
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403314
2008-12-07 22:37:40 +00:00
Sam Lantinga
b47ba57912 Better default format for Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403313
2008-12-07 22:29:58 +00:00
Sam Lantinga
45899bac10 Fixed crash in testpalette and potential crash in SDL_LoadBMP_RW()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403312
2008-12-07 22:25:16 +00:00
Sam Lantinga
a1b17450ce Whoops, fixed pitch bug after resizing a surface
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403311
2008-12-07 22:04:24 +00:00
Sam Lantinga
3eec2c4dd4 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. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403310
2008-12-07 21:53:28 +00:00
Ryan C. Gordon
546fea4e11 Comment cleanup.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403309
2008-12-07 07:16:40 +00:00
Ryan C. Gordon
0096fd0e8d Don't hardcode RECT for fragment program texture targets.
Now we can generate what a given system needs when compiling the shader.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403308
2008-12-07 07:06:34 +00:00
Sam Lantinga
8b4a508fb4 Slight optimization of the shader, no need to scale into 0..255
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403307
2008-12-07 04:38:32 +00:00
Sam Lantinga
5908561ee3 Added official support for GL_APPLE_ycbcr_422 and GL_MESA_ycbcr_texture
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403306
2008-12-07 04:02:23 +00:00