Commit Graph

27 Commits (fa8fba3812a03bb08a9eeaefc82aa140baa47bbb)

Author SHA1 Message Date
Sam Lantinga dcd17f5473 Renderer logical size is now implemented as a render target
This fixes rounding errors with coordinate scaling and gives more flexibility in the presentation, as well as making it easy to maintain device independent resolution as windows move between different pixel density displays.

By default when a renderer is created, it will match the window size so window coordinates and render coordinates are 1-1.

Mouse and touch events are no longer filtered to change their coordinates, instead you can call SDL_ConvertEventToRenderCoordinates() to explicitly map event coordinates into the rendering viewport.

SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() have been renamed SDL_RenderCoordinatesFromWindow() and SDL_RenderCoordinatesToWindow() and take floating point coordinates in both directions.

The viewport, clipping state, and scale for render targets are now persistent and will remain set whenever they are active.
2023-02-03 12:57:37 -08:00
Sasha Szpakowski 90795291e4 Remove SDL_GL/Metal/Vulkan_GetDrawableSize().
SDL_GetWindowSizeInPixels supersedes those functions.
2023-01-29 11:20:33 -08:00
Sam Lantinga 7b50bae524 Renamed SDL events for clarity
Fixes https://github.com/libsdl-org/SDL/issues/6877
2023-01-24 07:26:48 -08:00
Sam Lantinga ea0c2f55be SDL API renaming: *Is* functions
Feedback from @icculus:
"IsTablet" uses "is" as a form of "to be" ...like, the actual question is of its nature.

The rest is just a superfluous word in the question and it flows as better English with if (RectEmpty) than if (IsRectEmpty)

Fixes https://github.com/libsdl-org/SDL/issues/6932
2022-12-28 19:40:25 -08:00
Sam Lantinga fc478c1bc0 SDL API renaming: SDL_joystick.h
Fixes https://github.com/libsdl-org/SDL/issues/6881
2022-12-27 05:50:46 -08:00
Daniel Gibson ab554c8392 Update doc/README-* for header-only SDL_main 2022-12-15 08:01:01 -08:00
Daniel Gibson 8e0693c982 Make iOS/tvOS (uikit) SDL_main header-only
Also adjusted iOS demo's includes to <SDL3/..> and explicit SDL_main.h

untested, I don't have Xcode (or a Mac, for that matter)

The xcode projects (for both Xcode-iOS/ and Xcode/) will probably
have to be adjusted for the SDL_main changes to work, but now at least
the iOS demo source should work as is :)
2022-12-15 08:01:01 -08:00
Sam Lantinga cc1f9eb983 Use Apple's nomenclature for macOS and iOS
Fixes https://github.com/libsdl-org/SDL/issues/6621
2022-11-25 16:00:06 -08:00
Sam Lantinga 2c4159b99a First pass at changing SDL 2.0 to SDL 3.0 2022-11-21 20:28:58 -08:00
slime f8f562dace iOS: remove dead pre-iOS 8 codepaths.
SDL hasn't supported those older iOS versions for a little while now.
2022-10-02 19:57:46 -07:00
tjpadula a0f143fc93
Add build target to Xcode project to create an xcframework for iOS (#6188) 2022-09-05 13:10:15 -07:00
Sam Lantinga f789bc7d5f Updated minimum OS targets on Apple platforms to match supported platforms using Xcode 13 2022-07-26 11:36:01 -07:00
Sam Lantinga cbe97cbf7f Added a step necessary for running on a real device 2021-11-30 21:25:40 -08:00
Sam Lantinga 056c09942d Updated iOS build instructions 2021-11-30 12:19:26 -08:00
Ryan C. Gordon 73a41f4058
Removed outdated build-scripts/iosbuild.sh
Fixes #1532.
2021-11-14 14:17:36 -05:00
Sam Lantinga 19c129faba Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true
in your application's Info.plist in order to get real Bluetooth mouse events.
2021-11-09 20:32:16 -08:00
Sylvain f5b87273e1
Fixed bug #4397 - update IOS documentation 2021-06-02 08:32:43 +02:00
Ryan C. Gordon b8590f1aec README-ios: added a note about enabling hidapi. 2018-10-29 15:51:38 -04:00
Sam Lantinga bd5c984ac0 Fixed bug 3850 - incorrect numbering in docs/README-ios.md
Michal

the numbering of the bulletpoints in:
docs/README-ios.md

has been mangled with:
changeset 11365	efd3bc8e5a9b

fix:
    12 2.  Open SDL.xcodeproj (located in Xcode-iOS/SDL) in Xcode.
    13 4.  Select your desired target, and hit build.

remove:
    28 1. Follow step 1 above.

adapt:
    29 2. cd (PATH WHERE THE SDL CODE IS)/build-scripts
    30 3. ./iosbuild.sh
2017-09-26 16:27:24 -07:00
Sam Lantinga 12efabcbf0 Added instructions for deploying to older iOS devices (thanks Sylvain!) 2017-09-22 11:13:34 -07:00
Sam Lantinga 309474765b We don't need the VULKAN_SDK to build SDL with Vulkan support anymore 2017-08-28 19:30:59 -07:00
Ryan C. Gordon 25e3a1ec90 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
2017-08-27 22:15:57 -04:00
Philipp Wiesemann fe4c3b29d9 iOS: Added brackets to function names in README so that doxygen links them. 2016-05-10 21:15:11 +02:00
Philipp Wiesemann 5ba1fd9bb1 Fixed typo in README for iOS. 2016-01-01 17:41:11 +01:00
Alex Szpakowski 4aae0290ea Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes. 2015-12-31 21:16:43 -04:00
Alex Szpakowski 6ea942dae3 Added MSAA support for OpenGL ES contexts on iOS.
Note that extra steps must be taken when using glReadPixels to read the contents of the main OpenGL ES framebuffer on iOS, if multisampling is used. See the OpenGL ES section of README-ios.md for details.
2015-07-19 19:44:40 -03:00
Philipp Wiesemann 0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00