Commit Graph

117 Commits

Author SHA1 Message Date
Alex Szpakowski 22fada31da macOS: update freetype framework capitalization 2017-12-26 19:50:55 -04:00
Alex Szpakowski cdcf052a73 Update LZ4. 2017-12-17 21:52:19 -04:00
Alex Szpakowski 1d8a3326b3 Include the physfs 3.0.1 source in love. 2017-12-15 19:41:17 -04:00
Alex Szpakowski 7354de2059 Add (low level) functionality to allow rendering 3D Meshes.
- Add love.graphics.setDepthMode(testcomparison, enablewrites).
- Add love.graphics.setMeshCullMode.
- Add love.graphics.setFrontFaceWinding.

Depth testing and depth writes require a depth buffer to work. The mesh cull mode controls whether front/back faces of a mesh are culled. The front face winding determines whether a clockwise or counterclockwise-oriented face in a mesh is considered front facing.

--HG--
branch : minor
2017-12-09 23:34:08 -04:00
Alex Szpakowski c5fcfd1714 Add an Xcode 9 generated file.
--HG--
branch : minor
2017-11-20 22:15:06 -04:00
Alex Szpakowski 8672ff2272 Use a more efficient method of streaming automatically batched vertices on AMD Windows and Linux systems.
--HG--
branch : minor
2017-11-11 20:48:02 -04:00
Alex Szpakowski e3fd489373 Abstracted lower level drawing code, moved all type-specific drawing code out of opengl backend, deleted obsolete files
--HG--
branch : minor
2017-10-26 20:58:19 -03:00
Alex Szpakowski 15cc540e4c Make internal vertex attribute code less OpenGL-specific.
--HG--
branch : minor
2017-10-25 23:12:39 -03:00
Alex Szpakowski 8db8b71587 Fix building for macOS and iOS
--HG--
branch : minor
2017-10-21 11:15:39 -03:00
Alex Szpakowski e5b0d96b27 Restructured some Shader code. Added runtime temporary caching and sharing of shader stages. Resolves issue #1235.
--HG--
branch : minor
2017-10-21 03:08:18 -03:00
Alex Szpakowski ac84589c57 Backed out changeset 1b487edea8a8
--HG--
branch : minor
2017-09-30 17:02:16 -03:00
Alex Szpakowski 8fa511aea8 Move boot.lua into src/modules/love/
--HG--
branch : minor
2017-09-30 16:41:45 -03:00
Alex Szpakowski e10c941614 Update Xcode/clang warnings to the latest recommended settings.
--HG--
branch : minor
2017-09-30 12:27:50 -03:00
Alex Szpakowski 90e86c329d Add love.data module.
- Moved love.math.compress / decompress / decode / encode / hash to love.data.
- Changed love.data.compress/decompress to take the format argument first instead of second.
- Added love.data.newDataView. Returns a read-only subsection of an existing Data object.
- Added love.data.newByteData. Mostly useful in combination with LuaJIT's FFI as it has no extra methods currently.
- Added implementations of Lua 5.3's data packing APIs: love.data.packString / packData / unpack / getPackedSize.

Resolves issue #1336.
Resolves issue #1331.

--HG--
branch : minor
2017-09-24 19:25:27 -03:00
Alex Szpakowski b4f8f08b70 Enable (when available) and improve performance of persistently mapped buffer path for the vertex/index buffers used with automatic batching.
--HG--
branch : minor
2017-09-03 18:23:54 -03:00
Alex Szpakowski a41f78dfe4 Simplified some compressed image parsing code.
--HG--
branch : minor
2017-08-30 22:25:26 -03:00
Alex Szpakowski de28c6e6a8 Add the ability to have formally deprecated functions.
Functions which are deprecated will print out a message and show up in a small dialog on-screen, when they're first called. Deprecation output is disabled in fused mode by default, and can be modified with love.setDeprecationOutput(enable).

