Commit graph

78 commits

Author SHA1 Message Date
Sam Lantinga
819cc95139 Couriersud to Sam
Hi Sam,

20100815_1.diff contains updates for the directfb driver:

- more documentation, mainly on software OpenGL in README.directfb
- Revised error handling leading to leaner code
- Improved/fixed OpenGL handling of multiple contexts.
- Made the built-in simple window manager handle OpenGL windows.
- Rewrote pixelformat mapping - this was quite ugly before.

Well, all software GL, but working :-)
2010-08-16 09:04:55 -07:00
Sam Lantinga
4e19d730a1 Couriersud to Sam
I have done some quick changes and at least the code compiles again. It
also works with a number of the test executables with the DFB X11
backend. I hope to find time to get SDLMAME to work with latest SDL1.3
(i.e. rip out multi-keyboard, multi-mice & cursor support) next week to
test it further.

Regards,

André
2010-07-23 21:33:00 -07:00
Sam Lantinga
4d3df8b3e3 Fixed bug #926
Updated copyright to LGPL version 2.1 and year 2010

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404453
2010-01-24 21:10:53 +00:00
Sam Lantinga
a0e019f786 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404438
2010-01-21 06:21:52 +00:00
Couriersud
e0624bc220 DirectFB driver compiles again
- moved to new drawing api

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404391
2010-01-11 21:49:09 +00:00
Sam Lantinga
b6b1631cb5 Fixed calls to SDL_AddRenderDriver()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404263
2009-12-04 08:45:08 +00:00
Sam Lantinga
1cd715e9db 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404241
2009-12-01 05:57:15 +00:00
Sam Lantinga
de0dbff224 Adam Strzelecki to SDL
Since current DirectFB implementation is incomplete for YUV surfaces (actually causes segmentation faults when trying Lock and use YUV planar textures) I decided to fix it a bit.
Here's a patch that should make DirectFB properly support YUV both packed and planar (3 planes).

(1) Removed SDL_BYTESPERPIXEL at all in favor of DFB_BYTES_PER_PIXEL(SDLToDFBPixelFormat(fmt)) which does return always proper BPP for YUVs too, coz SDL_BYTESPERPIXEL returns incorrect values for FOURCCs
(2) Fixed data->pixels allocation for planar YUVs in CreateTexture, it should allocate 150% more space
(3) Copy other planes for planar YUVs in UpdateTexture
(4) Moved checking if format is supported at all with DirectFB on CreateTexture at the beginning of the code

Waiting for comments,
--
Adam Strzelecki | nanoant.com

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403959
2009-10-04 04:03:37 +00:00
Sam Lantinga
628262d3af indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403502
2009-01-14 04:25:32 +00:00
Couriersud
072760ebb7 Fix fullscreen crash with DirectFB <= 1.2.0
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403501
2009-01-13 23:27:08 +00:00
Couriersud
c11962b08c Fixed MakeSubSurface compiling issue for DirectFB <= 1.2.0
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403500
2009-01-13 22:59:02 +00:00
Couriersud
eeeee88591 Added DFB_VERSION_ATLEAST macro
First attempt at replacing MakeSubSurface for pre 1.2.0 ==> Scaling not yet working

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403499
2009-01-13 21:17:38 +00:00
Couriersud
2cd9219893 DirectFB cleanups & simple window manager
- use SDL_getenv, not getenv ...
- no more support for 0.9.25 - not even mentioned any longer on directfb.org
- fix fullscreen issues
- add a simple window manager unless the directfb team comes up with a working wm.

The driver has support for a very, very basic window manager you may
want to use when runnning with "wm=default". Use

export SDL_DIRECTFB_WM=1

to enable basic window borders including icon support. In order to have the window title rendered,
you need to have the following font installed:

/usr/share/fonts/truetype/freefont/FreeSans.ttf

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403485
2009-01-11 23:49:23 +00:00
Sam Lantinga
d123950aa3 Reverted Bob's indent checkin
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403475
2009-01-10 21:50:26 +00:00
Bob Pendleton
44fa7675c8 I ran a global "make indent" it modified the following files.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403473
2009-01-09 20:43:30 +00:00
Sam Lantinga
fe0aae4a6f Whoops, missing files from Couriersud's update
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403462
2009-01-05 01:48:15 +00:00
Sam Lantinga
7c0f19e5aa Date: Sun, 04 Jan 2009 20:53:30 +0100
From: Couriersud
Subject: SDL1.3 DirectFB patches

