Commit graph

59 commits

Author SHA1 Message Date
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
e0bb29f480 Backed out changeset ef550bdb8c1b 2011-03-28 20:33:41 -07:00
Ryan C. Gordon
610c824670 If a test program window resizes, resize its viewport, too. 2011-03-28 23:20:54 -04:00
Sam Lantinga
f731db9d8b NDS update
Frank Zago to SDL

There's also a patch to adapt one test for the nds, and that adds several
makefiles to compile these tests. Whenever you apply it, could you completely
remove the test/nds-test-progs/sprite and test/nds-test-progs/sprite2
directories ?
2011-03-26 21:28:17 -07:00
Sam Lantinga
768312f0a4 Added screenshot support for tests using the common framework. 2011-03-10 00:58:45 -08:00
Sam Lantinga
cde0d1bc03 Implemented mouse relative mode on Mac OS X. 2011-02-27 22:06:46 -08:00
Sam Lantinga
99de5726b1 Fixed minimizing fullscreen windows.
Removed misleading hide/unhide Cocoa notifications.
We have no way of knowing when a Cocoa window is maximized and then restored (right?)
Disabled spamy mouse motion events by default.
2011-02-27 21:17:06 -08:00
Sam Lantinga
8e56849e83 Fixed testgles on iOS (bug 1136) 2011-02-20 14:16:11 -08:00
Sam Lantinga
009af96ce0 We have the correct window, we don't have to search for it, duh. :) 2011-02-19 11:26:49 -08:00
Sam Lantinga
d865e46b13 Allow centering on a different display 2011-02-15 22:51:29 -08:00
Sam Lantinga
4187161566 Allow windows to be created on non-primary displays. 2011-02-10 22:37:01 -08:00
Sam Lantinga
018af55e16 Window coordinates are in the global space and windows are not tied to a particular display.
Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
2011-02-10 14:44:25 -08:00
Sam Lantinga
e9689c29d5 Be explicit about what display you're querying. The default display is 0. 2011-02-10 12:14:37 -08:00
Sam Lantinga
8f92919310 Added the ability to turn on logging output to the test programs 2011-02-08 23:13:28 -08:00
Sam Lantinga
df94d4c6a4 The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future. 2011-02-01 19:19:43 -08:00
Sam Lantinga
d627939049 Making the API simpler, the renderer present semantics are always having a backbuffer and then discarding it. This is best for hardware accelerated rendering.
--HG--
extra : rebase_source : bbe6641fce097c79ccd47f4e1ea6b27683fd0acb
2011-02-01 12:19:46 -08:00
Sam Lantinga
825e1da54d Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
--HG--
extra : rebase_source : f06ea01caa64c8ad14170c723e5af52dad64d779
2011-01-31 23:23:57 -08:00
Sam Lantinga
df1f384c5b Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
--HG--
extra : rebase_source : 4edac7fd162a2eb37a50159b958db37a03e944a5
2011-01-31 22:44:43 -08:00
Sam Lantinga
c3daf0f0cd Removed completely non-portable event thread hack.
Next I'll be working on generalizing the event sources and making the event queue lock-free. :)
2011-01-27 22:44:08 -08:00
krogoway
e253e1d991 When the last window is closed and the SDL_WINDOWEVENT_CLOSE event is sent, send the SDL_QUIT event.
Common.c now destroys the SDL_Window upon a SDL_WINDOWEVENT_CLOSE event to ensure that all windows get closed properly and the new code to handle the last window closes gets executed.
2011-01-27 15:58:30 -06:00
Sam Lantinga
fdea37a756 Added some missing pixel formats and SDL_GetPixelFormatName() 2011-01-12 14:53:23 -08:00
Sam Lantinga
35cc558917 Use the enumerated type for blend and scale mode instead of int
Renamed SDL_TextureScaleMode to SDL_ScaleMode
2010-12-12 15:19:05 -08:00
Sam Lantinga
a57835d4af Added missing pixel format 2010-07-28 01:32:39 -07:00
Sam Lantinga
c1eb1e8f25 Added support for testing window manager icons 2010-07-14 21:25:15 -07:00
Sam Lantinga
51b5767091 Added test case for maximize code 2010-07-13 23:05:14 -07:00
Sam Lantinga
ff0ba0afa5 Added an event when the clipboard is updated, triggered after the window gains the keyboard focus. 2010-07-08 22:54:03 -07:00
Sam Lantinga
b75fc9b1a1 Added simple clipboard test 2010-07-08 00:00:07 -07:00
Sam Lantinga
baf073e263 Fixed usage message - it shouldn't have a printf format specifier 2010-07-05 22:45:15 -07:00
Sam Lantinga
338f95eb06 Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
2010-05-09 20:47:22 -07: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
Sam Lantinga
240b5fcaab Default to allow either accelerated or not
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404320
2009-12-15 20:53:09 +00:00
Sam Lantinga
3c1211c031 Added Ctrl-Z common key binding
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404255
2009-12-02 07:56:09 +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
Mike Gorchak
78dec43e00 Support for GL initialization parameters has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404131
2009-10-21 14:51:42 +00:00
Mike Gorchak
c6540a326c Options --double --triple have been added to test double and triple buffering.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404082
2009-10-13 11:24:36 +00:00
Mike Gorchak
5095178f48 Revert back. Sorry.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404045
2009-10-10 17:07:49 +00:00
Mike Gorchak
ae04b1afaf Created windows must be destroyed at CommonQuit().
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404039
2009-10-10 13:21:21 +00:00
Mike Gorchak
fa620100d8 Proper window resize handling in GLES test application.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403653
2009-06-11 06:03:05 +00:00
Sam Lantinga
d03a7700eb indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403645
2009-06-10 13:34:20 +00:00
Mike Gorchak
e51e3cfd1c SDL pixel format string is printed near mode number in form of SDL_PIXELFORMAT_XXXXX, when --info option is passed. It is usefull for debugging.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403642
2009-06-10 05:56:36 +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
0f15089eef Fixed compile errors
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402718
2008-02-07 16:00:29 +00:00
Sam Lantinga
f0da180be1 Date: Thu, 05 Jul 2007 14:02:33 -0700
From: Sam Lantinga
Subject: SDL 1.3 keyboard plan

