Difference between revisions of "12.0"
m (Updated with sensor changes) |
(Updated changelog) |
||
Line 8: | Line 8: | ||
'''General''' | '''General''' | ||
* Added support for launching a specific .lua file as the main file. | * Added support for launching a specific .lua file as the main file. | ||
+ | * Added basic usage instructions printed to the console when '--help' is used as a command-line parameter, and when the no-game screen is run. | ||
* Added [[love.parsedGameArguments]] and [[love.rawGameArguments]] tables, in the main thread. | * Added [[love.parsedGameArguments]] and [[love.rawGameArguments]] tables, in the main thread. | ||
* Added [[love.markDeprecated]]. | * Added [[love.markDeprecated]]. | ||
Line 43: | Line 44: | ||
* Added [[Joystick:getSensorData]]. | * Added [[Joystick:getSensorData]]. | ||
* Added [[Joystick:setPlayerIndex]] and [[Joystick:getPlayerIndex]]. | * Added [[Joystick:setPlayerIndex]] and [[Joystick:getPlayerIndex]]. | ||
+ | * Added [[Joystick:getJoystickType]]. | ||
* Added [[Joystick:getGamepadType]]. | * Added [[Joystick:getGamepadType]]. | ||
* Added new [[GamepadButton|Gamepad API buttons]]: "misc1", "paddle1", "paddle2", "paddle3", "paddle4". and "touchpad". | * Added new [[GamepadButton|Gamepad API buttons]]: "misc1", "paddle1", "paddle2", "paddle3", "paddle4". and "touchpad". | ||
Line 63: | Line 65: | ||
* Added per-shader opt in support for the GLSL 4.30 (desktop) and GLSL ES 3.20 (mobile) shading languages, via <code>#pragma language glsl4</code>. | * Added per-shader opt in support for the GLSL 4.30 (desktop) and GLSL ES 3.20 (mobile) shading languages, via <code>#pragma language glsl4</code>. | ||
* Added [[love.graphics.newTexture]]. [[love.graphics.newImage|newImage]] and [[love.graphics.newCanvas|newCanvas]] still exist as convenience constructor functions. | * Added [[love.graphics.newTexture]]. [[love.graphics.newImage|newImage]] and [[love.graphics.newCanvas|newCanvas]] still exist as convenience constructor functions. | ||
+ | * Added optional 'mipmapcount' field to the settings table in [[love.graphics.newTexture]]/[[love.graphics.newImage|newImage]]/[[love.graphics.newCanvas|newCanvas]]. | ||
+ | * Added optional 'computewrite' boolean field to the settings table in [[love.graphics.newTexture]]/[[love.graphics.newImage|newImage]]/[[love.graphics.newCanvas|newCanvas]]. | ||
* Added [[love.graphics.getTextureFormats]], which replaces [[love.graphics.getImageFormats|getImageFormats]] and [[love.graphics.getCanvasFormats|getCanvasFormats]]. | * Added [[love.graphics.getTextureFormats]], which replaces [[love.graphics.getImageFormats|getImageFormats]] and [[love.graphics.getCanvasFormats|getCanvasFormats]]. | ||
+ | * Added [[Texture:isCanvas]] and [[Texture:isComputeWritable]]. | ||
+ | * Added [[Texture:isFormatLinear]], [[Texture:getMSAA]], [[Texture:generateMipmaps]], [[Texture:replacePixels]], and [[Texture:renderTo]] (moved from old Canvas and Image subclasses). | ||
* Added integer [[PixelFormat|pixel formats]] for [[Texture]]s and [[ImageData]]. | * Added integer [[PixelFormat|pixel formats]] for [[Texture]]s and [[ImageData]]. | ||
− | * Added [[GraphicsBuffer|Graphics Buffer]] objects, including vertex, index, texel, | + | * Added [[GraphicsBuffer|Graphics Buffer]] objects, including vertex, index, texel, shader storage, and indirect draw/dispatch argument buffers. |
* Added [[love.graphics.copyBuffer]], [[love.graphics.copyBufferToTexture|copyBufferToTexture]], and [[love.graphics.copyTextureToBuffer|copyTextureToBuffer]]. | * Added [[love.graphics.copyBuffer]], [[love.graphics.copyBufferToTexture|copyBufferToTexture]], and [[love.graphics.copyTextureToBuffer|copyTextureToBuffer]]. | ||
* Added APIs for interacting with the [[GraphicsBuffer|Buffer]] objects owned by [[Mesh]]es. | * Added APIs for interacting with the [[GraphicsBuffer|Buffer]] objects owned by [[Mesh]]es. | ||
* Added [[Mesh:getAttachedAttributes]]. | * Added [[Mesh:getAttachedAttributes]]. | ||
+ | * Added an optional start array index parameter to [[Mesh:attachAttribute]]. | ||
* Added integer [[BufferDataFormat|buffer data formats]]. | * Added integer [[BufferDataFormat|buffer data formats]]. | ||
* Added [[love.graphics.readbackTexture]] and [[love.graphics.readbackTextureAsync]] (replaces [[Canvas:newImageData]]). | * Added [[love.graphics.readbackTexture]] and [[love.graphics.readbackTextureAsync]] (replaces [[Canvas:newImageData]]). | ||
Line 74: | Line 81: | ||
* Added 'readback' [[BufferDataUsage|buffer data usage enum]], useful for advanced memory optimization when using [[love.graphics.readbackBuffer]]. | * Added 'readback' [[BufferDataUsage|buffer data usage enum]], useful for advanced memory optimization when using [[love.graphics.readbackBuffer]]. | ||
* Added new lower level 'vertexmain' and 'pixelmain' shader entry points. | * Added new lower level 'vertexmain' and 'pixelmain' shader entry points. | ||
− | * Added [[Shader|Compute Shader]] support via new 'computemain' shader entry point. | + | * Added [[Shader|Compute Shader]] support via [[love.graphics.newComputeShader]] and a new 'computemain' shader entry point. |
− | * Added [[love.graphics.dispatchThreadgroups]] for running compute shaders. | + | * Added [[love.graphics.dispatchThreadgroups]] and [[love.graphics.dispatchIndirect]] for running compute shaders. |
* Added [[Shader:hasStage]]. | * Added [[Shader:hasStage]]. | ||
− | * Added [[love.graphics. | + | * Added [[love.graphics.drawFromShader]]. |
+ | * Added [[love.graphics.drawFromShaderIndirect]]. | ||
+ | * Added [[love.graphics.drawIndirect]]. | ||
* Added [[love.graphics.getQuadIndexBuffer]]. | * Added [[love.graphics.getQuadIndexBuffer]]. | ||
* Added variants of [[love.graphics.applyTransform]] and [[love.graphics.replaceTransform|replaceTransform]] which accept x,y,angle,sx,sy,ox,oy parameters. | * Added variants of [[love.graphics.applyTransform]] and [[love.graphics.replaceTransform|replaceTransform]] which accept x,y,angle,sx,sy,ox,oy parameters. | ||
Line 86: | Line 95: | ||
* Added a variant of [[love.graphics.setColorMask]] which accepts a single boolean. | * Added a variant of [[love.graphics.setColorMask]] which accepts a single boolean. | ||
* Added new 'clampone' [[WrapMode]]. | * Added new 'clampone' [[WrapMode]]. | ||
+ | * Added 'clampone', 'texelbuffer', 'indexbuffer32bit', 'mipmaprange', and 'indirectdraw' [[GraphicsFeature]] enums. | ||
+ | * Added 'copybuffer', 'copybuffertotexture', 'copytexturetobuffer', and 'copyrendertargettobuffer' [[GraphicsFeature]] enums. | ||
+ | * Added initial support for right-to-left (RTL) text when using TrueType and OpenType fonts. | ||
* Added a variant of [[Font:getWidth]] which takes a codepoint number argument. | * Added a variant of [[Font:getWidth]] which takes a codepoint number argument. | ||
+ | * Added [[love.graphics.newTextBatch]] (renamed from [[love.graphics.newText]]). | ||
* Added support for saving .exr image files via [[ImageData:encode]]. | * Added support for saving .exr image files via [[ImageData:encode]]. | ||
Line 92: | Line 105: | ||
=== Changes === | === Changes === | ||
* Changed the default font from Vera size 12 to Noto Sans size 13. | * Changed the default font from Vera size 12 to Noto Sans size 13. | ||
+ | * Changed TrueType and OpenType font handling to have improved kerning and character combining support. | ||
* Changed the [[Texture]] class and implementation to no longer have separate [[Canvas]] and [[Image]] subclasses. | * Changed the [[Texture]] class and implementation to no longer have separate [[Canvas]] and [[Image]] subclasses. | ||
* Changed [[Texture]]s created from image files and from [[ImageData]] to no longer hold onto a CPU copy of their pixel data after creation. | * Changed [[Texture]]s created from image files and from [[ImageData]] to no longer hold onto a CPU copy of their pixel data after creation. | ||
* Changed [[love.graphics.newImage]] to error instead of loading a placeholder texture, when the image dimensions are too large for the system. | * Changed [[love.graphics.newImage]] to error instead of loading a placeholder texture, when the image dimensions are too large for the system. | ||
+ | * Changed [[love.graphics.newImage]] to allow creating a mipmapped texture with less than the full mipmap range, instead of erroring. | ||
* Changed [[love.graphics.newMesh]] to no longer default to the "fan" [[MeshDrawMode|Mesh draw mode]]. | * Changed [[love.graphics.newMesh]] to no longer default to the "fan" [[MeshDrawMode|Mesh draw mode]]. | ||
* Changed the behaviour of [[Mesh]]es to no longer allow a vertex map or index buffer when the "fan" mesh draw mode is used. | * Changed the behaviour of [[Mesh]]es to no longer allow a vertex map or index buffer when the "fan" mesh draw mode is used. | ||
* Changed [[love.window.setMode]] to no longer clear the contents of Canvases or otherwise recreate OpenGL resources. | * Changed [[love.window.setMode]] to no longer clear the contents of Canvases or otherwise recreate OpenGL resources. | ||
* Changed [[love.graphics.points]] to require 'love_PointSize' to be set in the vertex shader, if a custom shader is used. | * Changed [[love.graphics.points]] to require 'love_PointSize' to be set in the vertex shader, if a custom shader is used. | ||
+ | * Changed [[love.graphics.setCanvas]] to always clear auto-generated temporary depth and stencil buffers when they're used. | ||
+ | * Changed [[Shader]] code parsing to ignore shader entry point functions inside comments. | ||
* Changed audio file decoding to choose the most appropriate decoder based on file contents instead of the file extension. | * Changed audio file decoding to choose the most appropriate decoder based on file contents instead of the file extension. | ||
* Changed [[Video]]s to stream audio from the file instead of loading all the video file into memory for use with audio decoding. | * Changed [[Video]]s to stream audio from the file instead of loading all the video file into memory for use with audio decoding. | ||
* Changed [[love.filesystem.exists]] to no longer be deprecated. | * Changed [[love.filesystem.exists]] to no longer be deprecated. | ||
− | * Changed [[RevoluteJoint:getMotorTorque]] to take 'dt' as a parameter instead of 'inverse_dt'. | + | * Changed [[RevoluteJoint:getMotorTorque]] and [[MotorJoint:getMotorTorque]] to take 'dt' as a parameter instead of 'inverse_dt'. |
* Changed [[love.math.perlinNoise]] and [[love.math.simplexNoise]] to use higher precision numbers for its internal calculations. | * Changed [[love.math.perlinNoise]] and [[love.math.simplexNoise]] to use higher precision numbers for its internal calculations. | ||
* Changed the <code>t.accelerometerjoystick</code> [[love.conf]] flag to be unset by default. | * Changed the <code>t.accelerometerjoystick</code> [[love.conf]] flag to be unset by default. | ||
* Renamed 'display' field to 'displayindex' in [[love.window.setMode]]/[[love.window.updateMode|updateMode]]/[[love.window.getMode|getMode]] and [[love.conf]]. | * Renamed 'display' field to 'displayindex' in [[love.window.setMode]]/[[love.window.updateMode|updateMode]]/[[love.window.getMode|getMode]] and [[love.conf]]. | ||
+ | * Renamed love.graphics [[Text]] objects to [[TextBatch]]. | ||
* Updated Box2D from 2.3 to 2.4.1. | * Updated Box2D from 2.3 to 2.4.1. | ||
* Updated LuaSocket from 3.0-rc1 to 3.1.0. | * Updated LuaSocket from 3.0-rc1 to 3.1.0. | ||
Line 112: | Line 130: | ||
=== Deprecations === | === Deprecations === | ||
* Deprecated usage of slashes instead of dots for module separators in require. | * Deprecated usage of slashes instead of dots for module separators in require. | ||
− | * Deprecated the <code>t.accelerometerjoystick</code> [[love.conf]] flag (replaced by [[love.sensor]]). | + | * Deprecated the <code>t.accelerometerjoystick</code> [[love.conf]] flag (replaced by the [[love.sensor]] module). |
* Deprecated [[love.filesystem.newFile]] (replaced by [[love.filesystem.openFile]]). | * Deprecated [[love.filesystem.newFile]] (replaced by [[love.filesystem.openFile]]). | ||
* Deprecated [[love.math.noise]] (replaced by [[love.math.perlinNoise]] and [[love.math.simplexNoise]]). | * Deprecated [[love.math.noise]] (replaced by [[love.math.perlinNoise]] and [[love.math.simplexNoise]]). | ||
+ | * Deprecated [[love.graphics.setNewFont]] (use [[love.graphics.newFont]] and [[love.graphics.setFont]] instead). | ||
+ | * Deprecated [[love.graphics.newText]] (renamed to [[love.graphics.newTextBatch]]). | ||
* Deprecated [[love.graphics.getImageFormats]] and [[love.graphics.getCanvasFormats]] (replaced by [[love.graphics.getTextureFormats]]). | * Deprecated [[love.graphics.getImageFormats]] and [[love.graphics.getCanvasFormats]] (replaced by [[love.graphics.getTextureFormats]]). | ||
* Deprecated t.window.highdpi in [[love.conf]] and the highdpi flag of [[love.window.setMode]] (replaced by t.highdpi in [[love.conf]]). | * Deprecated t.window.highdpi in [[love.conf]] and the highdpi flag of [[love.window.setMode]] (replaced by t.highdpi in [[love.conf]]). |
Revision as of 00:36, 7 February 2023
The information on this page may not be accurate or up to date due to the information pertaining to a version that is currently in development. |
The codename for LÖVE 12.0 is TBD. It is currently not released.
Changes from 11.4
Additions
General
- Added support for launching a specific .lua file as the main file.
- Added basic usage instructions printed to the console when '--help' is used as a command-line parameter, and when the no-game screen is run.
- Added love.parsedGameArguments and love.rawGameArguments tables, in the main thread.
- Added love.markDeprecated.
- Added love.event.restart(optionalvalue). A new love.restart field will contain the value after restarting.
- Added love.system.getPreferredLocales.
- Added love.localechanged callback.
- Added love.dropbegan and love.dropcompleted callbacks.
- Added t.highdpi startup flag in love.conf, replacing t.window.highdpi and the highdpi flag of love.window.setMode.
- Added support for highdpi mode in Windows.
- Added HTTPS Lua module.
Filesystem
- Added love.filesystem.mountFullPath and love.filesystem.unmountFullPath, including opt-in mount-for-write support.
- Added love.filesystem.mountCommonPath, unmountCommonPath, and getFullCommonPath.
- Added 'readonly' field to love.filesystem.getInfo's returned table.
- Added an optional load mode parameter to love.filesystem.load to only allow binary chunks, text chunks, or both.
- Added love.filesystem.openFile (replaces love.filesystem.newFile).
Audio
- Added optional stream type parameter to love.audio.newSource streaming sources ("file" or "memory"). It defaults to "file".
- Added love.audio.getPlaybackDevice, love.audio.getPlaybackDevices, and love.audio.setPlaybackDevice.
- Added SoundData:copyFrom.
- Added SoundData:slice.
- Added love.audiodisconnected callback.
Input
- Added a love.sensor module, for getting data from device sensors such as an accelerometer or gyroscope.
- Added love.sensorupdated callback.
- Added love.joysticksensorupdated callback.
- Added Joystick:hasSensor.
- Added Joystick:setSensorEnabled and Joystick:isSensorEnabled.
- Added Joystick:getSensorData.
- Added Joystick:setPlayerIndex and Joystick:getPlayerIndex.
- Added Joystick:getJoystickType.
- Added Joystick:getGamepadType.
- Added new Gamepad API buttons: "misc1", "paddle1", "paddle2", "paddle3", "paddle4". and "touchpad".
- Added love.keyboard.isModifierActive.
Math
- Added love.math.perlinNoise and love.math.simplexNoise (replaces love.math.noise).
Physics
- Added World:getFixturesInArea.
Graphics
- Added a Metal backend to love.graphics, available on macOS 10.15+ and iOS 13+.
- Added a Vulkan backend to love.graphics, available on Windows, Linux, and Android 7+.
- Added '--renderers a,b,c' and '--excluderenderers a,b,c' command line arguments.
- Added t.renderers and t.excluderenderers love.conf options.
- Added per-shader opt in support for the GLSL 4.30 (desktop) and GLSL ES 3.20 (mobile) shading languages, via
#pragma language glsl4
. - Added love.graphics.newTexture. newImage and newCanvas still exist as convenience constructor functions.
- Added optional 'mipmapcount' field to the settings table in love.graphics.newTexture/newImage/newCanvas.
- Added optional 'computewrite' boolean field to the settings table in love.graphics.newTexture/newImage/newCanvas.
- Added love.graphics.getTextureFormats, which replaces getImageFormats and getCanvasFormats.
- Added Texture:isCanvas and Texture:isComputeWritable.
- Added Texture:isFormatLinear, Texture:getMSAA, Texture:generateMipmaps, Texture:replacePixels, and Texture:renderTo (moved from old Canvas and Image subclasses).
- Added integer pixel formats for Textures and ImageData.
- Added Graphics Buffer objects, including vertex, index, texel, shader storage, and indirect draw/dispatch argument buffers.
- Added love.graphics.copyBuffer, copyBufferToTexture, and copyTextureToBuffer.
- Added APIs for interacting with the Buffer objects owned by Meshes.
- Added Mesh:getAttachedAttributes.
- Added an optional start array index parameter to Mesh:attachAttribute.
- Added integer buffer data formats.
- Added love.graphics.readbackTexture and love.graphics.readbackTextureAsync (replaces Canvas:newImageData).
- Added love.graphics.readbackBuffer and love.graphics.readbackBufferAsync.
- Added 'readback' buffer data usage enum, useful for advanced memory optimization when using love.graphics.readbackBuffer.
- Added new lower level 'vertexmain' and 'pixelmain' shader entry points.
- Added Compute Shader support via love.graphics.newComputeShader and a new 'computemain' shader entry point.
- Added love.graphics.dispatchThreadgroups and love.graphics.dispatchIndirect for running compute shaders.
- Added Shader:hasStage.
- Added love.graphics.drawFromShader.
- Added love.graphics.drawFromShaderIndirect.
- Added love.graphics.drawIndirect.
- Added love.graphics.getQuadIndexBuffer.
- Added variants of love.graphics.applyTransform and replaceTransform which accept x,y,angle,sx,sy,ox,oy parameters.
- Added APIs to override the default orthographic projection: love.graphics.setOrthoProjection, setPerspectiveProjection, and resetProjection.
- Added ability to set point size within a vertex shader by setting the 'love_PointSize' variable.
- Added love.graphics.setBlendState, which gives lower level control over blend operations than love.graphics.setBlendMode.
- Added love.graphics.setStencilMode and getStencilMode. Replaces love.graphics.stencil as well as love.graphics.setStencilTest.
- Added a variant of love.graphics.setColorMask which accepts a single boolean.
- Added new 'clampone' WrapMode.
- Added 'clampone', 'texelbuffer', 'indexbuffer32bit', 'mipmaprange', and 'indirectdraw' GraphicsFeature enums.
- Added 'copybuffer', 'copybuffertotexture', 'copytexturetobuffer', and 'copyrendertargettobuffer' GraphicsFeature enums.
- Added initial support for right-to-left (RTL) text when using TrueType and OpenType fonts.
- Added a variant of Font:getWidth which takes a codepoint number argument.
- Added love.graphics.newTextBatch (renamed from love.graphics.newText).
- Added support for saving .exr image files via ImageData:encode.
Changes
- Changed the default font from Vera size 12 to Noto Sans size 13.
- Changed TrueType and OpenType font handling to have improved kerning and character combining support.
- Changed the Texture class and implementation to no longer have separate Canvas and Image subclasses.
- Changed Textures created from image files and from ImageData to no longer hold onto a CPU copy of their pixel data after creation.
- Changed love.graphics.newImage to error instead of loading a placeholder texture, when the image dimensions are too large for the system.
- Changed love.graphics.newImage to allow creating a mipmapped texture with less than the full mipmap range, instead of erroring.
- Changed love.graphics.newMesh to no longer default to the "fan" Mesh draw mode.
- Changed the behaviour of Meshes to no longer allow a vertex map or index buffer when the "fan" mesh draw mode is used.
- Changed love.window.setMode to no longer clear the contents of Canvases or otherwise recreate OpenGL resources.
- Changed love.graphics.points to require 'love_PointSize' to be set in the vertex shader, if a custom shader is used.
- Changed love.graphics.setCanvas to always clear auto-generated temporary depth and stencil buffers when they're used.
- Changed Shader code parsing to ignore shader entry point functions inside comments.
- Changed audio file decoding to choose the most appropriate decoder based on file contents instead of the file extension.
- Changed Videos to stream audio from the file instead of loading all the video file into memory for use with audio decoding.
- Changed love.filesystem.exists to no longer be deprecated.
- Changed RevoluteJoint:getMotorTorque and MotorJoint:getMotorTorque to take 'dt' as a parameter instead of 'inverse_dt'.
- Changed love.math.perlinNoise and love.math.simplexNoise to use higher precision numbers for its internal calculations.
- Changed the
t.accelerometerjoystick
love.conf flag to be unset by default. - Renamed 'display' field to 'displayindex' in love.window.setMode/updateMode/getMode and love.conf.
- Renamed love.graphics Text objects to TextBatch.
- Updated Box2D from 2.3 to 2.4.1.
- Updated LuaSocket from 3.0-rc1 to 3.1.0.
Deprecations
- Deprecated usage of slashes instead of dots for module separators in require.
- Deprecated the
t.accelerometerjoystick
love.conf flag (replaced by the love.sensor module). - Deprecated love.filesystem.newFile (replaced by love.filesystem.openFile).
- Deprecated love.math.noise (replaced by love.math.perlinNoise and love.math.simplexNoise).
- Deprecated love.graphics.setNewFont (use love.graphics.newFont and love.graphics.setFont instead).
- Deprecated love.graphics.newText (renamed to love.graphics.newTextBatch).
- Deprecated love.graphics.getImageFormats and love.graphics.getCanvasFormats (replaced by love.graphics.getTextureFormats).
- Deprecated t.window.highdpi in love.conf and the highdpi flag of love.window.setMode (replaced by t.highdpi in love.conf).
- Deprecated the variants of Mesh:attachAttribute and SpriteBatch:attachAttribute which accept a Mesh (replaced by variants which accept a GraphicsBuffer).
- Deprecated Canvas:newImageData (replaced by love.graphics.readbackTexture).
Removals
- Removed the variant of SpriteBatch:setColor() which turns off all previously set colors.
- Removed the no-argument variant of love.graphics.setColorMask.
- Removed love.graphics.stencil (replaced by love.graphics.setStencilMode).
- Removed love.graphics.setStencilTest and love.graphics.getStencilTest (replaced by love.graphics.setStencilMode and love.graphics.getStencilMode).
Fixes
- Fixed BezierCurve:render adding collinear points in some situations.
- Fixed line rendering when the line has duplicate points.
- Fixed sound Decoders to cause a Lua error instead of hard-crashing when memory for the decoding buffer can't be allocated.
- Fixed oversaturated colors on macOS when a P3-capable display is used.