Commit Graph

1359 Commits

Author SHA1 Message Date
Alex Szpakowski 8e5b71e8e7 Improve automatic batching performance slightly on AMD gpus by removing some redundant/useless opengl calls (there is no mapped buffer to flush). 2019-06-01 15:58:42 -03:00
Alex Szpakowski ddef70e141 Potentially improve automatic batching performance slightly on nvidia/intel GPUs. 2019-06-01 15:06:19 -03:00
Alex Szpakowski 51d0733943 Apply workaround for font texture loading on Radeon 3000/4000-era graphics cards to mobile GPUs as well as desktop ones. 2019-05-30 20:36:19 -03:00
Alex Szpakowski 02fa8b0b2b Fill truetype font glyph atlases with transparent white instead of transparent black in the borders between glyphs. Fixes black fringes around text (resolves issue #1495) and reduces the appearance of flickering when text is moved at non-integer coordinates and gamma correct rendering isn't enabled (closes issue #1143). 2019-05-27 19:36:22 -03:00
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 76917685dd Add an optional vertex count parameter to mesh:setVertices. 2019-01-19 12:12:29 -04: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 1bb50fccac Reduce peak memory usage when a font's glyph atlas needs to be recreated. 2019-01-16 18:21:58 -04:00
Alex Szpakowski d83117c981 Improve precision of the gammaToLinearPrecise shader function. 2019-01-15 17:29:13 -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 752c5b70f1 Fix font vertex generation skipping the first glyph in the string if it restarts its loop due to its texture atlas being recreated to make room for more glyphs. Resolves issue #1452. 2018-12-27 21:16:45 -04:00
Alex Szpakowski a91a0a9431 update glslang 2018-12-26 14:47:34 -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 dc5e43adf3 Split wrap_Graphics.lua into two files to work around VS2013's 16kB limit for raw string literals. 2018-12-13 22:34:30 -04:00
Alex Szpakowski 1896f82f5d GL3/GLES3: Work around some drivers (e.g. Intel on Windows) making pixel shaders unnecessarily expensive when MRT is not used, because love declares ~8 pixel shader outputs even when only the first is used by shader code. 2018-12-13 20:52:45 -04:00
Alex Szpakowski bcc5e77632 Simplify OpenGL 3+ stream buffer syncing code used with automatic batching. 2018-12-12 17:51:03 -04:00
Bart van Strien 7253118100 Make and use a vector variant of luax_convobj
Which also prevents accessing the zeroeth element of an empty vector
2018-12-03 18:19:28 +01:00
Michael Vetter a1d6da4624 Silence compiler warning
Silence compiler warnings about methods with return value and potentially not returning anything.
This happens with gcc8 and the `-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -std=c++11` flags passed to it by default on openSUSE.
2018-11-29 17:07:20 +01: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
Josh Grams cca5af66e8 setCanvas: rephrase confusing error message. 2018-09-21 08:32:27 -04: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
Martin Felis 1462f4cf56 (Android) Removed declaration of log2 as it is available in newer NDK APIs 2018-03-31 22:46:12 +02:00
bjornbytes 1916c2a5fa Fix getCanvas for cube canvases; 2018-02-11 22:09:14 -08:00
Bart van Strien 2f17cab3b4 Prevent out-of-bounds access in Text:add when an empty string is added (fixes #1372) 2018-01-30 17:31:44 +01:00
Alex Szpakowski d37c53584e Fixed the mipmaps flag in love.graphics.newImage; cleaned up a bit of vector code in love.math.isConvex. 2018-01-28 22:32:40 -04:00
Alex Szpakowski a2454d74cd Fix some DPI scale calculations to work with depth-only rendering. 2018-01-21 17:35:57 -04: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 ac52666c6f Rename ParticleSystem:setAreaSpread to setEmissionArea, and move the functionality from setAreaSpreadAngle/setAreSpreadIsRelativeDirection into setEmissionArea. Resolves issue #1311. 2018-01-13 21:11:07 -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 6808968893 Fix an issue when calculating the number of mipmaps for a volume/3D texture. 2018-01-06 01:55:09 -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 fd514d8176 Update some more copyright notices
I am so good at using search/replace I definitely didn't need a second commit
for this.
2018-01-03 19:55:02 +01: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 7ff428b64f Fix love.graphics.newImage(compressedimagedata, settings) to respect the mipmaps boolean flag instead of always using the compressed texture's mipmaps if it has any. 2017-12-27 11:03:32 -04:00
Alex Szpakowski 065f4a8e9b Fix SpriteBatch:setDrawRange. 2017-12-24 22:31:58 -04:00
Alex Szpakowski f7b2598490 Remove unnecessary internal constructor arguments. 2017-12-24 22:08:57 -04: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