After lots of discussion with Christian, this is what we came up with:

> So, to sum up...
> SDLK_* become the physical keys, starting at > (1<<21)
> We create a macro SDLK_INDEX(X)
> We have two functions SDL_GetLayoutKey(SDLKey) and SDL_GetKeyName()
> SDL_GetLayoutKey maps to UCS4 for printable characters, and SDLK* for
  non-printable characters
> and does so based on the OS's current keyboard layout
> SDL_GetKeyName() handles both SDLK_* and UCS4, converting UCS4 to UTF-8 and
  converting SDLK_* into our names, which are UTF-8 for printable characters.
> WASD folks use SDLK_*, and 'I' folks use SDL_GetLayoutKey(SDLK_*)

Here is the patch he came up with, and his e-mail about it:

Date: Fri, 17 Aug 2007 19:50:28 +0200
From: Christian Walther
Subject: Re: SDL 1.3 keyboard plan

> Sounds great, go ahead and send me a patch.

Here goes! Thanks for having a look. Don't hesitate to comment if
anything does not conform to your ideas.

One caveat: Committing this now may break compilability of some video
drivers - specifically, if they use any of the SDLK_* codes that were
obsoleted and moved into SDL_compat.h. I only tried Cocoa (which did
break, but is already fixed) and X11 (which didn't, but then its key
handling is #iffed out). If that's a problem, it may need to go into
a branch.

  -Christian

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402630
2007-08-19 14:52:52 +00:00
Sam Lantinga
8b728544ee Added support for the --depth command line option
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402566
2007-07-23 01:11:52 +00:00
Bob Pendleton
abcafc2125 This code adds support for DirectColor visuals to SDL 1.3. The support uses part of the Xmu library. To ensure that the library is
available and to keep people form having to install yet another library I have added the essential parts of Xmu in
src/video/extensions/XmuStdCmap and an include file in src/video/extensions. The support makes use of standard X11 mechanisms to
create color maps and make sure that an application uses the same color map for each window/visual combination. This should make it
possible for gamma support to be implemented based on a single color map per application.

Hurm... it looks like "make indent" modified a few extra files. Those are getting committed too.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402509
2007-07-12 20:00:50 +00:00
Sam Lantinga
a154c5dad2 Visual C++ compiler warning fixes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402498
2007-07-12 06:53:20 +00:00
Sam Lantinga
bc4e3e95e3 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402490
2007-07-11 14:52:13 +00:00
Bob Pendleton
04c05620db fixed code for printing mousewheel events to match the new format of mousewheel events.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402432
2007-07-06 15:45:28 +00:00
Sam Lantinga
a1ced0d971 Allow the render context to do necessary work when the video mode changes.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402017
2006-08-06 04:39:13 +00:00
Sam Lantinga
461c8e2db4 Clarified the difference between render drivers and render contexts
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402016
2006-08-06 00:09:04 +00:00