Alex Szpakowski
8a48f1b733
Merge branch 'main' into 12.0-development
2021-10-19 21:50:19 -03:00
Alex Szpakowski
4574805486
Make rounded rectangles more robust.
...
- rx and ry parameters are set to 0 if they're negative.
- automatic points calculation doesn't cause an unnecessarily large amount of points when rx or ry are greater than half the rectangle's size.
2021-10-10 22:08:56 -03:00
Alex Szpakowski
a551fcd492
Initial support for writing to textures in compute shaders.
2021-08-13 14:43:03 -03:00
Alex Szpakowski
cffd485976
Allow rendering to integer textures.
2021-08-12 17:43:33 -03:00
Alex Szpakowski
48b3a4e860
Initial support for integer format textures.
...
They can't be rendered to and ImageData can't use the formats, for now.
2021-08-12 16:38:54 -03:00
Alex Szpakowski
4caeb27047
Slightly less heavy-handed compute memory barrier implementation.
...
Also validate whether there are any unbound writable resources when dispatching compute shader work.
2021-08-11 18:41:38 -03:00
Alex Szpakowski
92d0d1d60f
love.graphics.validateShader no longer errors if the system doesn't support the shader
2021-07-18 14:09:28 -03:00
bjorn
9ae529b325
Flush batched draws before dispatching compute;
2021-07-17 19:58:14 -07:00
bjorn
13a10ac482
love.graphics.newComputeShader;
2021-07-17 19:58:11 -07:00
bjorn
25fbf1d8ce
love.graphics.dispatchThreadgroups;
2021-07-17 19:49:53 -07:00
bjorn
085ba2cb6e
Add compute ShaderStage;
2021-07-17 19:46:05 -07:00
bjorn
f6559ce49e
Add threadgroups{x,y,z} SystemLimits;
2021-07-17 19:38:45 -07:00
Alex Szpakowski
14cda7818f
Rename internal enum
2021-04-07 20:43:22 -03:00
Alex Szpakowski
21f5ba86d3
Merge branch 'master' into 12.0-development
2021-04-07 20:33:44 -03:00
Alex Szpakowski
f89aabb0bb
Update copyright year for 2021
2021-04-04 16:14:45 -03:00
Alex Szpakowski
694d448e83
Vertex shaders can write to gl_PointSize ( fixes #1603 ).
...
If a shader uses gl_PointSize then it can only be used when drawing points. If a shader doesn't use gl_PointSize then it can't be used when drawing points.
Added 'ConstantPointSize' and 'CurrentDPIScale' built-in shader uniforms.
ConstantPointSize is in DPI-scaled points, whereas gl_PointSize is in pixels, so to get the correct default behaviour a shader needs to do gl_PointSize = ConstantPointSize * CurrentDPIScale
2021-01-23 13:47:12 -04:00
Alex Szpakowski
deff795908
Rename some internal buffer enums to better match what they do
2021-01-17 20:59:16 -04:00
Alex Szpakowski
e2838131f2
Add love.graphics.copyBuffer.
2021-01-17 14:02:00 -04:00
Alex Szpakowski
e1f40b433d
Clean up some graphics enum declaration code
2021-01-16 20:51:06 -04:00
Alex Szpakowski
50ff86bd92
Graphics Buffers can be used as Shader Storage Buffers.
2021-01-10 17:53:12 -04:00
Alex Szpakowski
2a5a90ccef
Add 'vertexmain' and 'pixelmain' shader entry points.
...
These are low level 'raw' entry points which don't declare any inputs or outputs themselves. They require GLSL 3 to use.
2020-12-27 19:17:47 -04:00
Alex Szpakowski
1f9d98263d
Refactor Buffer internals.
...
Allows buffers created with love.graphics.newBuffer to only allocate VRAM data. Previously they had a copy of their contents in RAM.
Also makes it easier to implement Buffers in other graphics APIs and to implement more types of Buffers in the future.
2020-12-22 19:23:02 -04:00
Alex Szpakowski
7e0c7e3a67
Fix the default mipmap filter for textures.
2020-10-26 18:25:40 -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
2c4bfab1de
Merge branch '12.0-development' into GraphicsBuffer
2020-05-23 20:29:38 -03:00
Alex Szpakowski
2cff535eb1
Move shader parsing code from Lua to C++.
2020-03-03 19:30:22 -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
4197a364fd
Internal restructuring of some Mesh code
2020-02-23 22:39:18 -04:00
Alex Szpakowski
1ddfcd4cc8
Always use explicitly typed buffers, even in internal code
2020-02-23 16:30:55 -04:00
Alex Szpakowski
2828761060
Move some code from Mesh wrapper to Buffer wrapper
2020-02-22 18:58:41 -04:00
Alex Szpakowski
b1c028a4d3
Merge branch '12.0' into GraphicsBuffer
2020-02-17 16:31:02 -04:00
Alex Szpakowski
ac524e681a
Change the default font from Vera size 12 to Noto Sans size 13.
...
Resolves issue #1075 .
2020-02-17 01:55:49 -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
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
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
6c447ab4f6
Clean up some common Image and Canvas code.
2020-02-01 23:54:51 -04:00
Alex Szpakowski
c9809d8d82
Clean up some Mesh code
2020-02-01 15:59:38 -04:00
Alex Szpakowski
2572f0c7a1
Meshes expose GraphicsBuffers, part 2
2020-02-01 15:39:59 -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
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