Alex Szpakowski
2e2ebe95cd
Clean up some obsolete internal graphics code
2021-01-17 16:50:44 -04:00
Alex Szpakowski
4244e01a35
More texture format support cleanup
2021-01-17 14:48:35 -04:00
Alex Szpakowski
ef5a0250e9
Fix compilation on windows
2021-01-17 14:13: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
52238bb7d9
Add optional source data start index arg to Buffer:setArrayData
...
The argument list is now Buffer:setArrayData(data or table, sourceindex=1, destindex=1, count=automatically computed)
#1598
2021-01-16 20:34:27 -04:00
Alex Szpakowski
5e77944dc0
refactor texture format support internals
2021-01-16 13:09:01 -04:00
Alex Szpakowski
50ff86bd92
Graphics Buffers can be used as Shader Storage Buffers.
2021-01-10 17:53:12 -04:00
Alex Szpakowski
0ec7ea73de
Improve error message slightly
2020-12-30 11:46:00 -04:00
Alex Szpakowski
2fb88cb4a5
Remove some obsolete code
2020-12-27 19:52:27 -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
65bfeedd4e
Merge branch 'master' into 12.0-development
2020-12-26 22:48:08 -04:00
Alex Szpakowski
95ab4054ff
Fix a freeze on Intel drivers when using mipmapped Canvases
...
Fixes #1585
Also disallow generateMipmaps on depth/stencil canvases because it's not really supported.
2020-12-26 16:37:37 -04:00
Alex Szpakowski
4f730e930b
Potential workaround for driver bug related to canvas mipmaps
2020-12-25 16:13:29 -04:00
Alex Szpakowski
fe23c16198
Disable gamma correction on Windows + Intel HD 2/3000 / Intel HD Graphics
...
It's completely broken there. Closes #1592
2020-12-24 20:31:33 -04:00
Alex Szpakowski
48a13d443b
Fix validating glsl1 shaders using array textures on GLES3
2020-12-23 20:42:12 -04:00
Alex Szpakowski
d357ceb191
Merge pull request #1648 from xordspar0/tegra-3-bug
...
Work around Ouya driver bug related to texture array support
2020-12-23 20:13:41 -04:00
Alex Szpakowski
b7400892a4
Merge branch 'master' into 12.0-development
2020-12-22 19:35:06 -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
a1861a8ff4
Don't allow calling Texture:generateMipmaps on depth/stencil textures
2020-12-21 13:36:29 -04:00
Miku AuahDark
81272ba5b5
Only use pinned memory on AMD GPUs.
...
As per in Discord, for some reason Intel driver in Linux(?) expose
pinned memory extension and causes driver crash in one test case.
2020-12-15 10:25:38 +08:00
Jordan Christiansen
0fd53e2e3d
Disable GL_EXT_texture_array on OpenGL ES 2.0
...
The Nvidia Tegra 3 driver for Android (used by Ouya) erroneously claims
to support the desktop-oriented GL_EXT_texture_array extension. On
desktop GPUs using (non ES) OpenGL, the glTexImage3D and similar
functions are always present, and the GL_EXT_texture_array extension
simply adds support for texture arrays to those functions. On OpenGL ES
2.0, those functions do not exist, and GL_OES_texture_3D is required to
define them.
Calling glTexImage3D on the Tegra 3 causes a segfault. This change works
around the issue by manually setting GLAD_EXT_texture_array to 0 on
OpenGL ES 2.0 systems, which causes LÖVE to avoid codepaths that assume
that the 3D texture functions are available. It doesn't make sense for
any OpenGL ES 2.0 GPU to claim support for GL_EXT_texture_array.
Fixes #1647
2020-12-09 19:54:36 -06:00
Alex Szpakowski
e32935e0f6
Backport Canvas memory stats fix from 12.0.
...
Fixes #1642
2020-11-11 15:11:00 -04:00
Alex Szpakowski
7a18190c5c
Restructure SpriteBatch internal vertex data
2020-11-03 22:12:56 -04:00
Alex Szpakowski
5031cb5f56
Images don't hold on to RAM copies of their contents anymore
2020-11-02 18:17:07 -04:00
Alex Szpakowski
7e0c7e3a67
Fix the default mipmap filter for textures.
2020-10-26 18:25:40 -03:00
Alex Szpakowski
99875d83b3
Fix explicit texture MSAA of 1 or 0 not being treated the same as the default
2020-10-26 17:11:50 -03:00
Alex Szpakowski
e10444c21f
Move Texture:generateMipmaps error handling out of backend code
2020-10-25 23:13:50 -03:00
Alex Szpakowski
442f37e0a1
Fix a potential bug in captureScreenshot on some older systems
2020-10-25 23:00:12 -03:00
Alex Szpakowski
7934ce0a66
Handle backbuffer MSAA manually in love.graphics code
...
Previously love would use SDL APIs to make the system (WGL etc) handle it, which meant the OpenGL context had to be recreated whenever MSAA changed.
2020-10-25 22:24:07 -03:00
Alex Szpakowski
2b0f8495bf
Fix a crash in Text:set. Fixes issue #1639
2020-10-16 21:19:50 -03:00
Alex Szpakowski
d083c87d74
Update glslang
2020-10-12 17:29:08 -03:00
Alex Szpakowski
365387150e
Merge branch 'master' into 12.0-development
2020-08-09 12:25:07 -03:00
Alex Szpakowski
5f4d2f3323
Fix love.graphics.newVolumeImage when explicit mipmaps are given
...
Fixes issue #1602
2020-08-09 12:12:28 -03:00
Alex Szpakowski
aa219c0d7a
Simplify some boilerplate internal code
2020-08-02 16:00:08 -03:00
Alex Szpakowski
f168333938
Simplify Buffer APIs.
...
Remove Buffer:set/getElement, Buffer:isCPUReadable, and the cpureadable flag in newBuffer's settings parameter.
2020-08-01 21:51:37 -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
3c65d5ae41
love.graphics.newIndexBuffer uses 0-based index values.
...
It can't be consistent with other buffer types or Buffer methods if it's 1-based.
2020-07-27 17:35:16 -03:00
Alex Szpakowski
de370beb68
Remove deprecation notices from newImage for now
2020-07-26 16:59:09 -03:00
Alex Szpakowski
2d7267a428
Add Buffer:isBufferType and Buffer:isCPUReadable.
2020-07-26 16:43:40 -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
1d087cc5c2
Fix Mesh/Buffer:flush uploading more data than it needs to, sometimes.
2020-07-21 21:56:47 -03:00
Alex Szpakowski
7ad5e5a21a
Fix newMesh(format, ...). Fix Mesh:attachAttribute.
...
Deprecate the mesh argument variant of attachAttribute in favor of the buffer argument variant.
2020-07-21 21:46:45 -03:00
Alex Szpakowski
c2be89f130
Fix crashes when creating a Buffer.
2020-07-21 20:50:49 -03:00
Alex Szpakowski
77834d8e6c
Add a Data object variant of love.graphics.newIndexBuffer
2020-07-21 19:09:13 -03:00
Alex Szpakowski
3b67db4672
Add love.graphics.newIndexBuffer
2020-07-21 18:57:50 -03:00
Alex Szpakowski
834cddc34c
Add Mesh:getVertexBuffer.
2020-07-20 22:13:30 -03:00
Alex Szpakowski
e60736f5a6
Add Mesh:set/getIndexBuffer.
2020-07-20 22:10:08 -03:00
Alex Szpakowski
3f4161dd5d
Merge branch '12.0-development' into GraphicsBuffer
2020-07-20 18:13:27 -03:00