Commit Graph

1385 Commits

Author SHA1 Message Date
Alex Szpakowski f3b52f66fe Update the internal naming convention for pixel formats.
--HG--
branch : minor
2019-12-23 23:38:04 -04:00
Alex Szpakowski bc12312f0f macOS: rename most internal uses of "macosx" to "macos".
--HG--
branch : minor
2019-12-22 17:54:20 -04:00
Alex Szpakowski e898d4571a Merge default into minor
--HG--
branch : minor
2019-12-20 00:46:32 -04:00
Alex Szpakowski 23db4f4a59 Remove functions that were deprecated in LÖVE 11.
--HG--
branch : minor
2019-12-20 00:45:20 -04:00
Paul Cercueil 0bac89e00f Fix build on MIPS
On MIPS toolchains, the 'mips' keyword is a macro defined to 1.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-12-19 11:36:33 +01:00
Alex Szpakowski acf84349a9 Move some Lua code around to work around VS2013's 16kB limitation for C++ raw string literals.
--HG--
branch : minor
2019-11-23 19:16:59 -04:00
Alex Szpakowski 3a227cea37 Merge default into minor
--HG--
branch : minor
2019-11-19 21:47:48 -04:00
Alex Szpakowski 6a552d5a6f Allow Canvases to use the r16, rg16, and rgba16 pixel formats. 2019-11-18 22:45:54 -04:00
Alex Szpakowski 8512b1a8f6 Remove some dead code.
--HG--
branch : minor
2019-11-18 21:16:51 -04:00
Alex Szpakowski 3435a6bcbf Change the internal constant color from a (per-draw) vertex attribute to a uniform. Pack most built-in uniforms into a single vec4 array and update them all with a single glUniform call.
--HG--
branch : minor
2019-11-18 21:13:54 -04:00
Alex Szpakowski 37c579929b Add support for GLSL 4.30 and GLSL ES 3.10, via #pragma language glsl4.
macOS and iOS won't support glsl4 until a Metal backend is implemented.

--HG--
branch : minor
2019-11-16 14:33:48 -04:00
Alex Szpakowski c3be5c4682 Fix a crash when Canvas:newImageData is called and the width multiplied by the canvas format's pixel byte size is not a multiple of 4, for example a 3x3 r16f canvas (thanks Max!) 2019-11-12 21:27:46 -04:00
Alex Szpakowski 1e0a7cad67 Fix instanced vertex attributes. 2019-10-04 19:28:55 -03:00
Alex Szpakowski 5dfcf90e66 Fix Text:set(" ") not properly clearing the internal buffer (resolves issue #1518). 2019-10-01 19:02:16 -03:00
Alex Szpakowski ed537c4f6a lines can render more than 65k vertices (resolves issue #1356). 2019-09-28 18:34:56 -03:00
Alex Szpakowski 157282ec7e Fix a typo causing mesh attribute instancing to behave weirdly. 2019-09-28 00:31:44 -03:00
Alex Szpakowski f03b391245 Canvas:newImageData creates an ImageData with a pixel format that matches the canvas'. 2019-09-20 19:25:15 -03:00
Alex Szpakowski 58e26280c2 Fix detection for support of r16 and rg16 image formats on desktops. 2019-09-18 19:36:08 -03: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 89eb3c6236 Remove a static_assert that fails in some compilers 2019-08-25 17:16:58 -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
Bart van Strien 932068e777 Stop the attached Source when a Video gets destroyed
Before it would end up paused, but this means the audio playback thread will
still keep it alive. Since there are no other references, there is no way to
then free that Source anymore.
2019-08-11 15:34:00 +02:00
Alex Szpakowski 93fef5f144 Remove some dead code. 2019-07-17 18:57:14 -03:00
Alex Szpakowski 5c01289300 Fix love.graphics.getTextureTypes to return a table with boolean values instead of number values. 2019-07-13 21:58:01 -03:00
Alex Szpakowski 3c9662a9ce Fix a typo in the line smoothing code. I don't think it causes any visual change. 2019-06-28 12:40:41 -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 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