Commit Graph

31 Commits

Author SHA1 Message Date
Sam Lantinga
4b1c945432 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
e0a31b4dbb Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance. 2010-01-21 06:21:52 +00:00
Sam Lantinga
e250d2e0f5 Default to allow either accelerated or not 2009-12-15 20:53:09 +00:00
Sam Lantinga
262da78936 Added Ctrl-Z common key binding 2009-12-02 07:56:09 +00:00
Sam Lantinga
8adb9fc3cc 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.
2009-12-01 05:57:15 +00:00
Mike Gorchak
f53e17a4df Support for GL initialization parameters has been added. 2009-10-21 14:51:42 +00:00
Mike Gorchak
aafbae15c5 Options --double --triple have been added to test double and triple buffering. 2009-10-13 11:24:36 +00:00
Mike Gorchak
696387e501 Revert back. Sorry. 2009-10-10 17:07:49 +00:00
Mike Gorchak
2b98843157 Created windows must be destroyed at CommonQuit(). 2009-10-10 13:21:21 +00:00
Mike Gorchak
2949fd46f1 Proper window resize handling in GLES test application. 2009-06-11 06:03:05 +00:00
Sam Lantinga
aed8be2521 indent 2009-06-10 13:34:20 +00:00
Mike Gorchak
49687f83c0 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. 2009-06-10 05:56:36 +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
Sam Lantinga
0e59c9db53 Fixed compile errors 2008-02-07 16:00:29 +00:00
Sam Lantinga
7b145f5ad0 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
2007-08-19 14:52:52 +00:00
Sam Lantinga
5a79edd04b Added support for the --depth command line option 2007-07-23 01:11:52 +00:00
Bob Pendleton
3dc377941a 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.
2007-07-12 20:00:50 +00:00
Sam Lantinga
49f67ffc0c Visual C++ compiler warning fixes 2007-07-12 06:53:20 +00:00
Sam Lantinga
87e10ffe0c indent 2007-07-11 14:52:13 +00:00
Bob Pendleton
686d49d1ff fixed code for printing mousewheel events to match the new format of mousewheel events. 2007-07-06 15:45:28 +00:00
Sam Lantinga
71d3a5c67b Allow the render context to do necessary work when the video mode changes. 2006-08-06 04:39:13 +00:00
Sam Lantinga
34b09cb9e1 Clarified the difference between render drivers and render contexts 2006-08-06 00:09:04 +00:00
Sam Lantinga
b59f1d5aff In general, fill in pointers to structures, rather than return them. 2006-08-05 22:34:23 +00:00
Sam Lantinga
5b0dc2c1d5 SDL constants are all uppercase. 2006-08-05 17:09:42 +00:00
Sam Lantinga
9617df5b60 Implemented Cocoa mouse wheel events 2006-07-29 22:42:48 +00:00
Sam Lantinga
216e80ae61 Implemented Cocoa window support 2006-07-24 05:03:02 +00:00
Sam Lantinga
b7e5c8f440 If the OpenGL renderer is selected for a non-OpenGL window, recreate the window with OpenGL enabled.
Added OpenGL renderer error checking.
Use fast-path texture formats in the OpenGL renderer.
2006-07-22 21:02:57 +00:00
Sam Lantinga
5b2ef05897 Switch OpenGL contexts when switching render contexts.
Query the maximum texture size and show the current render parameters.
2006-07-22 19:51:48 +00:00
Sam Lantinga
accc2c8f4e Bug fixes to the OpenGL renderer 2006-07-22 18:01:56 +00:00
Sam Lantinga
6bdc957609 Implemented blend modes in the D3D renderer 2006-07-19 05:03:21 +00:00
Sam Lantinga
dcd15904cd Added a test program framework for easy initialization.
Started work on multi-window OpenGL demo
2006-07-18 07:49:51 +00:00