Commit Graph

4190 Commits

Author SHA1 Message Date
Sam Lantinga
0a92449744 The Xext directory no longer exists 2011-03-05 10:03:57 -08:00
Sam Lantinga
2368a3301a Added support for Windows cursors 2011-02-28 23:50:32 -08:00
Sam Lantinga
4b86de315f Fixed warning on Windows 2011-02-28 23:50:07 -08:00
Sam Lantinga
0f59f2fdbb Fixed memory leak freeing cursors 2011-02-28 22:21:32 -08:00
Sam Lantinga
8457ab1e62 You can use SDL_ConvertSurfaceFormat() now
Also, icon is guaranteed not to be NULL going into this function.
2011-02-28 21:58:37 -08:00
Sam Lantinga
5b710cfee4 Oh yeah, we're using extern 2011-02-28 21:48:02 -08:00
Sam Lantinga
10c875b184 Fullscreen doesn't automatically grab the cursor. 2011-02-28 20:19:28 -08:00
Sam Lantinga
9053cfa4cc Removed extra NoStdio configuration 2011-02-28 20:16:12 -08:00
Sam Lantinga
ddb28aeb49 Removed duplicate assignment 2011-02-28 18:03:14 -08:00
Sam Lantinga
9b04915913 If you pass in texture format 0, it'll use the first supported texture format. 2011-02-28 14:47:39 -08:00
Sam Lantinga
05b0c40ffa Fixed setting draw color for clear 2011-02-28 09:26:35 -08:00
Sam Lantinga
6053ae5234 OSF isn't supported anymore. 2011-02-28 09:09:13 -08:00
Sam Lantinga
303287a180 IRIX is not supported anymore. :) 2011-02-28 09:06:29 -08:00
Sam Lantinga
8706244c39 SDL_revision.h is always updated as part of the build process now. 2011-02-28 09:06:15 -08:00
Sam Lantinga
73b501d88c Dynamically load the Xinerama and xf86vmode extensions
This fixes a few bugs with different distributions:
http://bugs.freedesktop.org/show_bug.cgi?id=17431
http://bugs.gentoo.org/show_bug.cgi?id=246177
2011-02-28 09:01:53 -08:00
Sam Lantinga
e32b25be9e Fixed compiling AltiVec blitters 2011-02-27 22:22:58 -08:00
Sam Lantinga
cde0d1bc03 Implemented mouse relative mode on Mac OS X. 2011-02-27 22:06:46 -08:00
Sam Lantinga
9959455aee Added a cleaner way to set the default cursor.
Added a way to cycle through the default cursor in testcursor.c
2011-02-27 21:36:23 -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
ade868c17f Use boolean value for input grab mode, like we do for fullscreen mode. 2011-02-27 20:06:45 -08:00
Sam Lantinga
ce2aa2ee1d Zero streaming textures at the driver level 2011-02-26 21:39:34 -08:00
Sam Lantinga
c506aacb3a Fix fullscreen origin on Mac OS X 10.4 2011-02-26 11:59:33 -08:00
Sam Lantinga
3f465b7523 Fixed bug 1141
Rebuild the window with the new style on older versions of Mac OS X.
2011-02-26 11:29:23 -08:00
Sam Lantinga
9c8d95eab0 Restore the window title when the title bar is re-added to the window. 2011-02-26 10:15:13 -08:00
Sam Lantinga
fbdf7429d5 Restore the windowed position and size when coming back from fullscreen.
Also fixed problem where Cocoa would move the windows in response to the fullscreen mode change.
2011-02-26 10:11:09 -08:00
Sam Lantinga
0dd9ad216f Hopefully fixed crashes when creating multiple streaming textures of different sizes. 2011-02-24 23:42:58 -08:00
Sam Lantinga
82a00575e9 Tracking rectangles had some problems, it's easier to track things directly. (fixes bug 1149, 1147, 1146) 2011-02-24 18:11:29 -08:00
Sam Lantinga
1a2a914b33 Fixed bug 1145 (GL Context creation fails for OpenGL 3.2 + Alpha buffer with X11 BadMatch)
Matthias      2011-02-23 09:37:51 PST

Please view the attached source file. Using this minimal program (as attached),
it creates an OpenGL 2.0 context with a cleared color buffer. If I set the
OpenGL version to 3.2, the function SDL_GL_CreateContext fails (or more
specifically, glXMakeCurrent fails) with an X11 BadMatch error:


X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  128 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  153
  Current serial number in output stream:  153


