Alex Szpakowski
e24dc9053b
metal: use a projection matrix instead of manually transforming vertices into clip space on the CPU.
2017-12-30 20:32:22 -04:00
Alex Szpakowski
49df65c25a
metal: only 4 (instead of 5) vertices are needed to draw rectangles and textures, and only 3 (instead of 5) vertices are needed to cover the screen for the 'full-screen quad' when clearing.
2017-12-30 18:48:07 -04:00
Sam Lantinga
7ac46a7449
The newer compilers generate the property boilerplate automatically
2017-12-11 11:34:53 -08:00
Sam Lantinga
358e4d9c7e
Fixed Mac OS X build
2017-12-11 11:02:51 -08:00
Sam Lantinga
c2cc9c166c
Backed out using pixel texture coordinates, it had weird visual side effects
2017-12-09 19:48:38 -08:00
Sam Lantinga
8aad49238b
Fixed normalized coordinates when the viewport is set
2017-12-09 19:41:08 -08:00
Sam Lantinga
441d309551
Added support for linear sampling and pixel coordinates in the metal renderer
2017-12-09 15:00:41 -08:00
Sam Lantinga
f55c998891
Fixed pixel positioning and size for the Metal renderer
2017-12-09 12:58:41 -08:00
Ryan C. Gordon
7dac177cd1
metal: fixed render target support.
2017-12-09 03:28:23 -05:00
Ryan C. Gordon
85d12d8f21
metal: Added some comments and FIXMEs.
2017-12-09 03:27:52 -05:00
Ryan C. Gordon
686fc0937e
metal: Cleaned up some reference count politics.
2017-12-08 18:26:26 -05:00
Sam Lantinga
cf3d450313
Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder()
2017-12-08 14:30:10 -08:00
Sam Lantinga
c403c0fa9a
Fixed Metal renderer memory leak
2017-12-08 13:20:20 -08:00
Ryan C. Gordon
81a33985e1
metal: Don't check if Metal is available if targeting modern macOS versions.
2017-12-08 14:03:36 -05:00
Sam Lantinga
b733dcc208
Minor cleanup
2017-12-08 12:02:23 -08:00
Sam Lantinga
5182c23c6b
Fixed minor memory leak in the Metal renderer
2017-12-08 11:35:19 -08:00
Sam Lantinga
dc04f290a3
Defer getting the next drawable until we actually start rendering
...
This works better for games where there may be a bunch of simulation logic that needs to be run before the next rendering pass, and prevents blocking if the next drawable is busy.
2017-12-08 08:58:02 -08:00
Sam Lantinga
104decd16d
Fixed runtime errors on iOS
2017-12-07 18:08:51 -08:00
Sam Lantinga
ba9c336e04
Fixed building for simulators or older iOS SDKs
2017-12-07 17:47:01 -08:00
Sam Lantinga
6deb1e7595
Fixed compiling Metal renderer on iOS
2017-12-07 17:12:03 -08:00
Sam Lantinga
1ae73a2be8
Added iOS and OSX versions of the Metal shaders
2017-12-07 16:08:47 -08:00
Sam Lantinga
b2859af6df
Enable building the Metal renderer by default, and weak link the Metal framework so the SDL library is safe to use on older Macs
...
Also generate iOS versions of the Metal shaders
2017-12-07 16:08:09 -08:00
Ryan C. Gordon
2a2c8d42ca
Initial shot at a renderer target for Apple's Metal API.
...
This isn't complete, but is enough to run testsprite2. It's currently
Mac-only; with a little work to figure out how to properly glue in a Metal
layer to a UIView, this will likely work on iOS, too.
This is only wired up to the configure script right now, and disabled by
default. CMake and Xcode still need their bits filled in as appropriate.
2016-04-21 03:16:44 -04:00