Commit Graph

75 Commits (3f1e3c303e1a0f4418949cef6d75af5a13463e45)

Author SHA1 Message Date
David Ludwig d92f0127d0 WinRT: enabled OpenGL ES 2 support by default
A copy of ANGLE/WinRT is still needed to run OpenGL content, but is not needed to compile SDL/WinRT.
2013-12-21 10:08:11 -05:00
David Ludwig 679259473e WinRT: removed a now-complete TODO comment regarding Direct3D 11 2013-11-29 00:21:56 -05:00
David Ludwig b6f80d855e WinRT: enable the OpenGL ES 2 SDL_Renderer backend, if and when OpenGL ES 2 support is compiled in 2013-11-29 00:19:46 -05:00
David Ludwig ecfbb3f5dc WinRT: got the SDL-official OpenGL ES 2 changes working, in an experimental state 2013-11-28 22:59:21 -05:00
David Ludwig 46740a5a1c WinRT: merged with latest SDL 2.x/HG code
SDL 2.x recently accepted patches to enable OpenGL ES 2 support via Google's ANGLE library.  The thought is to try to eventually merge SDL/WinRT's OpenGL code with SDL-official's.
2013-11-28 22:09:21 -05:00
Gabriel Jacobo c343eab67a Fixes #2271, Add KD detection under CMake by Scott Percival 2013-11-26 11:50:54 -03:00
Ryan C. Gordon e9af6dcd93 Fixed a few public APIs that we accidentally neglected to mark as SDLCALL.
Fixes Bugzilla #2262.
2013-11-23 15:52:49 -05:00
Gabriel Jacobo 61959aa67b OpenGL ES support for Windows 2013-11-22 13:24:53 -03:00
Sam Lantinga e4146267fa Fixed bug 2245 - add SDL_acos and SDL_asin
Sylvain

Here's some code to add arc cosine, and arc sin functions to SDL_stdlib.c
There are plainly written using SDL_atan.
2013-11-16 18:56:02 -08:00
Sam Lantinga 30f7e86882 Added space in the common state structure for render targets 2013-11-15 22:01:58 -08:00
Ryan C. Gordon 00003e8c00 Renamed things named after BeOS to be named after Haiku instead. 2013-11-14 11:51:24 -05:00
Ryan C. Gordon 8d6e03f353 Added SDL_DetachThread() API. 2013-11-14 00:52:39 -05:00
Ryan C. Gordon 7550ddcc05 Started BeOS removal: merged BeOS thread and pthread code.
Haiku uses most of the standard pthread API, with a few #ifdefs where we
still need to fallback onto the old BeOS APIs.

