Difference between revisions of "12.0"

(Updated changelog)
Line 17: Line 17:
 
* Added support for highdpi mode in Windows.
 
* Added support for highdpi mode in Windows.
 
* Added [[love.window.focus]].
 
* Added [[love.window.focus]].
 +
* Added [[love.window.getPointer]].
 
* Added [[lua-https|HTTPS]] Lua module.
 
* Added [[lua-https|HTTPS]] Lua module.
 
* Added variants of enet's [[enet.peer:send|peer:send]] and [[enet.host:broadcast|host:broadcast]] methods that take light userdata and size parameters.
 
* Added variants of enet's [[enet.peer:send|peer:send]] and [[enet.host:broadcast|host:broadcast]] methods that take light userdata and size parameters.
 +
* Added support in love [[Object]]s for Lua 5.4's '<toclose>' syntax, when love is compiled with Lua 5.4.
  
  
Line 58: Line 60:
 
* Added [[love.keyboard.isModifierActive]].
 
* Added [[love.keyboard.isModifierActive]].
 
* Added parameters to [[love.wheelmoved]]: precise X and Y movement numbers, and a direction enum.
 
* Added parameters to [[love.wheelmoved]]: precise X and Y movement numbers, and a direction enum.
 +
* Added [[love.mouse.getGlobalPosition]].
  
  
Line 92: Line 95:
 
* Added t.renderers and t.excluderenderers [[love.conf]] options.
 
* 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 <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 'mipmapcount' field to the settings table in [[love.graphics.newTexture]]/[[love.graphics.newImage|newImage]]/[[love.graphics.newCanvas|newCanvas]].
Line 98: Line 102:
 
* Added [[Texture:isCanvas]] and [[Texture:isComputeWritable]].
 
* 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 [[Texture:isFormatLinear]], [[Texture:getMSAA]], [[Texture:generateMipmaps]], [[Texture:replacePixels]], and [[Texture:renderTo]] (moved from old Canvas and Image subclasses).
 +
* Added [[love.graphics.newTextureView]].
 +
* Added optional 'viewformats' field to the settings table in [[Texture]] constructors.
 +
* Added [[Texture:getViewFormats]].
 
* Added integer [[PixelFormat|pixel formats]] for [[Texture]]s and [[ImageData]].
 
* Added integer [[PixelFormat|pixel formats]] for [[Texture]]s and [[ImageData]].
 
* Added explicit sRGB format enums for compressed texture [[PixelFormat|pixel formats]].
 
* Added explicit sRGB format enums for compressed texture [[PixelFormat|pixel formats]].
 
* Added [[ImageData:setLinear]], [[CompressedImageData:setLinear]], [[ImageData:isLinear]], and [[CompressedImageData:isLinear]].
 
* Added [[ImageData:setLinear]], [[CompressedImageData:setLinear]], [[ImageData:isLinear]], and [[CompressedImageData:isLinear]].
 +
 
* Added [[GraphicsBuffer|Graphics Buffer]] objects, including vertex, index, texel, shader storage, and indirect draw/dispatch argument buffers.
 
* 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]].
Line 108: Line 116:
 
* Added an optional start array index parameter to [[Mesh:attachAttribute]].
 
* 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]]).
 
* Added [[love.graphics.readbackBuffer]] and [[love.graphics.readbackBufferAsync]].
 
* Added [[love.graphics.readbackBuffer]] and [[love.graphics.readbackBufferAsync]].
 
* 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 debugname fields in the settings tables for [[Texture]]s, [[GraphicsBuffer|Buffer]]s, and [[Shader]]s.
 +
* Added [[Texture:getDebugName]] and [[Shader:getDebugName]].
 
* 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 [[love.graphics.newComputeShader]] and a new 'computemain' shader entry point.
 
* Added [[Shader|Compute Shader]] support via [[love.graphics.newComputeShader]] and a new 'computemain' shader entry point.
Line 119: Line 130:
 
* Added [[love.graphics.drawIndirect]].
 
* 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.
* Added APIs to override the default orthographic projection: [[love.graphics.setOrthoProjection]], [[love.graphics.setPerspectiveProjection|setPerspectiveProjection]], and [[love.graphics.resetProjection|resetProjection]].
+
* Added APIs to override the default orthographic projection: [[love.graphics.setProjection]] and [[love.graphics.resetProjection|resetProjection]].
 
* Added ability to set point size within a vertex shader by setting the 'love_PointSize' variable.
 
