Alex Szpakowski
a533982cb4
Replace internal 'staging' buffer data type with new 'readback' type.
2022-05-30 21:43:25 -03:00
Alex Szpakowski
7f3538d2ba
Merge branch 'main' into 12.0-development
2022-01-05 21:10:27 -04:00
Alex Szpakowski
ecbc5ca7f6
Add love.graphics.getQuadIndexBuffer.
...
love's pre-generated quad index buffer is useful when combined with drawShaderVertices. Note that it uses 16 bit indices so it can only draw up to 16k quads in a single call.
2022-01-03 16:22:08 -04:00
Alex Szpakowski
8e7fd10b6f
Update copyright year for 2022
2021-12-31 18:33:40 -04: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
d75f5df80d
Add Buffer methods
...
flush, setArrayData, setElement, getElement, getElementCount, getElementStride, getSize, getFormat
2020-07-25 19:48:54 -03:00
Alex Szpakowski
3b67db4672
Add love.graphics.newIndexBuffer
2020-07-21 18:57:50 -03: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
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
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
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
15cc540e4c
Make internal vertex attribute code less OpenGL-specific.
...
--HG--
branch : minor
2017-10-25 23:12:39 -03: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
d990044288
love.graphics internal Buffer objects are no longer OpenGL-specific.
...
--HG--
branch : minor
2017-01-28 19:26:57 -04:00