Commit Graph

2482 Commits

Author SHA1 Message Date
Sam Lantinga
404dfdff05 indent 2008-12-31 06:18:33 +00:00
Sam Lantinga
8011c2c571 Implemented Direct3D line and point drawing 2008-12-31 06:17:24 +00:00
Sam Lantinga
f4819de2bd Date: Mon, 29 Dec 2008 23:29:52 +0100
From: Couriersud
Subject: SDL1.3: Some X11 diffs

The attached diff fixes the following issues in the X11 backend:

a) When calling resize, actually a move was performed. This has been
corrected.

b) DisplayHeight and DisplayWidth do not return up-to-date information
after a modeswitch using the xrandr code, which I enabled in
x11_modes.c
Height and width are now queried from the root window and all
occurrences of DisplayHeight and DisplayWidth changed.
2008-12-30 17:09:42 +00:00
Sam Lantinga
b6a4db1954 Date: Mon, 29 Dec 2008 23:29:52 +0100
From: Couriersud

I have attached the latest DirectFB changes.
2008-12-30 17:02:53 +00:00
Sam Lantinga
e9caf73b61 indent 2008-12-30 17:02:06 +00:00
Sam Lantinga
1e89c90c36 Fixed missing return value 2008-12-30 07:15:46 +00:00
Sam Lantinga
605db668a8 SetDrawColor() and SetDrawBlendMode() are optional 2008-12-30 07:14:11 +00:00
Sam Lantinga
9f7980aedc In theory this implements GDI rendering, but it doesn't work for some reason.
Also removed blending support from the advertised interface, since it's not
actually supported.
2008-12-30 04:38:39 +00:00
Sam Lantinga
333d23bb58 Swapped functions to match the other renderer files 2008-12-30 04:22:24 +00:00
Sam Lantinga
b549312e0d Added project for testdraw2 2008-12-30 03:54:34 +00:00
Sam Lantinga
792319a9e6 Visual C++ 5 and 6 are no longer supported. You can use Visual C++ Express Edition to build SDL. 2008-12-30 03:51:20 +00:00
Sam Lantinga
c02482e990 Significant performance boost with blend mode none 2008-12-29 19:48:01 +00:00
Sam Lantinga
9d38eab29a Don't forget OpenGL 3.0 support 2008-12-25 05:39:54 +00:00
Sam Lantinga
a3f8129028 indent 2008-12-25 05:26:29 +00:00
Sam Lantinga
6883e72fe9 Fixed compiling Windows renderers. Lines and points will be implemented later. 2008-12-25 05:16:18 +00:00
Sam Lantinga
0465595d39 Updated to build on Windows 2008-12-25 05:11:29 +00:00
Sam Lantinga
b34845333f Updated project with new source files 2008-12-25 04:56:44 +00:00
Sam Lantinga
70cb1363d0 Fixed pitch alignment problem causing MITSHM error on 16-bit displays 2008-12-25 04:42:28 +00:00
Sam Lantinga
d426540e62 Fixed CPU feature detection on x86_64 platform
(registers were being corrupted, causing crashes)
2008-12-24 13:13:38 +00:00
Sam Lantinga
658ede9913 Correct the test program 2008-12-24 13:04:18 +00:00
Sam Lantinga
e53beea887 Don't unlock a surface we didn't lock 2008-12-24 12:17:25 +00:00
Sam Lantinga
6bd5c458f4 Fixed clipping source rect to match destination rect clipping 2008-12-23 04:51:36 +00:00
Sam Lantinga
c23e998d2d Need diagonal line clipping 2008-12-23 02:39:03 +00:00
Sam Lantinga
6763fa8275 Fixed argument order to the line clipping routine 2008-12-23 02:38:28 +00:00
Sam Lantinga
de843c65d6 Added line clipping 2008-12-23 02:23:18 +00:00
Sam Lantinga
a2258f8fb8 Added clipping for render copy 2008-12-23 01:28:06 +00:00
Sam Lantinga
9feaa729fd typo fix 2008-12-22 05:29:55 +00:00
Sam Lantinga
7ba47374bc /* 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
 */
2008-12-22 04:58:35 +00:00
Sam Lantinga
6000a35a70 Fixed crash when resizing the window with the software renderer.
This is similar to the crash fix in the OpenGL renderer in revision 4187
2008-12-22 04:52:43 +00:00
Sam Lantinga
8adb14536f Fixed clip_rect when drawing points and lines with software renderer.
Lock the minimal rect to minimize texture uploads
2008-12-21 20:17:41 +00:00
Sam Lantinga
77fa0d11ee Working Bresenham line drawing algorithm. We can optimize later, if needed. 2008-12-21 20:16:21 +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
4890f640e1 Make it possible to switch algorithms in the future 2008-12-21 08:59:56 +00:00
Sam Lantinga
5f5a1e9537 Added ARGB optimized case for Mac OS X 2008-12-21 08:55:06 +00:00
Sam Lantinga
32cdac94f1 Share code between fill and line drawing
Added general RGB surface format fallbacks to drawing code
Fixed issues with destination surface alpha channel
2008-12-21 08:28:25 +00:00
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