The attached contains the following directfb changes:

- Dynamic loading of libdirectfb.so. This may to turned off as well in configure
- Use linux-input by default. May be switched off by environment variable.
- Added some code which will use directfb's x11 backend when DISPLAY is set.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403460
2009-01-04 23:43:33 +00:00
Sam Lantinga
57fa80fc86 Fixed X11 mouse motion/button events - it's not actually safe to cast mouse events to device events.
Fixed building SDL without XInput support
Simplified the process of registering a mouse device

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403402
2009-01-01 07:59:08 +00:00
Sam Lantinga
14ddac6468 Date: Mon, 29 Dec 2008 23:29:52 +0100
From: Couriersud

I have attached the latest DirectFB changes.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403392
2008-12-30 17:02:53 +00:00
Sam Lantinga
3fc02a176b SetDrawColor() and SetDrawBlendMode() are optional
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403389
2008-12-30 07:14:11 +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
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
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
d8d1c9d630 Date: Sat, 06 Dec 2008 14:54:10 +0100
From: Couriersud
Subject: SDL: DirectFB mouse patch

the attached patch (again) properly registers the mouse in the DirectFB
driver.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403302
2008-12-06 17:46:55 +00:00
Sam Lantinga
1709286e00 Date: Mon, 01 Dec 2008 00:57:15 +0100
From: Couriersud
Subject: SDL : Diff for directfb driver

please find attached a diff against SVN containing the following:

- Updated README.DirectFB a bit
- Fix compile issue with debug output
- Fix display mode setting/switching for directfb >= 1.2.2

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403276
2008-12-01 00:10:49 +00:00
Sam Lantinga
84ebed84ce Date: Wed, 26 Nov 2008 19:50:31 +0100
From: Couriersud
Subject: LPGL and closed-source license / Re: [Bug 607] Texture palette not up

Permission granted to release code under both LPGL and closed-source
commercial license.

Please find attached a minor patch fixing vsync handling in the directfb
driver and containing a small update to README.directfb

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403252
2008-11-26 21:59:35 +00:00
Sam Lantinga
771abd3620 Date: Sun, 31 Aug 2008 17:53:59 +0200
From: Couriersud
Subject: Re: Updated DirectFB driver for SDL1.3

attached is a patch which brings the directfb driver in line with
current svn. In addition:

* driver now is in line with the structure of the X11 driver.
  This adds a couple of files.
* driver now supports relative mouse movements

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403190
2008-08-31 16:04:32 +00:00
Sam Lantinga
ede44c4b85 Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403188
2008-08-27 15:10:03 +00:00
Sam Lantinga
4dd96455cc indent. *sigh*
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403173
2008-08-26 02:40:24 +00:00
Sam Lantinga
1127f31992 Date: Sun, 20 Jul 2008 22:34:37 +0200
From: Couriersud
Subject: Updated DirectFB driver for SDL1.3

please find attached a patch for an updated directfb driver for SDL1.3.
It does now
- properly supported the new input api.
- send unicode text events
- support directfb windows
- support multiple screens
- support hardware YUV scaling for the first YUV texture created.
- support hardware scaling for textures.
- properly interpret streaming access
- support software opengl if one manages to install the mesa directfb
driver (broken/not broken in mesa svn)

