Alex Szpakowski
bfcf025ef7
Add 'staging' buffer data usage enum.
2021-12-28 12:49:33 -04:00
Alex Szpakowski
5b3a5e7721
Remove the need for copysource and copydest buffer usage flags.
2021-12-27 21:17:04 -04:00
Alex Szpakowski
a3ff9999d1
Disallow mat3 formats in shader storage buffers.
...
GLSL's std430 layout rules make it really unintuitive for users to deal with.
2021-11-06 18:30:08 -03:00
Alex Szpakowski
68977ec311
Fix alignment of storage buffers with vec3 or mat3 components.
2021-11-06 11:17:23 -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
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
50ff86bd92
Graphics Buffers can be used as Shader Storage Buffers.
2021-01-10 17:53:12 -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
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
36b0394afc
Add love.graphics.newVertexBuffer and love.graphics.newBuffer.
2020-07-26 16:32:18 -03:00
Alex Szpakowski
d75f5df80d
Add Buffer methods
...
flush, setArrayData, setElement, getElement, getElementCount, getElementStride, getSize, getFormat
2020-07-25 19:48:54 -03:00
Alex Szpakowski
c2be89f130
Fix crashes when creating a Buffer.
2020-07-21 20:50:49 -03:00
Alex Szpakowski
3b67db4672
Add love.graphics.newIndexBuffer
2020-07-21 18:57:50 -03:00
Alex Szpakowski
2c90ccabb3
Avoid some hardcoded strings
2020-02-23 16:49:38 -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
2572f0c7a1
Meshes expose GraphicsBuffers, part 2
2020-02-01 15:39:59 -04:00
Alex Szpakowski
25d9ae2ba0
Meshes expose vertex buffers, part 1
...
(compiles, but is currently half-implemented and broken)
2020-01-19 15:03:19 -04:00
Alex Szpakowski
d5d50d2e0d
Move DataFormat enum to vertex.h
2020-01-13 23:20:49 -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
fc4847c69d
Update copyright for the new year
2020-01-03 22:40:36 -04:00
Alex Szpakowski
0752f27bdf
Update copyright year for 2019
2019-01-03 21:09:05 -04:00
Bart van Strien
e80247c191
Happy new year! ✨
2018-01-03 19:47:35 +01:00
Alex Szpakowski
a31b500b03
Simplify quad drawing code, and use glDrawElementsBaseVertex when available.
2017-12-24 22:05:10 -04:00
Alex Szpakowski
785902d8bd
Fix windows build
2017-12-24 16:05:52 -04:00
Alex Szpakowski
3fb621af95
Always use a 16 bit index array for quad indices, with multiple draws when necessary. See issue #1356 .
2017-12-24 15:54:03 -04:00
Alex Szpakowski
864147c38c
love.graphics: move more platform-independent code out of the opengl backend
...
--HG--
branch : minor
2017-07-22 23:34:39 -03:00
Alex Szpakowski
b7dde8712a
Fix drawing with >= 16k sprites in a spritebatch on desktops.
...
--HG--
branch : minor
2017-02-20 15:46:43 -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