BeOS, however, does not support pthreads (or maybe doesn't support it well),
so I'm unplugging support for the platform with this changeset. Be Inc went
out of business in 2001.
2013-11-13 22:35:26 -05:00
Sam Lantinga 75145ea023 Added a hint SDL_HINT_VIDEO_FULLSCREEN_SPACES to specify that windows go fullscreen into their own spaces on Mac OS X. 2013-11-12 01:52:54 -08:00
Ryan C. Gordon 92b12812ac Added Ben Henning's GSoC2013 work: premake build system. 2013-11-10 00:38:37 -05:00
Sam Lantinga 621c7f8f1f Added SDL_HINT_CTRL_CLICK_EMULATE_RIGHT_CLICK hint which controls whether ctrl+click should emulate a right click on OSX. 2013-11-08 14:04:51 -08:00
Gabriel Jacobo 0b7c69fe12 Adds Joystick support for Android
This bumps the build SDK level to 12 (up from 10). Runtime requirements remain
the same (at API level < 12 joystick support is disabled).

Also enables building SDL for armv7 and x86.
2013-11-05 20:07:39 -03:00
David Ludwig 749117acd9 WinRT: added experimental OpenGL ES 2.0 support
A port of the ANGLE library (OpenGL ES 2.0 for Direct3D) to WinRT, via https://github.com/stammen/angleproject, is used as a base.

To enable, clone 'angleproject' into the directory one above where SDL/WinRT is, open the file SDL/include/SDL_config_winrt.h, and uncomment the #defines that begin with 'SDL_VIDEO_OPENGL'.  From there, apps can create an OpenGL capable SDL_Window via the flag, SDL_WINDOW_OPENGL, and an OpenGL ES 2 context via SDL_GL_CreateContext.  The Direct3D 11.1 renderer cannot be used alongside SDL_WINDOW_OPENGL.  Only Windows 8/8.1 is supported for now.  Shaders may need to be precompiled, in some (all?) cases.
2013-11-04 19:54:29 -05:00
Sam Lantinga 2efd40652d Clarified that SDL_memset4 is a 32-bit assignment and fixed a compiler warning 2013-11-03 09:42:23 -08:00
Philipp Wiesemann cd37485e3c Changed parameter name for gesture template save functions from "src" to "dst". 2013-11-02 12:07:21 +01:00
David Ludwig 3f8f680891 WinRT: spelling fix in SDL_hints.h 2013-10-27 23:19:35 -04:00
David Ludwig 69c5d21d7d WinRT: merged with SDL 2.0.1 codebase 2013-10-27 21:26:46 -04:00
David Ludwig 62c781eaff WinRT: made the Direct3D 11.x 'Debug Layer' be enable-able in any app via a hint
To enable the Debug Layer, set the hint, SDL_HINT_RENDER_DIRECT3D11_DEBUG to '1'.

The Debug Layer will be turned off by default, both in Release and Debug builds (of SDL).
2013-10-25 20:31:43 -04:00
Sam Lantinga 30ce2bc723 SDL 2.0.0 defined __inline__ and some code relies on it now. 2013-10-22 21:53:58 -07:00
Sam Lantinga d08634e2c6 Better fix for bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings
J?nis R?cis

Reopening as compilation with ANSI C throws lots of unnecessary warnings, both using MinGW and using Linux GCC. (BTW, what happened? MinGW is broken to all hell. sdl2-config does not even link SDLMain anymore?)

I think this may have been lost somewhere, so again: GCC supports inlining via __inline__ in all known versions of GCC, regardless of the C standard in use. Please don't assume that __STRICT_ANSI__ implies no inlining support.
2013-10-21 02:32:34 -07:00
Sam Lantinga 08fa8da77c Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings
Andreas Ertelt

The problem in question is caused by changeset 7771 (http://hg.libsdl.org/SDL/rev/5486e579872e / https://bugzilla.libsdl.org/show_bug.cgi?id=2121)

The redefinition of __inline__ (introduced by the addition of begin_code.h:128's "|| __STRICT_ANSI__") results in mingw's gcc throwing multiple

   warning: always_inline function might not be inlinable [-Wattributes]

as well as a whole bunch of redefinitions of mingw internals which break linking of projects including the SDL2 headers.
2013-10-20 21:56:15 -07:00
Sam Lantinga f5fa492e26 Added a macro SDL_TICKS_PASSED() to correctly compare two 32-bit tick values.
Went through the code and used the macro and fixed a couple places that were using incorrect timestamp comparisons.
2013-10-20 20:42:55 -07:00
Sam Lantinga 04e170ceb7 Added __WINDOWS__ to reflect both 32 and 64-bit windows platforms 2013-10-20 20:41:30 -07:00
Ryan C. Gordon 0e699eb5bb Added SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (thanks, David!).
Fixes Bugzilla #1985.
2013-10-20 21:18:05 -04:00
Sam Lantinga 8b79cbadef Added an API to get the amount of system RAM 2013-10-17 11:32:56 -07:00
Sam Lantinga 080c919b79 Fixed function feature test for Visual Studio 2012
norfanin

Fixes the version check for some functions that are only present with the MSVC 2013 CRT libraries.

I did my testing wrong and failed to see that 2012 doesn't have these functions. Microsoft implemented them in their upcoming 2013 version, though. The attached patch changes it to the check for the next version.

I also removed the HAVE_ITOA because that would require linking with oldnames.lib and it's easier to just let the SDL implementation take over.
2013-10-13 19:51:58 -07:00
Sam Lantinga a7e1fdddea Updated SDL to version 2.0.1 2013-10-10 21:50:25 -07:00
Gabriel Jacobo 89131435f8 Adds gl_profile_mask to test framework, uses it in testgles 2013-10-10 00:49:57 -03:00
Gabriel Jacobo b39a4daf04 SDL_TEXTINPUT support for EVDEV 2013-10-03 10:28:10 -03:00
David Ludwig 58dd086487 WinRT: unified the two, public, app-init functions
This function, SDL_WinRTRunApp, can be used to help launch either XAML or non-XAML/Direct3D-only based apps.
2013-09-22 12:26:53 -04:00
David Ludwig 0022dbf261 WinRT: made SDL_GetWindowWMInfo return window data in a slightly easier-to-use format
Having the window pointer available as a WinRT IInspectable should make it a bit easier to use in conjunction with WRL-based weak references.
2013-09-16 11:02:18 -04:00
David Ludwig f3bd9175a9 WinRT: more renaming of "windowsrt" to "winrt" 2013-09-04 19:55:45 -04:00
David Ludwig 2cafee9de1 WinRT: experimental and preliminary support for XAML-based overlays on Windows 8/RT
The XAML support here is still rudimentary.  Bugs do exist.  You've been warned.

XAML support in Windows Phone 8 is not yet available (in SDL/WinRT).
2013-08-27 21:21:09 -04:00
David Ludwig 1e78c4a5d1 WinRT: more "Windows RT" to "WinRT" renaming 2013-08-27 12:20:35 -04:00
David Ludwig 7be2ad71c9 WinRT: renamed SDL_SYSWM_WINDOWSRT to SDL_SYSWM_WINRT
This is part of an overall effort to use the name, "WinRT", rather than "WindowsRT" (or "Windows RT"), as the shorthand name often seems to mean something different than the longhand name.  (WinRT is an API, Windows RT is a product name)
2013-08-27 11:44:43 -04:00
David Ludwig 3dde6e1e9f WinRT: made sure SDL_main gets used in the latest SDL 2.0.0 based code 2013-08-13 20:28:10 -04:00
David Ludwig d41fdc94d6 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
David Ludwig f7049b93d5 WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d4ce48ff30d1) 2013-08-12 22:29:55 -04:00
Sam Lantinga 1ad936eb29 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow()
Rainer Deyke

I'm running Linux Mint 15 with the Cinnamon window manager.  SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
2013-08-11 19:56:43 -07:00
Sam Lantinga 69a4351eb0 Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi 2013-09-30 22:35:32 -07:00
Sam Lantinga 058aba086c Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42 2013-09-30 21:57:03 -07:00
Sam Lantinga 202528a48f Call AddRef() on the device so it doesn't accidentally get released from underneath the caller. 2013-09-28 14:07:17 -07:00
Sam Lantinga 25f607a3c2 Make it clear we're just returning a D3D9 device, allowing for new functions to get other D3D versions 2013-09-28 14:07:14 -07:00
Sam Lantinga cf5e5a8360 Added a hint to create the D3D device in thread-safe mode: SDL_HINT_RENDER_DIRECT3D_THREADSAFE 2013-09-28 14:07:08 -07:00
Sam Lantinga 803965bcc2 Added platform specific call: SDL_RenderGetD3DDevice() 2013-09-28 14:07:05 -07:00