--HG--
branch : minor
2017-08-27 13:46:31 -03:00
Alex Szpakowski b129d49a6c Move Color.h from modules/graphics/ to common/
--HG--
branch : minor
2017-08-01 23:53:44 -03:00
Alex Szpakowski 84d5d8b636 Move decoder-agnostic love.image code out of the magpie backend folder.
--HG--
branch : minor
2017-08-01 23:22:24 -03:00
Alex Szpakowski 19b4079ecc Merge default into minor
--HG--
branch : minor
2017-07-28 19:14:54 -03:00
Alex Szpakowski ad399cab39 Update glslang
--HG--
branch : minor
2017-06-11 14:35:51 -03:00
Tiago Koji Castro Shibata 74c35358bb Move setMixMode to love.audio 2017-06-10 00:07:39 -03:00
Tiago Koji Castro Shibata 4c145e8c13 Support audio mix modes 2017-06-02 19:35:58 -03:00
Alex Szpakowski 70b32c47ce Error if a non-2D/affine matrix is used with auto-batched draws, since they perform CPU-side matrix transforms on 2-component vectors.
--HG--
branch : minor
2017-04-23 00:12:57 -03:00
Alex Szpakowski a0ef2ac28b Add Depth compare / shadow sampler support. Officially this is only supported in glsl3 shaders.
- Add Texture:setDepthSampleMode(comparemode). Only works on textures with depth pixel formats. A texture with the depth sample mode set will only work with a depth sampler.
- Add DepthImage, DepthArrayImage, and DepthCubeImage sampler keywords to glsl3.

--HG--
branch : minor
2017-04-12 20:26:06 -03:00
Alex Szpakowski 0001b4695e Add new variants of love.graphics.clear for controlling how the depth and stencil buffers are cleared.
- Add love.graphics.clear(r, g, b, a [, stencilvalue, depthvalue]).
- Add love.graphics.clear(color1, color2, …, [, stencilvalue, depthvalue]).
- Add love.graphics.clear(false, stencilvalue, depthvalue).

stencilvalue and depthvalue are either true, false, or a number. True is the default behaviour and clears that buffer to the default value (0 for stencil, 1 for depth), false prevents clearing.

The third variant listed above only clears the depth and/or stencil buffers and not the color buffer.

