Alex Szpakowski
09cd3b68c9
Explicitly disable color FBO attachments where possible for depth/stencil canvases. Potentially fixes issue #1470
2019-04-02 21:13:01 -03:00
Alex Szpakowski
0c2153e0ca
Fix a potentially uninitialized value in love.graphics code. Minor cleanup.
2019-04-02 20:20:18 -03:00
Alex Szpakowski
74dcc41b38
Cleaned up love.graphics Image code for determining whether the image's pixel format is supported.
2019-01-16 19:30:21 -04:00
Alex Szpakowski
0752f27bdf
Update copyright year for 2019
2019-01-03 21:09:05 -04:00
Alex Szpakowski
364718fa46
Android: potentially work around a Qualcomm Adreno driver bug which prevented videos from being loaded into vram.
2018-12-31 21:02:02 -04:00
Alex Szpakowski
3af66da51e
Automatic batching: improve the consistency of performance and draw calls for the vertex buffer upload approach taken on older Windows and Linux GPUs which are only capable of GL3.
2018-12-27 23:52:54 -04:00
Alex Szpakowski
1c853cbcc3
Fall back to glTexImage instead of glTexStorage on Radeon 3xxx drivers on Windows. Potentially works around a graphics driver bug which prevented text from showing up.
2018-12-25 18:33:26 -04:00
Alex Szpakowski
43ee232897
macOS: Use a (non-persistent) map/sync approach for stream buffers, instead of glBufferSubData. This usually won't affect performance either way, but avoids some worst-case performance cliffs on my Intel GPU in my testing.
2018-12-16 15:15:32 -04:00
Alex Szpakowski
bcc5e77632
Simplify OpenGL 3+ stream buffer syncing code used with automatic batching.
2018-12-12 17:51:03 -04:00
Alex Szpakowski
5143926b38
Copy the data size of old uniforms to the new uniform when reinitializing shader uniforms after love.window.setMode.
...
Fixes a crash in the Data variant of Shader:send when it's called after setMode on a shader that was created before the setMode call.
2018-11-12 15:20:09 -04:00
Alex Szpakowski
535be96f03
Optimize StreamBuffer::getUsableSize to not be a virtual method.
2018-09-29 14:50:49 -03:00
Alex Szpakowski
79679f6272
Fix an uninitialized variable causing (harmless) OpenGL errors. Resolves issue #1434 .
2018-08-14 18:10:15 -03:00
Alex Szpakowski
bb228cab0c
Fix love.event.quit causing crashes and other bad behaviour if a Canvas is active. Resolves issue #1395 .
2018-04-07 12:43:00 -03:00
Alex Szpakowski
7b91ab915c
Potentially fix depth/stencil support on older phones.
2018-04-07 11:35:20 -03:00
Bart van Strien
571503c02e
Don't use deprecated isFile in love.joystick.loadGamepadMappings ( fixes #1391 )
2018-04-04 17:49:51 +02:00
Alex Szpakowski
93372b87a8
Fix love.graphics.clear(colortable) when no Canvas is active.
2018-04-03 20:12:41 -03:00
Alex Szpakowski
cfa30167ca
Fix hash map collisions when setting canvases.
2018-04-02 15:58:38 -03:00
Alex Szpakowski
39201af79f
Improve the error message when an invalid layer or face index is given in love.graphics.setMode.
2018-01-14 19:15:24 -04:00
Alex Szpakowski
2459752c06
Add support for partial Image updates via Image:replacePixels(imagedata [, sliceindex, mipmap, x, y]) with a smaller-sized ImageData.
...
Also updated the argument order of Canvas:newImageData to match: (sliceindex, mipmap, x, y, w, h).
2018-01-10 22:52:28 -04:00
Alex Szpakowski
22f72c7da6
Fix a crash in Image:replacePixels when a different ImageData is given than the one that created the Image.
2018-01-10 21:31:00 -04:00
Alex Szpakowski
3857d09132
Don't use persistently mapped buffers on Intel Ivy Bridge GPUs on Windows. glClientWaitSync can hang with those drivers, apparently.
2018-01-06 00:42:16 -04:00
Bart van Strien
e80247c191
Happy new year! ✨
2018-01-03 19:47:35 +01:00
Alex Szpakowski
dd59803ad3
Error when invalid setting names are used in the tables passed to love.graphics.newCanvas and newImage. See issue #1312 .
2017-12-28 23:16:51 -04:00
Alex Szpakowski
065f4a8e9b
Fix SpriteBatch:setDrawRange.
2017-12-24 22:31:58 -04: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
3a8390ceff
Fix a couple bugs with love.graphics.clear.
2017-12-10 14:40:08 -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
e099e57052
Cleaned up some internal love.graphics code.
...
--HG--
branch : minor
2017-12-03 23:04:40 -04:00
Alex Szpakowski
cbcb1a8606
Allow a depth/stencil canvas to be active without a color canvas.
...
--HG--
branch : minor
2017-12-03 19:33:48 -04:00
Alex Szpakowski
b8c4b07edf
Clean up unused temporary Canvases after a few frames.
...
--HG--
branch : minor
2017-11-13 19:45:18 -04:00
Alex Szpakowski
8672ff2272
Use a more efficient method of streaming automatically batched vertices on AMD Windows and Linux systems.
...
--HG--
branch : minor
2017-11-11 20:48:02 -04:00
Alex Szpakowski
7f88037d94
Move the implementation for Graphics::flushStreamDraws out of the opengl backend
...
--HG--
branch : minor
2017-10-26 21:05:15 -03: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
7a2e52b12d
Cleaned up some vertex data-related code.
...
--HG--
branch : minor
2017-10-22 12:33:47 -03:00
Alex Szpakowski
90cb3870e7
Fix error output when a shader stage fails to compile.
...
--HG--
branch : minor
2017-10-21 15:18:25 -03:00
Alex Szpakowski
e5b0d96b27
Restructured some Shader code. Added runtime temporary caching and sharing of shader stages. Resolves issue #1235 .
...
--HG--
branch : minor
2017-10-21 03:08:18 -03:00
Alex Szpakowski
050be14547
Small graphics code cleanup
...
--HG--
branch : minor
2017-09-30 16:42:11 -03:00
Alex Szpakowski
8068b0f1d4
Add variant of love.graphics.captureScreenshot which takes a Channel argument.
...
--HG--
branch : minor
2017-09-30 10:25:14 -03:00
Alex Szpakowski
844900db39
Rename all cases of 'pixel density' to 'DPI scale' in love's APIs.
...
--HG--
branch : minor
2017-09-24 16:09:05 -03:00
Alex Szpakowski
5f64737956
Shader:send now optionally accepts a Data object (with optional byte offset and size parameters). Resolves issue #1343 .
...
Also changed the optional 'columnMajor' argument of the matrix variant of Shader:send and Transform:setMatrix to accept enum constants instead. Valid values are "row" and "column".
--HG--
branch : minor
2017-09-23 19:47:57 -03:00
Alex Szpakowski
b6ecdb7c78
SpriteBatches/Text objects/ParticleSystems: use glBufferData+glBufferSubData instead of glBufferData+glBufferData for orphaning streaming vertex data, on most platforms. Apparently some Android drivers have a problem with the latter.
...
--HG--
branch : minor
2017-09-03 23:41:35 -03:00
Alex Szpakowski
61a8ce6a66
Remove obsolete code and hopefully fix VS2013 build
...
--HG--
branch : minor
2017-09-03 18:46:33 -03:00
Alex Szpakowski
b4f8f08b70
Enable (when available) and improve performance of persistently mapped buffer path for the vertex/index buffers used with automatic batching.
...
--HG--
branch : minor
2017-09-03 18:23:54 -03:00
Alex Szpakowski
de28c6e6a8
Add the ability to have formally deprecated functions.
...
Functions which are deprecated will print out a message and show up in a small dialog on-screen, when they're first called. Deprecation output is disabled in fused mode by default, and can be modified with love.setDeprecationOutput(enable).
--HG--
branch : minor
2017-08-27 13:46:31 -03:00
Alex Szpakowski
b129d49a6c
Move Color.h from modules/graphics/ to common/
...
--HG--
branch : minor
2017-08-01 23:53:44 -03:00
Alex Szpakowski
68f1ab5f47
Check a couple more vendor strings to determine if an AMD driver is being used.
...
--HG--
branch : minor
2017-07-29 02:06:32 -03:00
Alex Szpakowski
d338f274ff
Update naming convention for builtin shader matrices.
...
- ClipSpaceFromLocal replaces TransformProjectionMatrix
- ViewSpaceFromLocal replaces TransformMatrix
- ClipSpaceFromView replaces ProjectionMatrix
- ViewNormalFromLocal replaces NormalMatrix
--HG--
branch : minor
2017-07-29 01:25:56 -03:00
Alex Szpakowski
b3d4443f9d
Added 'drawcallsbatched' field to the table returned by love.graphics.getStats.
...
It has the number of draw calls that were saved by auto-batching.
--HG--
branch : minor
2017-07-23 01:58:25 -03:00