Bart van Strien
3cb777e2b7
Add basic lua 5.3 support
2015-06-16 10:25:41 +02:00
Alex Szpakowski
b2b5a1d9df
Fixed a compiler warning on Linux and iOS.
2015-06-09 21:26:41 -03:00
Alex Szpakowski
589f153073
Fixed a compiler warning.
2015-06-08 23:44:18 -03:00
Alex Szpakowski
91e2227124
Fixed the behaviour of love.window.requestAttention on Windows.
2015-06-07 20:19:42 -03:00
Alex Szpakowski
cf73aa0107
Added love.window.requestAttention. Bounces the dock icon in OS X and flashes the taskbar icon in Windows when called, if the program isn't in focus.
2015-06-07 19:40:46 -03:00
Alex Szpakowski
a9e4be760e
Updated the list of SDL backends which should default to OpenGL ES to include emscripten.
2015-06-02 23:06:31 -03:00
Alex Szpakowski
0f986b10aa
Cleaned up some code, the 'ry' parameter of love.graphics.rectangle now defaults to the value of 'rx' rather than defaulting to 0.
2015-05-27 17:36:27 -03:00
Alex Szpakowski
f2538ac2fa
love.window.getFullscreenModes, getDesktopDimensions, and setPosition now default the display index parameter to the display the window is currently in, rather than the primary display.
2015-05-12 21:59:09 -03:00
Alex Szpakowski
3704595189
Enabled OpenGL ES 3 support for Windows/Linux/Android when SDL 2.0.4+ is used, since that SDL version fixed its EGL code for GLES 3+.
2015-05-11 21:14:10 -03:00
Alex Szpakowski
cf0968fc6d
Avoid some VC++ compiler warnings
2015-04-02 00:28:09 -03:00
Alex Szpakowski
cffa899e03
Explicitly mention SDL in the error message caused by SDL subsystem initialization failure.
2015-03-26 14:51:47 -03:00
Alex Szpakowski
14cbc91e7f
Fixed a memory leak in love.graphics.newText.
2015-03-16 03:13:10 -03:00
Alex Szpakowski
06fa7bd7a4
Don't enable SDL_GL_FRAMEBUFFER_SRGB_CAPABLE in Linux when creating the window, to work around a potential bug. sRGB windows are still possible even without that.
2015-03-03 17:48:19 -04:00
Alex Szpakowski
2f419c1c83
Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
...
--HG--
branch : minor
2015-03-01 18:32:41 -04:00
Alex Szpakowski
52c4f2c119
Improved the performance of love.window.getPixelScale / toPixels / fromPixels by caching some values. Made some coordinate space-sensitive code use the proper conversions to get to the correct coordinate space.
...
--HG--
branch : minor
2015-02-23 17:55:30 -04:00
Alex Szpakowski
e26e170f78
Enabled high-dpi code on Linux (even though SDL doesn't support it yet on Linux, as of 2.0.4.) SDL 2.0.1 or newer is now required on Linux.
...
I'd rather have high-dpi work on Linux without needing to rebuild love when it's eventually implemented in SDL, rather than preserve backwards-compatibility with SDL 2.0.0 on Linux (which isn't important for love 0.10.0.)
--HG--
branch : minor
2015-02-21 19:06:41 -04:00
Alex Szpakowski
bf8f6f8b02
Changed the default fullscreen type from 'exclusive' to 'desktop'.
...
--HG--
branch : minor
2015-02-21 17:27:54 -04:00
Alex Szpakowski
33f57ce8fd
OpenGL ES 3 contexts can only be reliably created on iOS (for now.)
...
--HG--
branch : minor
2015-02-21 17:16:40 -04:00
Alex Szpakowski
ebc68023a7
Fix many warnings about implicit integer conversions when compiling for 64 bits.
...
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski
cce995146f
Merged default into minor
...
--HG--
branch : minor
2015-02-16 16:44:14 -04:00
Alex Szpakowski
7f9abc1e77
Added love.touch module and touch screen events. Resolves issue #825 .
...
Note: this implementation is slightly different from the implementation in the love 0.9.x Android and iOS ports!
Added love.touchpressed(id, x, y), love.touchmoved(id, x, y, dx, dy), and love.touchreleased(id, x, y, dx, dy).
id is a unique identifier for the touch press that persists until love.touchreleased. After that it is no longer unique.
x and y are the coordinates of the touch event in pixels within the window.
dx and dy are the amount in pixels that the touch has moved since the last event.
Added love.touch.getTouchCount and love.touch.getTouch(index).
love.touch.getTouch takes an index (not the same as an id. indices are not stable and don't correspond to a unique touch press.)
It returns the id of the touch and its current x and y coordinates in pixels.
--HG--
branch : minor
2015-02-16 16:29:45 -04:00
Alex Szpakowski
b0b4613896
I forgot to export love.window.maximize in time for 0.9.2's release. :(
2015-02-14 21:00:30 -04:00
Alex Szpakowski
d0e34e86f1
Changed love.window.setMode to recreate the window as well as the context if a particular context profile can't be created, to work around some limitations of the OpenGL context and window code in some SDL backends.
...
The window/context creation code might still need some work..
--HG--
branch : minor
2015-01-30 17:19:47 -04:00
Alex Szpakowski
84a6dd3b1c
Fixed OpenGL context version checking when OpenGL ES is used.
...
--HG--
branch : minor
2015-01-30 04:48:09 -04:00
Alex Szpakowski
6c11443a04
Fixed graphics initialization crashing love when OpenGL ES 2 is used.
...
--HG--
branch : minor
2015-01-30 04:24:31 -04:00
Alex Szpakowski
cc79089339
Fixed a crash in love.window.setMode in Windows.
...
--HG--
branch : minor
2015-01-30 01:28:27 -04:00
Alex Szpakowski
ad1fbbf3ea
Merged default into minor
...
--HG--
branch : minor
2015-01-29 21:27:05 -04:00
Alex Szpakowski
cf60cf89fc
De-namespaced a class, to make it less verbose.
2015-01-24 04:09:56 -04:00
Alex Szpakowski
27aec48d1a
Updated love.graphics.polygon and love.graphics.point to work with OpenGL ES.
...
--HG--
branch : minor
2015-01-22 18:28:24 -04:00
Alex Szpakowski
5b98083e01
Merged default into minor
...
--HG--
branch : minor
2015-01-22 02:18:56 -04:00
Alex Szpakowski
15538426d7
Added support for creating OpenGL ES 2 and 3 contexts, and updated the OpenGL context creation code to be more robust in general.
...
If the LOVE_GRAPHICS_USE_OPENGLES environment variable is set, then love will try to create an OpenGL ES context before falling back to regular OpenGL. If it's not set (or set to 0), then the opposite happens except when love is run on backends that should always use OpenGL ES.
--HG--
branch : minor
2015-01-22 01:02:01 -04:00
Alex Szpakowski
18569979e9
Better cleanup when the graphics and window subsystems are destroyed and restarted.
2015-01-21 18:23:16 -04:00
Alex Szpakowski
a7e4148869
Merged default into minor
...
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski
be9b5b5d1a
Added love.window.maximize (resolves issue #966.)
2015-01-05 00:00:46 -04:00
Alex Szpakowski
c7b45b3505
Updated copyright for the new year
2014-12-31 19:32:43 -04:00
Alex Szpakowski
34688e929e
Merged default into minor
...
--HG--
branch : minor
2014-09-28 15:56:04 -03:00
Alex Szpakowski
d3e1993673
Rearranged love.window.showMessageBox' arguments so the messagebox type is the second-last argument and defaults to "info" (resolves issue #937.)
2014-09-28 15:37:56 -03:00
Alex Szpakowski
c6b610d116
Cleaned up some code.
2014-09-21 19:50:02 -03:00
Alex Szpakowski
aba33bf2e7
Merged default into minor
...
--HG--
branch : minor
2014-09-20 00:34:34 -03:00
Alex Szpakowski
d4c60e077d
Fixed the window position in fullscreen modes.
2014-09-19 17:24:30 -03:00
Alex Szpakowski
b75e1bdeaa
Added love.window.setPosition(x, y [, displayindex]), love.window.getPosition, and optional x and y fields for t.window in love.conf and for the flags table in love.window.set/getMode (resolves issue #930.)
2014-09-19 16:19:55 -03:00
Alex Szpakowski
cf7342f8b7
Use C++11's in-line member initializers instead of default constructors with initializer lists, for some structs.
...
--HG--
branch : minor
2014-09-18 02:39:18 -03:00
Alex Szpakowski
fffbd3ecab
Merged default into minor
...
--HG--
branch : minor
2014-09-18 02:15:20 -03:00
Alex Szpakowski
00944c5f5d
Added love.window.toPixels(x [, y]) and love.window.fromPixels(x [, y]), for easier conversion between window-space and pixel-space values when highdpi mode is enabled on a retina display in OS X (and in the iOS and Android ports of LÖVE.)
2014-09-14 15:58:37 -03:00
Alex Szpakowski
71c71985d3
Merged default into minor
...
--HG--
branch : minor
2014-08-21 16:53:43 -03:00
Alex Szpakowski
e1f7e4abd3
Added a 'refreshrate' field to the table returned by love.window.getMode. The value may be 0 if the refresh rate of the monitor can't be determined. It might also be 59 instead of 60 on 59.94hz monitors on some operating systems.
2014-08-20 20:22:46 -03:00
Alex Szpakowski
9b1f7d7a6e
Merged default into minor
...
--HG--
branch : minor
2014-08-09 19:55:29 -03:00
Alex Szpakowski
da7cd267ea
Changed luax_pushtype to retain the pushed object itself, but only if the object isn't in the Lua state already.
...
Previously, calling e.g. love.graphics.getFont() 10,000 times would retain the object 10,000 times (and release it 10,000 times when the Font object was garbage-collected in the Lua state.) Now it will only retain it once and release it once.
2014-08-09 16:04:59 -03:00
Alex Szpakowski
53e63d48c9
Merged default into minor
...
--HG--
branch : minor
2014-08-07 18:10:19 -03:00
Alex Szpakowski
d59c76a55f
Reduced the number of explicit retain/release method calls on love objects. Less chance of bugs!
2014-08-07 14:53:17 -03:00