Commit Graph

188 Commits

Author SHA1 Message Date
Alex Szpakowski 814aaa95cd Fix compilation on Windows 2022-06-18 18:09:58 -03:00
Alex Szpakowski 2149457c72 Merge branch 'main' into 12.0-development 2022-06-18 17:52:27 -03:00
Alex Szpakowski 17b359f939 Windows: add support for high-dpi when capable SDL versions are used.
Issue #1421
2022-06-11 19:49:26 -03:00
Alex Szpakowski 5175b0d1b5 Windows: fix some cases of stuttering in windowed mode.
Use DwmFlush instead of OpenGL vsync, when specific conditions are met. Fixes #1628.
2022-04-17 11:26:06 -03:00
Alex Szpakowski 34f036f2e1 Rename 'display' field to 'displayindex' in setMode and love.conf.
Fixes #1711.
2022-04-15 23:16:13 -03:00
Alex Szpakowski 6e35ffe2d8 metal: fix window pixel size when resizing 2022-02-19 14:17:37 -04:00
Alex Szpakowski d4c1025070 Merge branch 'main' into 12.0-development 2022-02-05 21:40:24 -04:00
Alex Szpakowski 878ad785bc Remove obsolete macOS window min size workaround.
Fixes #1444.

The reason for the SetWindowMinSize call after exiting fullscreen doesn't seem to be needed anymore, and it was breaking setFullscreen(false) in Linux.
2022-01-16 18:41:14 -04:00
Alex Szpakowski 425537ad5e Metal view creation failure shows a relevant error message. 2022-01-06 17:37:56 -04:00
Alex Szpakowski d51e012812 Merge branch '12.0-development' into metal 2022-01-05 21:12:22 -04:00
Alex Szpakowski 7f3538d2ba Merge branch 'main' into 12.0-development 2022-01-05 21:10:27 -04:00
Alex Szpakowski 5864d83c31 Add ability to configure which renderers are used by love.graphics.
- Add t.renderers and t.excluderenderers love.conf fields. They can be an array of renderer names.
- Add --renderers a,list,of,renderernames and --excluderenderers more,renderers argument options.
2022-01-04 21:29:56 -04:00
Alex Szpakowski 91cb845f31 #pragma language glsl4 in shaders maps to GLES 3.2 instead of 3.1. 2022-01-02 14:02:55 -04:00
Alex Szpakowski 8e7fd10b6f Update copyright year for 2022 2021-12-31 18:33:40 -04:00
Alex Szpakowski 045f5ff0a5 Fix initializing the graphics module after a window is opened. 2021-12-26 12:34:47 -04:00
Alex Szpakowski e63025b74f Merge branch '12.0-development' into metal 2021-12-24 15:34:05 -04:00
Alex Szpakowski 21f5ba86d3 Merge branch 'master' into 12.0-development 2021-04-07 20:33:44 -03:00
Alex Szpakowski f89aabb0bb Update copyright year for 2021 2021-04-04 16:14:45 -03:00
Alex Szpakowski 0d94530374 metal: implement vsync toggle on macOS 2021-03-27 22:40:29 -03:00
Alex Szpakowski 98f8fe02a1 Merge branch '12.0-development' into metal 2021-01-14 20:33:45 -04:00
Alex Szpakowski 65bfeedd4e Merge branch 'master' into 12.0-development 2020-12-26 22:48:08 -04:00
Miku AuahDark 9c4db00e94 Android: Fix changing orientation with t.window.fullscreen = true
Fixes love2d/love-android#196
2020-12-25 21:45:32 +08:00
Alex Szpakowski 9e460ba53e Fix explicit window position not being restored in some cases when exiting fullscreen
Fixes #1426
2020-12-24 12:29:00 -04:00
Alex Szpakowski efd76e1eac metal: fix context creation 2020-12-22 22:43:10 -04:00
Alex Szpakowski 20a92a4106 Merge branch '12.0-development' into metal 2020-12-22 22:37:17 -04:00
Alex Szpakowski 3d2614ff2e Fix compilation when SDL < 2.0.5 is used 2020-11-02 18:20:58 -04:00
Alex Szpakowski 316fccfe1b love.window.setMode no longer destroys and recreates the window 2020-11-02 18:08:35 -04:00
Alex Szpakowski 905e5baf06 Replace highdpi window flag with t.highdpi in love.conf 2020-11-01 21:36:15 -04:00
Alex Szpakowski 7934ce0a66 Handle backbuffer MSAA manually in love.graphics code
Previously love would use SDL APIs to make the system (WGL etc) handle it, which meant the OpenGL context had to be recreated whenever MSAA changed.
2020-10-25 22:24:07 -03:00
Alex Szpakowski 4b9c648c8b metal: work towards shader uniform implementation.
Misc cleanup.
2020-10-24 00:33:02 -03:00
Alex Szpakowski 8c86515d04 Revert "Windows: reduce stuttering in windowed mode via DwmFlush"
This reverts commit 5dd4a463be.
2020-10-01 22:09:47 -03:00
Alex Szpakowski 5dd4a463be Windows: reduce stuttering in windowed mode via DwmFlush
Resolves issue #1628
2020-09-29 20:22:41 -03:00
Alex Szpakowski 99b39065b6 metal: hook up the backbuffer 2020-04-23 18:38:29 -03:00
Alex Szpakowski acc4064a6c metal: implement stubs for missing methods 2020-04-22 23:18:00 -03:00
Alex Szpakowski e001e4336d metal: initial work on setRenderTarget 2020-02-16 09:04:50 -04:00
Alex Szpakowski 742a954655 Merge branch '12.0' into metal 2020-02-15 14:18:35 -04:00
Alex Szpakowski 453322678c Rename internal uses of canvas to texture/render target 2020-02-08 20:40:10 -04:00
Alex Szpakowski 12c90b3dca Merge Image and Canvas GL backend classes into new common Texture class. 2020-02-07 20:29:21 -04:00
Alex Szpakowski d687b4c099 metal: initial work on windowing and instance creation 2020-01-30 20:35:33 -04:00
Alex Szpakowski 5f9b5a21d0 Merge default into minor
--HG--
branch : minor
2020-01-03 22:45:36 -04:00
Alex Szpakowski fc4847c69d Update copyright for the new year 2020-01-03 22:40:36 -04:00
Alex Szpakowski f3b52f66fe Update the internal naming convention for pixel formats.
--HG--
branch : minor
2019-12-23 23:38:04 -04:00
Alex Szpakowski bc12312f0f macOS: rename most internal uses of "macosx" to "macos".
--HG--
branch : minor
2019-12-22 17:54:20 -04:00
Alex Szpakowski 37c579929b Add support for GLSL 4.30 and GLSL ES 3.10, via #pragma language glsl4.
macOS and iOS won't support glsl4 until a Metal backend is implemented.