* 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.setBlendState]], which gives lower level control over blend operations than [[love.graphics.setBlendMode]].
* Added [[love.graphics.setStencilMode]] and [[love.graphics.getStencilMode|getStencilMode]]. Replaces [[love.graphics.stencil]] as well as [[love.graphics.setStencilTest]].
+
* Added high level [[love.graphics.setStencilMode]] and [[love.graphics.getStencilMode|getStencilMode]] functions. Replaces [[love.graphics.stencil]] and [[love.graphics.setStencilTest]].
 +
* Added lower level [[love.graphics.setStencilState]] and [[love.graphics.getStencilState]] functions.
 
* 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 'clampone', 'texelbuffer', 'indexbuffer32bit', 'mipmaprange', and 'indirectdraw' [[GraphicsFeature]] enums.
 
* Added 'copybuffer', 'copybuffertotexture', 'copytexturetobuffer', and 'copyrendertargettobuffer' [[GraphicsFeature]] enums.
 
* Added 'copybuffer', 'copybuffertotexture', 'copytexturetobuffer', and 'copyrendertargettobuffer' [[GraphicsFeature]] enums.
 +
* Added 'buffers' and 'buffermemory' fields to the table returned by [[love.graphics.getStats]].
 
* Added initial support for right-to-left (RTL) text when using TrueType and OpenType fonts.
 
* 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.
Line 136: Line 150:
  
 
=== Changes ===
 
=== Changes ===
 +
* Changed the primary build system for Linux to CMake instead of autotools.
 +
* Changed the minimum runtime macOS version to 10.15.
 +
* Changed the minimum runtime iOS version to 13.0.
 +
* Changed the minimum runtime Windows version to Windows 7 SP1 (64 bit).
 +
 
* Changed [[love.physics]] Shapes and Fixtures to be combined together, in [[Shape]] objects. Separate [[Fixture]]s no longer exist.
 
* Changed [[love.physics]] Shapes and Fixtures to be combined together, in [[Shape]] objects. Separate [[Fixture]]s no longer exist.
 
* Changed [[love.physics.newCircleShape]], [[love.physics.newRectangleShape|newRectangleShape]], [[love.physics.newPolygonShape|newPolygonShape]], [[love.physics.newEdgeShape|newEdgeShape]], and [[love.physics.newChainShape|newChainShape]] to take a [[Body]] as their first parameter.
 
* Changed [[love.physics.newCircleShape]], [[love.physics.newRectangleShape|newRectangleShape]], [[love.physics.newPolygonShape|newPolygonShape]], [[love.physics.newEdgeShape|newEdgeShape]], and [[love.physics.newChainShape|newChainShape]] to take a [[Body]] as their first parameter.
Line 142: Line 161:
 
* Changed the behaviour of attaching a [[Shape]] to a [[Body]] to no longer reset mass data if it's been customized.
 
* Changed the behaviour of attaching a [[Shape]] to a [[Body]] to no longer reset mass data if it's been customized.
 
* Changed [[RevoluteJoint:getMotorTorque]] and [[WheelJoint:getMotorTorque]] to take 'dt' as a parameter instead of 'inverse_dt'.
 
* Changed [[RevoluteJoint:getMotorTorque]] and [[WheelJoint:getMotorTorque]] to take 'dt' as a parameter instead of 'inverse_dt'.
 +
 
* Changed [[love.filesystem.exists]] to no longer be deprecated.
 
* Changed [[love.filesystem.exists]] to no longer be deprecated.
 +
* Changed [[love.data.hash]] to have a container type parameter.
 
* 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 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.
Line 151: Line 173:
 
* 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.graphics.draw(Mesh) to no longer error if the Mesh has no 'VertexPosition' attribute but does have custom vertex attributes.
 +
* Changed [[Mesh:getVertexFormat]] to use named fields, to match the new vertex format parameter setup in [[love.graphics.newMesh]].
 
* 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.rectangle]], [[love.graphics.polygon]], and other shape drawing APIs to provide texture coordinates to shaders, for filled shapes.
 
* 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 [[love.graphics.setCanvas]] to always clear auto-generated temporary depth and stencil buffers when they're used.
 
* Changed [[love.graphics.clear]] to no longer be affected by [[love.graphics.setScissor]] or [[love.graphics.setColorMask]].
 
* Changed [[love.graphics.clear]] to no longer be affected by [[love.graphics.setScissor]] or [[love.graphics.setColorMask]].
 +
* Changed [[love.graphics.setDepthMode]] with the depth write parameter set to true to error if the active Canvases or window don't have a depth buffer.
 
* Changed [[Shader]] code parsing to ignore shader entry point functions inside comments.
 
* Changed [[Shader]] code parsing to ignore shader entry point functions inside comments.
 +
* Changed position output coordinate space in vertex shaders to be consistent across all graphics APIs and regardless of whether a Canvas is active.
 +
** Clip-space output is y-up. Texture contents and pixel shader coordinates are y-down.
 +
 
