Sasha Szpakowski
64a30f177f
Merge branch 'main' into 12.0-development
2024-02-10 12:24:48 -04:00
Sasha Szpakowski
94d5864144
update year for copyright notice
2024-02-10 12:13:22 -04:00
Sasha Szpakowski
8872497561
graphics: handle default textures in high level code.
...
Previously each backend had to set up default textures with its own code, which needs some care for it to be robust.
2023-12-27 21:28:02 +01:00
Sasha Szpakowski
f6cdbdc868
Merge branch 'main' into 12.0-development
2022-12-31 22:46:34 -04:00
Sasha Szpakowski
c823dbca96
Update copyright year for 2023
2022-12-31 22:25:49 -04:00
Alex Szpakowski
7f3538d2ba
Merge branch 'main' into 12.0-development
2022-01-05 21:10:27 -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
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
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
7a18190c5c
Restructure SpriteBatch internal vertex data
2020-11-03 22:12:56 -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
d24b9e9e6f
Rename love.graphics.newCanvas to newRenderTarget
2020-02-11 19:32:00 -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
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
881a31512d
Remove the variant of SpriteBatch:setColor() which disables all previously set colors (resolves issue #1090 ).
...
--HG--
branch : minor
2019-12-29 21:20:47 -04:00
Alex Szpakowski
9ab2a94037
Rename internal C++ Color struct to Color32 to help differentiate it from Colorf.
2019-09-14 23:13:40 -03: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
8455ef22d5
More consistent naming for vertex and index buffers in love's code.
2019-06-04 20:29:44 -03: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
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
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
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
7694edfd52
Auto-batched draws (except for love.graphics.print, for now) are affected by 3D transforms.
...
--HG--
branch : minor
2017-05-17 22:03:09 -03:00
Alex Szpakowski
ac697ddb0f
Clean up love’s internal Vector code a bit, and rename it to Vector2 so it’s more obvious what it is.
...
--HG--
branch : minor
2017-05-16 22:07:01 -03:00
Alex Szpakowski
a8e4db8e1e
Clamp color arguments to [0, 1] in cases where we don’t support values outside of that range internally.
...
--HG--
branch : minor
2017-03-09 21:15:56 -04:00
Alex Szpakowski
66b299822a
Array textures can be easily drawn without a shader (resolves issue #1111 ).
...
Added love.graphics.drawLayer(texture, layerindex, …). ‘texture’ must be an array texture.
Added SpriteBatch:add/setLayer.
Added Quad:get/setLayer. This applies to array textures that are drawn without specifying an explicit layer index in the draw call.
Added love.graphics.newQuad variants which have layer arguments.
--HG--
branch : minor
2017-02-26 17:11:22 -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