--HG--
branch : minor
2019-11-16 14:33:48 -04:00
Alex Szpakowski 37472d6f5e Add 'usedpiscale' boolean (true by default) to love.window.setMode's settings table and love.conf's t.window table. Add love.window.getNativeDPIScale.
When usedpiscale=false, love will no longer automatically scale coordinates by the screen's DPI scale factor (so all coordinates will be in pixels), even when highdpi=true. love.window.getDPIScale will return 1, love.graphics.newCanvas will default to a dpi scale of 1 instead of the screen's dpi scale, etc.

love.window.getNativeDPIScale() will return the screen's DPI scale as reported by the OS no matter what usedpiscale is set to.
2019-06-24 21:54:09 -03:00
Miku AuahDark 4a08c0f7c1 Implement love.window.getSafeArea for Android
--HG--
branch : android-safearea
2019-02-08 23:58:02 +08:00
Alex Szpakowski 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Alex Szpakowski f504ace6cd Make sure love.window.getSafeArea is in DPI-scaled units on all platforms. 2018-12-26 10:36:41 -04:00
Alex Szpakowski d41aca836e Add love.window.getSafeArea (resolves issue #1437). Returns a rectangle (x, y, w, h) inside the window which is known to be unobstructed by a system title bar, the iPhone X notch, etc. Useful for making sure UI elements can be seen by the user.
Currently it only has a proper implementation on iOS and will return the window's full size otherwise.
2018-12-26 00:34:14 -04:00
Alex Szpakowski e2aa469170 Add love.window.get/setVSync, to allow changing the vsync setting without recreating the window. 2018-12-18 13:39:06 -04:00