* 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.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.
 +
* Changed the window 'depth' field in [[love.conf]] and [[love.window.setMode]]/[[love.window.updateMode|updateMode]]/[[love.window.getMode|getMode]] to be a boolean instead of a bit count number.
 +
 
* 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]].
 
* 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 177: Line 209:
 
* Deprecated [[World:queryBoundingBox]] (replaced by [[World:queryShapesInArea]]).
 
* Deprecated [[World:queryBoundingBox]] (replaced by [[World:queryShapesInArea]]).
 
* Deprecated [[ChainShape:getChildEdge]].
 
* Deprecated [[ChainShape:getChildEdge]].
 +
* Deprecated the variants of [[love.data.hash]] which do not have a container type parameter.
 
* Deprecated [[love.graphics.setNewFont]] (use [[love.graphics.newFont]] and [[love.graphics.setFont]] instead).
 
* 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.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 [[love.graphics.stencil]] (replaced by [[love.graphics.setStencilMode]]).
+
* Deprecated [[love.graphics.stencil]] (replaced by [[love.graphics.setStencilMode]] or [[love.graphics.setStencilState]]).
* Deprecated [[love.graphics.setStencilTest]] and [[love.graphics.getStencilTest]] (replaced by [[love.graphics.setStencilMode]] and [[love.graphics.getStencilMode]]).
+
* Deprecated [[love.graphics.setStencilTest]] and [[love.graphics.getStencilTest]] (replaced by [[love.graphics.setStencilMode]] or [[love.graphics.setStencilState]]).
 +
* Deprecated [[love.window.close]].
 
* 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]]).
 
* Deprecated the variants of [[Mesh:attachAttribute]] and [[SpriteBatch:attachAttribute]] which accept a [[Mesh]] (replaced by variants which accept a [[GraphicsBuffer]]).
 
* Deprecated the variants of [[Mesh:attachAttribute]] and [[SpriteBatch:attachAttribute]] which accept a [[Mesh]] (replaced by variants which accept a [[GraphicsBuffer]]).
Line 188: Line 222:
  
 
=== Removals ===
 
=== Removals ===
 +
* Removed 32 bit Windows support for official builds.
 
* Removed [[Fixture]] objects. All methods previously in Fixtures are now available in [[Shape]]s.
 
* Removed [[Fixture]] objects. All methods previously in Fixtures are now available in [[Shape]]s.
 
* Removed the variant of [[SpriteBatch:setColor]]() which turns off all previously set colors.
 
* Removed the variant of [[SpriteBatch:setColor]]() which turns off all previously set colors.

Revision as of 22:38, 13 April 2024

O.png 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.5

Additions

General


Data


Filesystem


Audio


Input


Math


Physics


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.


Changes

  • Changed the primary build system for Linux to CMake instead of autotools.
  • Changed the minimum runtime macOS version to 10.15.
  • Changed the minimum runtime iOS version to 13.0.
  • Changed the minimum runtime Windows version to Windows 7 SP1 (64 bit).
  • Changed love.filesystem.exists to no longer be deprecated.
  • Changed love.data.hash to have a container type parameter.
  • 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.graphics.draw(Mesh) to no longer error if the Mesh has no 'VertexPosition' attribute but does have custom vertex attributes.
  • Changed Mesh:getVertexFormat to use named fields, to match the new vertex format parameter setup in love.graphics.newMesh.
  • Changed love.window.setMode to no longer clear the contents of Canvases or otherwise recreate OpenGL resources.
  • Changed love.graphics.rectangle, love.graphics.polygon, and other shape drawing APIs to provide texture coordinates to shaders, for filled shapes.
  • 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 love.graphics.clear to no longer be affected by love.graphics.setScissor or love.graphics.setColorMask.
  • Changed love.graphics.setDepthMode with the depth write parameter set to true to error if the active Canvases or window don't have a depth buffer.
  • Changed Shader code parsing to ignore shader entry point functions inside comments.
  • Changed position output coordinate space in vertex shaders to be consistent across all graphics APIs and regardless of whether a Canvas is active.
    • Clip-space output is y-up. Texture contents and pixel shader coordinates are y-down.
  • 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.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.
  • Changed the window 'depth' field in love.conf and love.window.setMode/updateMode/getMode to be a boolean instead of a bit count number.
  • Updated Box2D from 2.3 to 2.4.1.
  • Updated LuaSocket from 3.0-rc1 to 3.1.0.


Deprecations


Removals


Fixes

  • Fixed BezierCurve:render adding collinear points in some situations.
  • Fixed sound Decoders to cause a Lua error instead of hard-crashing when memory for the decoding buffer can't be allocated.