Commit Graph

199 Commits

Author SHA1 Message Date
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
b9d3d66bfb Okay, still some bugs, but everything builds again... 2007-08-18 05:39:09 +00:00
Sam Lantinga
49204a8cdd indent 2007-08-12 16:26:10 +00:00
Sam Lantinga
e9aa9188bf Fixed compile warnings with Visual C++ 2007-08-12 00:01:41 +00:00
Sam Lantinga
16792e5ed3 Emphasized the separation between SDL_Surface and SDL_Texture
- SDL_Surface is a system memory representation of pixel data
 - SDL_Texture is a video memory representation of pixel data

The concept of SDL_Surface with SDL_HWSURFACE is no longer used.

Separated SDL_Texture types by usage rather than memory type
 - SDL_TEXTUREACCESS_STATIC is for rarely changed pixel data,
   can be placed in video memory.
 - SDL_TEXTUREACCESS_STREAMING is for frequently changing pixel
   data, usually placed in system memory or AGP memory.

Optimized the SDL_compat usage of the OpenGL renderer by only
using one copy of the framebuffer instead of two.
2007-08-11 20:54:31 +00:00
Sam Lantinga
5a79edd04b Added support for the --depth command line option 2007-07-23 01:11:52 +00:00
Sam Lantinga
54b8c863e2 indent 2007-07-15 21:53:51 +00:00
Ryan C. Gordon
039e57b150 Merged r3292:3293 from branches/SDL-1.2: testjoystick verbose info. 2007-07-15 17:25:59 +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
45339ba922 Creating a context makes it current, per the documentation.
Applied a variant of the multi-card OpenGL fix from SDL 1.2
2007-07-12 06:31:36 +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
Ryan C. Gordon
8f93afdb30 Replaced a few memset/memcpy calls with SDL_memset/SDL_memcpy. 2007-07-05 02:47:54 +00:00
Ryan C. Gordon
eba15b3817 Merged r3140:3141 from branches/SDL-1.2: loopwave fix. 2007-07-05 02:45:47 +00:00
Sam Lantinga
bdab6824fd Fix for bug #447 merged from SDL 1.2 2007-07-04 08:01:04 +00:00
Sam Lantinga
c123a18337 Fixed bug #349
Solaris doesn't support the LATIN1 character set alias.

Merged from 1.2 svn revision 3133f
2007-07-04 07:08:16 +00:00
Sam Lantinga
0878fc88cf Merged change from 1.2 to add X11 path for OpenGL detection 2007-06-30 08:11:02 +00:00
Sam Lantinga
b6ab6bf6d5 make indent 2007-06-14 13:21:29 +00:00
Ryan C. Gordon
f2fcf98bea Merged r3059:3060 from branches/SDL-1.2: output key event's keysym. 2007-06-13 06:05:39 +00:00
Ryan C. Gordon
ecdd9e9d78 Merged r2999:3000 from branches/SDL-1.2: Visual Studio compilation fix. 2007-03-30 06:30:14 +00:00
Ryan C. Gordon
4029000c33 Merged r2960:2961 from branches/SDL-1.2...free all cursors in test/testcursor.c 2007-02-13 09:21:38 +00:00
Patrice Mandin
8e1d001e89 Alpha sort the test list, add missing ones, remove removed ones 2007-01-05 19:12:50 +00:00
Ryan C. Gordon
1d568c715b Merged r2901:2902 from SDL-1.2 branch to trunk: printf stupidity fixes. 2006-11-07 15:02:12 +00:00
Ryan C. Gordon
2c138525f1 Merged r2899:2900 from SDL-1.2 branch to trunk: testloadso program. 2006-11-07 14:36:47 +00:00
Ryan C. Gordon
b94f08253a Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
Sam Lantinga
c91d18d6ad indent is evil 2006-10-28 16:48:03 +00:00
Ryan C. Gordon
7f17eb8863 Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk. 2006-10-17 09:15:21 +00:00
Sam Lantinga
7462d2796b Added source color and alpha modulation support.
Added perl script to generate optimized render copy functions.
2006-08-28 03:17:39 +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
bcbb41b25f Implemented OpenGL support on Mac OS X
The OpenGL renderer works without changes, yay! :)
2006-07-25 06:22:42 +00:00
Sam Lantinga
216e80ae61 Implemented Cocoa window support 2006-07-24 05:03:02 +00:00
Sam Lantinga
ab6710f259 The Mac OS X Cocoa video driver is under construction...
Note that SDLmain is no longer necessary on Mac OS X. :)
2006-07-23 09:11:10 +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
26eb39ffa6 Implemented scaling in the D3D renderer 2006-07-19 05:45:42 +00:00
Sam Lantinga
6bdc957609 Implemented blend modes in the D3D renderer 2006-07-19 05:03:21 +00:00
Sam Lantinga
e48bd78a26 Implemented multi-window OpenGL program with test framework. 2006-07-19 04:24:41 +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
Sam Lantinga
c71b106d69 Setting up the OpenGL support 2006-07-16 09:34:01 +00:00
Sam Lantinga
ed287169af Streamlined the API a bit and optimized the software renderer. 2006-07-15 09:46:36 +00:00
Sam Lantinga
aa2eab852a Yay! D3D renderer works! 2006-07-14 07:41:16 +00:00
Sam Lantinga
0c86ca7a06 More of the Direct3D renderer is implemented, I'm not sure why it's not showing texture copies yet... 2006-07-14 06:40:53 +00:00
Sam Lantinga
6bc598ea61 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
Sam Lantinga
1d95e86391 Fix for bug #240
Christian Walther contributed Cocoa cursor code.
2006-06-24 17:36:55 +00:00