Commit Graph

2088 Commits

Author SHA1 Message Date
Alex Szpakowski 8a7481eaa3 Added optional xoffset/yoffset/width/height arguments to Image:refresh, to specify a sub-rectangle. Specifying a small sub-rectangle can improve the performance of Image:refresh.
--HG--
branch : minor
2014-08-26 09:40:24 -03:00
Alex Szpakowski 760304e023 Fixed love.graphics.print.
--HG--
branch : minor
2014-08-26 08:08:09 -03:00
Alex Szpakowski 3a51f0ad08 Changed the love.graphics internal code to always use a default shader when none is set externally, and replaced the deprecated OpenGL vertex attribute code with the equivalent generic vertex attribute functions.
This will simplify the code and make it more maintainable when OpenGL ES 2+ support is added, compared to using the deprecated VA functions on desktop GL and the generic VA functions on GLES.

--HG--
branch : minor
2014-08-26 03:24:42 -03:00
Alex Szpakowski 2a1e1d01d3 Merged default into minor
--HG--
branch : minor
2014-08-25 18:02:44 -03:00
Alex Szpakowski d5e5f38e2f Fixed Source:tell crashing if the Source is static. 2014-08-25 03:46:11 -03:00
Alex Szpakowski 766939bdd5 Removed mipmapping restriction on non-power-of-two Images.
--HG--
branch : minor
2014-08-25 01:37:05 -03:00
Alex Szpakowski 234ee0fea6 Fixed the default error handler's background color when sRGB is enabled for the screen. 2014-08-22 17:58:07 -03:00
Alex Szpakowski 1978fa9910 Cleaned up a bit of unused code. 2014-08-22 17:44:52 -03:00
Alex Szpakowski 71c71985d3 Merged default into minor
--HG--
branch : minor
2014-08-21 16:53:43 -03:00
Alex Szpakowski 44b97dfadc Updated the changelog. 2014-08-21 16:38:22 -03:00
Alex Szpakowski 8ffe610659 Added love.graphics.getStats. It returns a table with performance-related graphics statistics. Currently it contains these fields:
drawcalls: The number of internal draw calls made so far in the current frame.

canvasswitches: The number of times the active Canvas has been changed so far in the current frame.

texturememory: The approximate amount of video memory (in bytes) used by OpenGL textures created by Images, Canvases, and Fonts.

images: The number of active Image objects.

canvases: The number of active Canvas objects.

