Commit Graph

498 Commits

Author SHA1 Message Date
Alex Szpakowski 7a50f32585 Merge branch '12.0-development' into metal 2020-07-29 18:21:19 -03:00
Alex Szpakowski b011487a3e Add new texel buffer type.
GLSL 3+ shaders can read from texel buffers by declaring a uniform samplerBuffer variable and calling texelFetch with a 0-based index, in the shader code. All attributes in a texel buffer's format array must have the same data format (e.g. all 'floatvec4' formats).

Shader:send accepts a texel Buffer for samplerBuffer uniforms.

Added 'texelbuffer' to love.graphics.getSupported (requires GLSL 3+ and desktop OpenGL).
Added 'texelbuffersize' to love.graphics.getSystemLimits. Returns the max number of values in a texel buffer (array length multiplied by the number of attributes declared in the buffer's format array).
2020-07-28 20:44:36 -03:00
Alex Szpakowski 9aa9319eb5 metal: implement depth/stencil state 2020-06-14 21:14:56 -03:00
Alex Szpakowski 9d2dca5740 metal: nogame and error screens work.
- implement love.graphics.setColor
- implement default textures
- hacky implementation of default uniform data
- use texture swizzles to set up LA8 (text) texture data
- shader reflection work
2020-06-13 20:29:23 -03:00
Alex Szpakowski 2c4bfab1de Merge branch '12.0-development' into GraphicsBuffer 2020-05-23 20:29:38 -03:00
Alex Szpakowski 9765485222 metal: partial implementation of pipeline states.
Add BGRA8 pixel format.
2020-05-03 12:48:43 -03:00
Alex Szpakowski 2cff535eb1 Move shader parsing code from Lua to C++. 2020-03-03 19:30:22 -04:00
Alex Szpakowski a5b87a10d1 Merge branch '12.0-development' into metal 2020-02-28 23:21:08 -04:00
Alex Szpakowski 7fbb68e90e Merge branch '12.0-development' into GraphicsBuffer 2020-02-28 23:10:21 -04:00
Alex Szpakowski 9425c9224b Rename internal batched draw code to be more clear 2020-02-27 20:08:50 -04:00
Alex Szpakowski 1ddfcd4cc8 Always use explicitly typed buffers, even in internal code 2020-02-23 16:30:55 -04:00
Alex Szpakowski b1c028a4d3 Merge branch '12.0' into GraphicsBuffer 2020-02-17 16:31:02 -04:00
Alex Szpakowski e001e4336d metal: initial work on setRenderTarget 2020-02-16 09:04:50 -04:00
Alex Szpakowski 742a954655 Merge branch '12.0' into metal 2020-02-15 14:18:35 -04:00
Alex Szpakowski aa636381d0 Fix MSAA texture creation logic 2020-02-09 12:46:52 -04:00
Alex Szpakowski 694bc9c5b7 rename love_Canvases to love_RenderTargets in shaders.
More misc. renaming
2020-02-09 12:11:19 -04:00
Alex Szpakowski 453322678c Rename internal uses of canvas to texture/render target 2020-02-08 20:40:10 -04:00
Alex Szpakowski 12c90b3dca Merge Image and Canvas GL backend classes into new common Texture class. 2020-02-07 20:29:21 -04:00
Alex Szpakowski 17f77407bb Replace internal C++ newImage and newCanvas methods with newTexture 2020-02-05 20:39:55 -04:00
Alex Szpakowski 258129738f Remove graphics::Canvas and graphics::Image 2020-02-04 22:06:55 -04:00
Alex Szpakowski b71eaf73cc Replaced some references to Image and Canvas with Texture. 2020-02-04 20:52:57 -04:00
Alex Szpakowski 63c5df6aa7 Begin unification of Canvases and Images. 2020-02-03 23:05:46 -04:00
Alex Szpakowski b46b3ed552 Move some Canvas code to Texture, devirtualize Texture::draw. 2020-02-03 19:02:58 -04:00
Alex Szpakowski f9248d478c Refactor sampler state parameters for textures. 2020-02-02 22:26:28 -04:00
Alex Szpakowski f24b1aa377 Move internal Slices class from Image to Texture 2020-02-02 13:50:37 -04:00
Alex Szpakowski 6c447ab4f6 Clean up some common Image and Canvas code. 2020-02-01 23:54:51 -04:00
Alex Szpakowski 2572f0c7a1 Meshes expose GraphicsBuffers, part 2 2020-02-01 15:39:59 -04:00
Alex Szpakowski d687b4c099 metal: initial work on windowing and instance creation 2020-01-30 20:35:33 -04:00
Alex Szpakowski 1bc2b947fc Rename Attributes struct to VertexAttributes 2020-01-13 20:44:39 -04:00
Alex Szpakowski ee5304ba53 Remove vertex namespace 2020-01-13 20:41:05 -04:00
Alex Szpakowski b0232a4a6b Initial work on unified graphics buffers representing different types of data. 2020-01-12 16:41:23 -04:00
Alex Szpakowski 5f9b5a21d0 Merge default into minor
--HG--
branch : minor
2020-01-03 22:45:36 -04:00
Alex Szpakowski fc4847c69d Update copyright for the new year 2020-01-03 22:40:36 -04:00
Alex Szpakowski 361cefbb05 Add new wrap mode "clampone". Pixels sampled outside of [0, 1] are white (1, 1, 1, 1).
--HG--
branch : minor
2019-12-27 13:57:20 -05:00
Alex Szpakowski 6c662ade41 Fix disabling blending,
--HG--
branch : minor
2019-12-27 13:28:15 -05:00
Alex Szpakowski b41f1316fa Add love.graphics.setBlendState, which sets the lower level blend operation and factor values which higher level blend modes are based on.
--HG--
branch : minor
2019-12-27 09:57:42 -05:00
Alex Szpakowski efa2bd7837 Consolidate some internal graphics state definitions into a new renderstate file.
--HG--
branch : minor
2019-12-26 23:07:51 -05:00
Alex Szpakowski f3b52f66fe Update the internal naming convention for pixel formats.
--HG--
branch : minor
2019-12-23 23:38:04 -04:00
Alex Szpakowski 3435a6bcbf Change the internal constant color from a (per-draw) vertex attribute to a uniform. Pack most built-in uniforms into a single vec4 array and update them all with a single glUniform call.
--HG--
branch : minor
2019-11-18 21:13:54 -04:00
Alex Szpakowski 37c579929b Add support for GLSL 4.30 and GLSL ES 3.10, via #pragma language glsl4.
macOS and iOS won't support glsl4 until a Metal backend is implemented.

--HG--
branch : minor
2019-11-16 14:33:48 -04:00
Alex Szpakowski c3be5c4682 Fix a crash when Canvas:newImageData is called and the width multiplied by the canvas format's pixel byte size is not a multiple of 4, for example a 3x3 r16f canvas (thanks Max!) 2019-11-12 21:27:46 -04:00
Alex Szpakowski 55d4dc0f9e Restructure some internal vertex buffer binding code to be closer to how graphics APIs actually behave. 2019-08-25 16:50:15 -03:00
Alex Szpakowski 09cd3b68c9 Explicitly disable color FBO attachments where possible for depth/stencil canvases. Potentially fixes issue #1470 2019-04-02 21:13:01 -03:00
Alex Szpakowski 74dcc41b38 Cleaned up love.graphics Image code for determining whether the image's pixel format is supported. 2019-01-16 19:30:21 -04:00
Alex Szpakowski 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Alex Szpakowski 364718fa46 Android: potentially work around a Qualcomm Adreno driver bug which prevented videos from being loaded into vram. 2018-12-31 21:02:02 -04:00
Alex Szpakowski 93372b87a8 Fix love.graphics.clear(colortable) when no Canvas is active. 2018-04-03 20:12:41 -03:00
Alex Szpakowski cfa30167ca Fix hash map collisions when setting canvases. 2018-04-02 15:58:38 -03:00
Alex Szpakowski 39201af79f Improve the error message when an invalid layer or face index is given in love.graphics.setMode. 2018-01-14 19:15:24 -04:00
Bart van Strien e80247c191 Happy new year! 2018-01-03 19:47:35 +01:00