Within bugzilla (http://bugzilla.libsdl.org/show_bug.cgi?id=603) there
is another patch which fixes a crash due to GL context creation.

Kind regards,

couriersud

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403172
2008-08-26 02:32:45 +00:00
Sam Lantinga
8f8c80446d Date: Fri, 17 Aug 2007 01:12:31 +0200
From: Couriersud
Subject: fix for audio dsp exit crash / various dfb issues

improved cursor handling
fixes some mouse and event related bugs

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402621
2007-08-17 02:54:50 +00:00
Sam Lantinga
b480be4c28 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402606
2007-08-15 03:50:49 +00:00
Sam Lantinga
8dd6b2373b Date: Wed, 15 Aug 2007 01:08:38 +0200
From: Couriersud
Subject: Some SDL1.3 patches

Modified UpdateTexture to lock and unlock DirectFB-Surface.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402603
2007-08-15 03:19:21 +00:00
Sam Lantinga
7d034dcfb1 Exported the software renderer texture functions to make easier to create
a renderer based on a framebuffer.

Fixed an initialization bug with the dummy video display mode.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402589
2007-08-11 23:26:03 +00:00
Sam Lantinga
2de3ba209d Date: Sat, 11 Aug 2007 02:03:16 +0200 (CEST)
From: couriersud arcor.de
To: slouken@libsdl.org
Subject: Directfb driver for SDL1.3

Hi,

the attachment contains a patch for a SDL1.3 directfb driver. It supports:

- Renderer "directfb":

Hardware acceleration as supported by the underlying directfb driver. With a
radeon X850, testsprite2 runs at 50% to 70% of OpenGL (X11, dri) performance.

Also supports hardware accelerated yuv overlays. This must be enabled by sett
ing:

export SDL_DIRECTFB_YUV_DIRECT=1

- Renderer "opengl"

Supports software opengl using mesa opengl (make linux-directfb).

Some more information may be found in README.DirectFB

There will certainly still be some bugs, and there is some debug code around.
 When I find some time, I will compile against directfb-0.9.25 as distributed
 with ubuntu 7.04.

The diff also contains a fix for SDL_LockYUVOverlay fixing a bug in  *pixels
and pitches initialization.

Kind regards,

couriersud

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402588
2007-08-11 21:51:19 +00:00
Sam Lantinga
554147b6c7 make indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402345
2007-06-14 13:21:29 +00:00
Ryan C. Gordon
bbea62b8b9 Merged r3044:3045 from branches/SDL-1.2: directfb reported screen size fix.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402331
2007-06-04 11:17:46 +00:00
Ryan C. Gordon
e9d5ea6122 Merged r2985:2986 from branches/SDL-1.2: directfb yuv coop level fix.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402278
2007-02-20 21:08:00 +00:00
Sam Lantinga
0f030a1802 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401938
2006-07-10 21:04:37 +00:00
Sam Lantinga
b99279d95e --HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401741
2006-05-08 06:23:11 +00:00
Sam Lantinga
064c583f72 Eliminate duplicate video modes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401736
2006-05-08 04:19:03 +00:00
Sam Lantinga
e869c2f9b8 Date: Sun, 7 May 2006 19:22:33 -0400
From: Mike Frysinger
Subject: [SDL] [patch] fix building with DirectFB-0.9.25.1

another DirectFB release, another small bit of API breakage :)

this time around, DIKI_ALTGR has been removed and DIKI_ALT_R is supposed to be
used ... DIKI_ALT_R is not a new define, so there shouldnt be any need for
checking the DirectFB version ... it should work with older DirectFB's as
well

thanks to Sascha Schwarz for pointing this out on the Gentoo bugzilla:
http://bugs.gentoo.org/132571
-mike

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401734
2006-05-08 02:09:34 +00:00
Sam Lantinga
0416307588 More general fix for bug #189
The clipping is done at a higher level, and the low level functions are
passed clipped rectangles.  Drivers which don't support source clipping
have not been changed, so the image will be squished instead of clipped,
but at least they will no longer crash when the destination rect was out
of bounds.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401650
2006-04-17 06:47:23 +00:00
Sam Lantinga
e847bdc465 Fixed bug #175
Removed obsolete .cvsignore files... whee!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401612
2006-03-23 21:39:58 +00:00
Sam Lantinga
164d170fcd Improved DirectFB install detection
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401593
2006-03-22 09:18:10 +00:00
Sam Lantinga
c36118165e Use consistent identifiers for the various platforms we support.
Make sure every source file includes SDL_config.h, so the proper system
headers are chosen.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401406
2006-02-21 08:46:50 +00:00
Sam Lantinga
1da8cb0143 Use only safe string functions
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401383
2006-02-19 23:46:34 +00:00
Sam Lantinga
d3805eef09 New configure-based build system. Still work in progress, but much improved
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401365
2006-02-16 10:11:48 +00:00
Sam Lantinga
684909fae2 More header massaging... works great on Windows. ;-)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401362
2006-02-10 06:48:43 +00:00