fonts: The number of active Font objects.
2014-08-21 15:01:29 -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
Bart van Strien 23f2d617e0 Remove accidentally left-behind filesystem wrappers, minor compiles again
--HG--
branch : minor
2014-08-19 16:06:54 +02:00
Alex Szpakowski 5f6ee50541 Replaced the GLee OpenGL function loader with a modified version of GLAD (resolves issue #728.)
--HG--
branch : minor
2014-08-18 21:35:52 -03:00
Alex Szpakowski 0c1b73e2ca Reference counting for love objects is now atomic.
--HG--
branch : minor
2014-08-13 02:43:50 -03:00
Alex Szpakowski df5e48a082 Merged default into minor
--HG--
branch : minor
2014-08-13 01:50:52 -03:00
Alex Szpakowski 9e93d854b8 love.image.isCompressed should return true if the file contains a compressed texture, even if the file's extension isn't 'dds'. 2014-08-12 18:09:07 -03:00
Alex Szpakowski fcf8329369 Fixed detection of TGA and BMP images and updated stb_image to the latest version.
--HG--
branch : minor
2014-08-11 03:11:51 -03:00
Alex Szpakowski 43a148ce3e Fixed detection of PNG images.
--HG--
branch : minor
2014-08-11 02:42:12 -03:00
Alex Szpakowski 1798115858 Error if the coordinates given to Canvas:getPIxel are not within [0, dimensions). 2014-08-10 03:09:16 -03:00
Alex Szpakowski 27c75a1323 Updated the changelog. 2014-08-09 23:14:28 -03:00
Alex Szpakowski 19bbf6d3ff Merged bartbes/love-experiments/stencil-functions into minor
--HG--
branch : minor
2014-08-09 20:18:09 -03:00
Alex Szpakowski 9b1f7d7a6e Merged default into minor
--HG--
branch : minor
2014-08-09 19:55:29 -03:00
Alex Szpakowski d5ccdc040a Cleaned up some Proxy-related code. 2014-08-09 16:18:22 -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 a757315006 Removed runtime support for Mac OS 10.6 and switched from libstdc++ to libc++ in OS X. Now we can use C++11's standard library!
--HG--
branch : minor
2014-08-08 18:54:12 -03:00
Alex Szpakowski 191b910f23 Fixed love.graphics.newScreenshot potentially deleting any active Canvases. 2014-08-08 18:49:11 -03:00
Alex Szpakowski 0749272632 Renamed love.graphics.drawStencil to love.graphics.stencil.
--HG--
branch : stencil-functions
2014-08-08 00:56:52 -03:00
Alex Szpakowski 2b70d84611 Replaced the old stencil API with love.graphics.drawStencil(stencilfunc), love.graphics.setStencilTest(enable, invert), and love.graphics.getStencilTest.
Draw to the stencil buffer (rather than the color buffer) using love.graphics.drawStencil with a function which draws geometry. Once the stencil buffer has been drawn to, use love.graphics.setStencilTest before drawing to let drawn geometry be affected by it.

love.graphics.clear (and Canvas:clear) will clear both the color and stencil buffers by default. love.graphics.clear("stencil") will clear only the stencil buffer.

--HG--
branch : stencil-functions
2014-08-08 00:25:44 -03:00
Alex Szpakowski 53e63d48c9 Merged default into minor
--HG--
branch : minor
2014-08-07 18:10:19 -03:00
Bart van Strien 30ff7d4659 Make openURL call on linux non-blocking, because the spawned processes are not guaranteed to fork into the background, and enable automatic zombie cleanup to deal with that change (note: the return value is now slightly less accurate) 2014-08-07 20:22:58 +02: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
Alex Szpakowski a0fff798aa Fixed compiling with Visual Studio. 2014-08-07 01:12:48 -03:00
Alex Szpakowski afc505e183 Added stack type enums to love.graphics.push (resolves issue #906.) Current enums are "transform" and "all". "transform" is the default (for compatibility.) When love.graphics.push("all") is used, love.graphics.pop() will restore all love.graphics module state to what it was when push was called.
Updated the graphics code to use a custom matrix stack rather than OpenGL1's APIs.
2014-08-06 22:25:29 -03:00
Alex Szpakowski 028108ea64 Improved the error message when physfs fails to open a filepath. 2014-08-06 20:16:15 -03:00
Alex Szpakowski 809ea8691f Fixed wireframe mode not being saved and restored properly on love.window.setMode. 2014-08-04 22:02:47 -03:00
Alex Szpakowski 2c7ee6959e Renamed the fullscreen type "normal" to "exclusive".
--HG--
branch : minor
2014-07-30 01:38:45 -03:00
Alex Szpakowski aa05664d4c Merged default into minor
--HG--
branch : minor
2014-07-30 01:32:10 -03:00
Alex Szpakowski eaad102f5c Calling love.window.setMode with fullscreen=true and a width or height larger than the largest fullscreen mode now falls back to the largest fullscreen mode instead of failing and returning false. 2014-07-30 01:22:01 -03:00
Alex Szpakowski c6c32dee17 Removed a piece of code I forgot to delete 2014-07-28 16:58:51 -03:00
Alex Szpakowski 73c0f1e222 Added love.filesystem.isSymlink, love.filesystem.setSymlinksEnabled, and love.filesystem.areSymlinksEnabled. Symbolic link support is disabled by default.
love.filesystem.isSymlink will always return false when symbolic link support is disabled, even if the given filepath is actually a symlink.
2014-07-24 00:31:11 -03:00
Alex Szpakowski 3ae336dd43 Added love.window.showMessageBox.
It has two variants: showMessageBox(type, title, message [, attachtowindow=true]), and showMessageBox(type, title, message, buttons [, attachtowindow=true]). The former shows a simple message box with a single OK button, and the latter displays several buttons. The buttons argument is an array of button names.

The second variant returns the index of the pressed button, or 0 if the message box was closed some other way. showMessageBox will block until the message box is closed (and it can't be called on a separate thread.)
2014-07-21 21:28:21 -03:00
Alex Szpakowski d52bab4221 Updated the new module changes to use more compile/link-time checking rather than runtime checking. 2014-07-21 15:12:01 -03:00
Alex Szpakowski 014b9a46e5 Updated the Lua wrapper code for modules to account for cases where the module's instance is removed from memory completely and recreated during the program's lifetime. 2014-07-21 14:52:01 -03:00
Alex Szpakowski e87fbdcaaf Fixed the default line join mode to be 'miter' instead of an undefined value. 2014-07-15 15:49:01 -03:00
Bart van Strien 59ab602111 Normalize slashes in paths unless they are direct user input (XDG_DATA_HOME/APPDATA, specifically) 2014-07-15 13:16:37 +02:00
Alex Szpakowski 88211ede8f Merged default into minor
--HG--
branch : minor
2014-07-13 20:26:51 -03:00
Alex Szpakowski a658c7df76 Fixed the error screen when highdpi mode is enabled on a retina monitor in OS X (resolves issue #908) 2014-07-12 21:12:21 -03:00
Alex Szpakowski 0841ff209b license.txt is now distributed with the OS X build of LÖVE in love.app/Contents/Resources/. 2014-07-10 20:54:35 -03:00
Alex Szpakowski a4a075dd2e Fixed crashes and instability when love.graphics.setMode is called when a vertex buffer is mapped by love. 2014-07-10 16:16:00 -03:00