Also note that if I do not specify the alpha buffer size, the program works for
OpenGL 2.0 and OpenGL 3.2.

After some further analysis, I believe I have found the problem. The specific
issue is in:

SDL_x11opengl.c::X11_GL_CreateContext.

Note that for OpenGL 3.2 contexts, the GLXFBConfig to use is chosen as the best
match from glXChooseFBConfig. However, opengl attributes originally set with
SDL_GL_SetAttribute are not mapped to GLX attributes and then passed to the
glXChooseFBConfig function. According to the GLX 1.4 specification, if the
attributes are not specified, the function falls back to defaults (which, in
this particular case, prefer alpha channel size == 0).

For testing purposes, I modified the call to glXChooseFBConfig to look
something like this:


int glxAttribs[] =
{
 GLX_RED_SIZE,8,
 GLX_GREEN_SIZE,8,
 GLX_BLUE_SIZE,8,
 GLX_ALPHA_SIZE,8,
 None
};

if (!glXChooseFBConfig ||
 !(framebuffer_config = glXChooseFBConfig(display, DefaultScreen(display),
glxAttribs, &fbcount)))
{
 ...
}


The best match GLXFBConfig then supports 8 bit alpha channel. The program then
works as intended.


Hope this helps!
2011-02-24 17:52:47 -08:00
Sam Lantinga
65af7584bf SDL 1.3 doesn't use nasm anymore. :) 2011-02-24 09:41:04 -08:00
Sam Lantinga
2f682c9d08 Fixed compile error on some versions of Mac OS X. 2011-02-23 15:06:14 -08:00
Sam Lantinga
d79f7ed02d Fixed altivec.h include on Mac OS X 2011-02-22 22:17:44 -08:00
Sam Lantinga
e4a0db291e Re-added the 3DNow! and AltiVec instruction support. 2011-02-22 21:44:36 -08:00
Sam Lantinga
92bf0fc2fd Update the cursor correctly when it enters and leaves the window. 2011-02-21 23:45:48 -08:00
Sam Lantinga
1918f54080 Actually set the cursor! :) 2011-02-21 23:10:00 -08:00
Sam Lantinga
642eea1ebc Simplified the X11 window creation 2011-02-21 22:52:31 -08:00
Sam Lantinga
f817468a0b The OpenGL test window shouldn't be visible. 2011-02-21 22:52:07 -08:00
Sam Lantinga
36be715703 Don't automatically send minimized and maximized events, it's up to the windowing system to decide what to do with them. 2011-02-21 22:51:44 -08:00
Sam Lantinga
252402726d Clear the hidden flag when shown and the shown flag when hidden. 2011-02-21 22:50:15 -08:00
Sam Lantinga
0f6925189c Simplified Windows window creation. 2011-02-21 22:27:19 -08:00
Sam Lantinga
9da77abd36 Fixed compiler warnings 2011-02-21 22:26:59 -08:00
Sam Lantinga
f8481050cd Simplified and unified the window creation process a little. 2011-02-21 22:03:39 -08:00
Sam Lantinga
165076c9c3 We can defer window creation.
Added documentation for why we need an SDLView
2011-02-21 21:32:11 -08:00
Sam Lantinga
f3564c3a8e Fixed compiler warning 2011-02-21 20:35:44 -08:00
Sam Lantinga
24864a72cc Added disabled preferences menu option so it looks more like other application menus. 2011-02-21 20:34:22 -08:00
Sam Lantinga
22779f35b2 Implemented cursor support and SDL_WarpMouseInWindow() on Mac OS X 2011-02-21 17:15:50 -08:00
Sam Lantinga
ada3863500 Implemented Cocoa_SetWindowIcon(), added SDL_ConvertSurfaceFormat() 2011-02-21 16:45:23 -08:00
Sam Lantinga
eb66b35c80 We still want the delegate functionality for windowShouldClose() 2011-02-21 15:25:49 -08:00
Sam Lantinga
9619f0bccf Do error checking in SDL_GetDisplayForWindow() 2011-02-21 15:08:36 -08:00
Sam Lantinga
5d5c23d421 SDL still supports older iPod Touch and first generation iPhones. 2011-02-21 11:04:27 -08:00
Sam Lantinga
658997241d Fixed the responder chain for event handling, the listener fully handles mouse events - even in fullscreen mode.
The only reason we need a custom view is to handle right mouse down.

Implemented mouse grabbing, although it's kind of clunky right now.  I'll be adding a relative mode that will be smoother soon.
2011-02-21 10:50:53 -08:00