Commit graph

3272 commits

Author SHA1 Message Date
Sam Lantinga
8312eae257 Visual C++ 5 and 6 are no longer supported. You can use Visual C++ Express Edition to build SDL.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403385
2008-12-30 03:51:20 +00:00
Sam Lantinga
63191e7a8b Significant performance boost with blend mode none
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403384
2008-12-29 19:48:01 +00:00
Sam Lantinga
5ab1d77623 Don't forget OpenGL 3.0 support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403383
2008-12-25 05:39:54 +00:00
Sam Lantinga
08e0277512 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403382
2008-12-25 05:26:29 +00:00
Sam Lantinga
c553683086 Fixed compiling Windows renderers. Lines and points will be implemented later.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403381
2008-12-25 05:16:18 +00:00
Sam Lantinga
c53a7c6ca2 Updated to build on Windows
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403380
2008-12-25 05:11:29 +00:00
Sam Lantinga
30af8c9442 Updated project with new source files
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403379
2008-12-25 04:56:44 +00:00
Sam Lantinga
6a3665cb25 Fixed pitch alignment problem causing MITSHM error on 16-bit displays
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403378
2008-12-25 04:42:28 +00:00
Sam Lantinga
92f0abc075 Fixed CPU feature detection on x86_64 platform
(registers were being corrupted, causing crashes)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403377
2008-12-24 13:13:38 +00:00
Sam Lantinga
4f65eb9602 Correct the test program
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403376
2008-12-24 13:04:18 +00:00
Sam Lantinga
f17910095b Don't unlock a surface we didn't lock
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403375
2008-12-24 12:17:25 +00:00
Sam Lantinga
03955f8e47 Fixed clipping source rect to match destination rect clipping
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403374
2008-12-23 04:51:36 +00:00
Sam Lantinga
2090241432 Need diagonal line clipping
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403373
2008-12-23 02:39:03 +00:00
Sam Lantinga
8efff3ff96 Fixed argument order to the line clipping routine
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403372
2008-12-23 02:38:28 +00:00
Sam Lantinga
eb9f3bc6eb Added line clipping
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403371
2008-12-23 02:23:18 +00:00
Sam Lantinga
c2755172c2 Added clipping for render copy
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403370
2008-12-23 01:28:06 +00:00
Sam Lantinga
01a9edc33a typo fix
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403369
2008-12-22 05:29:55 +00:00
Sam Lantinga
d62956121f /* FIXME FIXME FIXME
* Window creation fails in the colormap code on DirectColor visuals:
 *      XA_RGB_BEST_MAP not found and could not be created
 * I'm disabling this for now until Bob can look at it.  We don't need
 * it until we implement the gamma fading using DirectColor RGB ramps
 */

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403368
2008-12-22 04:58:35 +00:00
Sam Lantinga
1ebf771a53 Fixed crash when resizing the window with the software renderer.
This is similar to the crash fix in the OpenGL renderer in revision 4187

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403367
2008-12-22 04:52:43 +00:00
Sam Lantinga
03f292e261 Fixed clip_rect when drawing points and lines with software renderer.
Lock the minimal rect to minimize texture uploads

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403366
2008-12-21 20:17:41 +00:00
Sam Lantinga
18b9f5b296 Working Bresenham line drawing algorithm. We can optimize later, if needed.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403365
2008-12-21 20:16:21 +00:00
Sam Lantinga
5a7c477ecc Fixed crash in testdraw2, added more points
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403364
2008-12-21 17:55:02 +00:00
Sam Lantinga
f055f6a189 Added RenderPiont() API
Merged the drawing tests into a single test program

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403363
2008-12-21 17:39:41 +00:00
Sam Lantinga
4f84ec9b5e Make it possible to switch algorithms in the future
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403362
2008-12-21 08:59:56 +00:00
Sam Lantinga
c37ad66b0a Added ARGB optimized case for Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403361
2008-12-21 08:55:06 +00:00
Sam Lantinga
d95e51d2ea Share code between fill and line drawing
Added general RGB surface format fallbacks to drawing code
Fixed issues with destination surface alpha channel

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403360
2008-12-21 08:28:25 +00:00
Sam Lantinga
7b2e58c8c5 Added test program to verify fill functionality
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403359
2008-12-21 08:24:32 +00:00
Sam Lantinga
7714f3b084 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403358
2008-12-20 23:19:20 +00:00
Sam Lantinga
8bf6fb5f47 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403357
2008-12-20 23:10:20 +00:00
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