--HG--
branch : minor
2017-04-11 22:32:40 -03:00
Alex Szpakowski 73fd45558b Implement Array, Cubemap, and Volume texture types (issue #1111).
- Add love.graphics.newArrayImage, newCubeImage, and newVolumeImage.
- Add love.graphics.newCanvas(w, h, layers) and newCanvas(w, h, layers, settings). Add ‘type’ field to the settings table of newCanvas.

- Add new love.graphics.setCanvas variants: setCanvas(canvas, slice), and setCanvas(canvastable) where canvastable is in the format: {{canvas1, layer=2}, {canvas2, face=5}}

- Add Texture:getTextureType, getDepth, getLayerCount, getMipmapCount, and getFormat.

- Remove Image:getData and Image:refresh.
- Add Image:replacePixels(imagedata [, slice] [, mipmap]).

- Update Canvas:newImageData to accept a slice argument.

- Add love.image.newCubeFaces(imagedata).

--HG--
branch : minor
2017-02-20 14:58:13 -04:00
Alex Szpakowski 28b2192ef5 Update Xcode project
--HG--
branch : minor
2017-02-11 15:14:39 -04:00
Alex Szpakowski 8558d7894c Move all remaining love.graphics Lua wrapper code out of the opengl implementation folder.
--HG--
branch : minor
2017-01-29 01:19:37 -04:00
Alex Szpakowski c0e66eba83 Move backend-agnostic Mesh and SpriteBatch code out of the opengl implementation folder.
--HG--
branch : minor
2017-01-29 01:05:20 -04:00
Alex Szpakowski 3616470a0a Move love.graphics Image wrapper code out of the opengl subfolder
--HG--
branch : minor
2017-01-29 00:20:16 -04:00
Alex Szpakowski 13af754d3d Move most of Text and Video love.graphics classes out of the opengl subfolder.
--HG--
branch : minor
2017-01-28 21:37:09 -04:00
Alex Szpakowski d990044288 love.graphics internal Buffer objects are no longer OpenGL-specific.
--HG--
branch : minor
2017-01-28 19:26:57 -04:00
Alex Szpakowski 731b5d5cf0 Added support for GLSL 3 shaders (GLSL 3.30 and GLSL ES 3.00).
To use GLSL 3 in a shader, the first line of the shader has to be: #pragma language glsl3

glsl1 is the default language.

Added “glsl3” graphics feature as part of the table returned by love.graphics.getSupported().

Added love.graphics.validateShader(boolean gles, shadercode). It returns a boolean along with an error string if the shader code has errors for its target language and platform (gles or desktop).

Implemented support for Core Profile OpenGL 3.3 in love.graphics.

--HG--
branch : minor
2017-01-22 18:54:04 -04:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Alex Szpakowski a986f5e825 Fix iOS build
--HG--
branch : minor
2017-01-01 12:13:17 -04:00
Alex Szpakowski f12596dd19 More code restructuring.
Move all love.graphics functionality that doesn’t call OpenGL out of the OpenGL backend Graphics class.

--HG--
branch : minor
2016-12-30 18:36:54 -04:00
Alex Szpakowski c7419e0e37 Move most graphics Font code out of the opengl subfolder.
--HG--
branch : minor
2016-12-30 14:19:07 -04:00
Alex Szpakowski a78fa39113 Added “none” blend mode. This is equivalent to setBlendMode(“replace”, “premultiplied”) (which also effectively disables blending) but doesn’t require explicitly setting the alpha multiplication mode.
--HG--
branch : minor
2016-12-28 12:32:37 -04:00
Alex Szpakowski 19aee7e75c Minor optimizations to love.graphics.draw(texture).
--HG--
branch : minor
2016-12-28 01:24:21 -04:00
Alex Szpakowski 603c3e43d5 Moved line and shape drawing code out of the opengl folder, since it no longer directly calls any OpenGL functions.
--HG--
branch : minor
2016-12-27 23:21:25 -04:00
Alex Szpakowski 0d2e08baff Implement automatic batching for points, lines, shapes, and images/quads.
The above are batched together into a single draw call when called without other drawing calls in between, as long as the following criteria are met:

- The texture is the same.
- The primitive type is the same (points cannot be batched with non-points).
- The love.graphics state is the same (aside from the current color - i.e. setColor - and the transform state).
- The active shader’s uniform values are the same.

You can examine the ‘drawcalls’ field of love.graphics.getStats() to help determine if your code is allowing for optimum batching.

--HG--
branch : minor
2016-12-27 21:02:58 -04:00
Alex Szpakowski d7feb20df9 Remove love.timer SDL implementation files, since they don’t do anything.
--HG--
branch : minor
2016-12-10 16:21:48 -04:00
Alex Szpakowski 7d68a72d5f Add audio Filter files to the Xcode project
--HG--
branch : minor
2016-12-03 16:35:12 -04:00
Alex Szpakowski 0126f7986a Add missing files to the Xcode project
--HG--
branch : minor
2016-11-30 18:04:10 -04:00
Alex Szpakowski 0a3adc0839 Unify pixel format enums for ImageData, CompressedImageData, and Canvas into a single PixelFormat enum.
Replace love.graphics.getRawImageFormats and love.graphics.getCompressedImageFormats with love.graphics.getImageFormats.

--HG--
branch : minor
2016-11-27 22:53:23 -04:00
Alex Szpakowski 5bf25007da Fix building for iOS
--HG--
branch : minor
2016-11-25 23:21:08 -04:00
Alex Szpakowski 9930b81f94 The Xcode project now recognizes frameworks placed in love/platform/Xcode/macosx/Frameworks/ when building for macOS (closes issue #1230).
--HG--
branch : minor
2016-11-25 23:10:29 -04:00
Alex Szpakowski 14aa6965b3 Added Transform objects to love.math (resolves issue #1228).
- Added love.math.newTransform.
- Added love.graphics.applyTransform and love.graphics.replaceTransform.
- love.graphics.draw/print/printf, Text:add/addf, and SpriteBatch:add can accept a Transform argument.
- love.graphics.push can accept an optional Transform as a second argument, which will apply the Transform after pushing the matrix stack,
- Shader:send can accept Transform objects when sending to a mat4 uniform variable.

--HG--
branch : minor
2016-11-24 21:30:45 -04:00
Alex Szpakowski a245819ae1 Fix compilation on macOS and iOS. Minor cleanup.
--HG--
branch : minor
2016-11-20 10:04:08 -04:00