Commit Graph

81 Commits

Author SHA1 Message Date
Sasha Szpakowski e1494d4ad2 revert to previous names for a couple graphics enums 2024-10-03 12:42:11 -03:00
Sasha Szpakowski 61e58bb361 add tests for no depth or stencil in the window. 2024-09-28 18:23:40 -03:00
Sasha Szpakowski 50ff1e4d2b use location numbers for vertex input attributes, instead of name-based binding.
- add 'location' named field to buffer and mesh vertex format tables, replaces 'name' field.
- location numbers are expected to match 'layout (location = #)' qualifiers in vertex inputs in shader code.
- deprecate vertex inputs in shader code that don't have layout location qualifiers.
- love's default vertex attributes use location 0 for position, 1 for texcoord, and 2 for color.
- add new variants of Mesh:attachAttribute, setAttributeEnabled, and isAttributeEnabled which take location numbers instead of names.

Improves draw performance in vulkan and metal backends.
2024-09-07 18:06:03 -03:00
Sasha Szpakowski 54a31ec615 Minimum required opengl version is now OpenGL 3.3 / OpenGL ES 3.0. 2024-06-19 18:08:09 -03:00
Sasha Szpakowski 8cba8ce292 tests: remove macOS-specific audio codepath
It's not needed now that OpenAL Soft has been updated on macOS
2024-04-26 20:11:10 -03:00
Sasha Szpakowski 8f8260afa5 add a test for auto-generated canvas mipmaps 2024-04-14 11:29:46 -03:00
Sasha Szpakowski c5feaa3dfa Fix missing depth formats in love.graphics.getTextureFormats. 2024-04-13 17:06:06 -03:00
Sasha Szpakowski e1cad5500f fix test... 2024-04-12 18:08:20 -03:00
Sasha Szpakowski b547321179 tests: use a better-supported canvas format for IO test, and turn off blending 2024-04-12 18:02:43 -03:00
Sasha Szpakowski 93c26ed25a add a graphics test for some shader IO variables 2024-04-12 17:31:21 -03:00
Sasha Szpakowski 994079e76d Mesh:getVertexFormat uses named fields, to match the new format syntax in newMesh. 2024-04-08 12:20:07 -03:00
Sasha Szpakowski e11ab50965 tests: fix a missing love.graphics.pop 2024-04-07 15:14:59 -03:00
Sasha Szpakowski 9b3eff1f62 tests: update Shader:send tests to try sending a non-array struct field. 2024-04-06 09:46:05 -03:00
Sasha Szpakowski dc945d757a tests: add a graphics test for uniform vec3 array alignment 2024-04-01 23:01:00 -03:00
Sasha Szpakowski c37257c173 tests: apply the same anisotropy fix to Image tests 2024-03-31 10:11:17 -03:00
Sasha Szpakowski 72f7a36588 tests: canvas:setFilter test doesn't fail if the system doesn't support anisotropic filtering. 2024-03-31 10:09:59 -03:00
Sasha Szpakowski 112270ba19 tests: fix pixel coordinate test using too low precision in opengl es 2024-03-23 00:19:47 -03:00
Sasha Szpakowski 339c1acde8 Merge pull request #2043 from ellraiser/main
testsuite updates
2024-03-22 22:02:35 -03:00
Sasha Szpakowski f1d350703a tests: another attempt at fixing the shader pixel coordinate test 2024-03-22 19:55:17 -03:00
ell 24d84418c7 testsuite updates
- added some additional checks to check for lua version/jit enabled for use with other repos (namely love potion)
- updated HTML report CSS to group each image compare and fix pixel rendering
- fixed not showing image checks for the 4th compareImg or more in a given test method
- fixed pixel tolerance usage crashing when looking at images on the boundary
- fixed compare img not checking the first 2 rows of pixels on the x + y
-graphic tests that fail will now show a third "difference" image to help identify what isn't matching up
2024-03-22 12:17:15 +00:00
Sasha Szpakowski 6bd08f1d93 attempt to fix graphics tests on CI 2024-03-21 22:46:42 -03:00
Sasha Szpakowski 36aa55fb84 tests: add graphics tests for y direction in canvases 2024-03-21 22:10:24 -03:00
Sasha Szpakowski 6002a03761 tests: add a test to make sure the front face is correct 2024-03-21 18:12:44 -03:00
ell 71f379e268 update isOS method 2024-03-20 09:49:18 +00:00
ell 7f4adc0ffe small update
changed tests so that all assert failures are logged rather than just the first assert that failed, added isOS() to the test method class to be used in tests directly, updated test readme on a couple bits and added newTexture basic check
2024-03-19 18:05:06 +00:00
Sasha Szpakowski 89f43ff48d tests: compare screenshot test output to a reference image, on desktops. 2024-03-16 23:11:14 -03:00
Miku AuahDark 6f86c195bc Test: Remove leftover love.sensor.getData calls when testing love.sensor.getName. 2024-03-16 20:47:17 +08:00
Miku AuahDark 50295fdb8a Test: Add tests for love.sensors. 2024-03-16 15:11:21 +08:00
Sasha Szpakowski 99af5765fc tests: don't skip love.graphics.isActive test on vulkan 2024-03-07 21:00:45 -04:00
ellraiser ea215ad31c Merge branch 'love2d:main' into main 2024-03-06 09:19:02 +00:00
ell 81599fed93 small update
- removed assertPixels()
- added exportImg() to help graphics test writing (sets the "expected" image for the test)
- added "deflate" variants to love.data.compress()
2024-03-06 09:18:44 +00:00
Sasha Szpakowski 026e9f164a tests: add a few more shader uniform tests 2024-03-05 21:01:05 -04:00
ell 23bd9110dd add callback variant for love.graphics.captureScreenshot 2024-02-29 09:54:49 +00:00
ell 3dfa13e60c requested changes 2024-02-29 09:20:18 +00:00
ell 7cc3816bec finish physics module coverage
- love.physics.World:rayCastAny()
- love.physics.World:rayCastClosest()
- love.physics.World:getShapesInArea()
- love.physics.Body:getShapes()
- love.physics.Body:getShape()
- love.physics.Body:hasCustomMassData()
2024-02-28 18:38:43 +00:00
ell 990259edf9 more tests
- added custom error handler so that love is closed if a crash occurs rather than hang on the graphic screen (for runner crashes mainly)

- updated missing functions left todo in todo.md and removed list from readme.md to make it easier to keep track of

- added love.audio.getPlaybackDevice(), love.audio.getPlaybackDevices(), love.audio.setPlaybackDevice()

- added love.data.ByteData:setString()

- added love.filesystem.getFullCommonPath(), love.filesystem.mountFullPath(), love.filesystem.unmountFullPath(), love.filesystem.moundCommonPath(), plus optional b/t/bt params to love.filesystem.load()

- added love.keyboard.isModifierActive()

- added love.sound.SoundData:copy() and love.sound.SoundData:slice()

- added love.graphics.Texture:isCanvas() and love.graphics.Texture:isComputeWritable()

- added love.image.ImageData:isLinear(), love.image.ImageData:setLinear(), and love.image.ImageData:encode("*.exr")

- added love.image.CompressedImageData:isLinear() and love.image.CompressedImageData:setLinear()

- added love.system.getPreferredLocales()

- added love.window.focus() and removed love.window.close() (now deprecated)
2024-02-28 17:49:51 +00:00
Sasha Szpakowski ff06718f8a opengl: only populate Shader:getWarnings string when there are warnings. 2024-02-27 23:17:24 -04:00
Sasha Szpakowski 57fab45c2c tests: draw points at the center instead of corner of pixels. 2024-02-27 22:54:37 -04:00
EngineerSmith f00a86dc9f Added change to changes.txt 2024-02-09 01:15:45 +00:00
EngineerSmith 666fd88631 Altered tests to account for additional container argument in love.data.hash 2024-02-09 00:55:57 +00:00
Sasha Szpakowski 9b5851e039 Move current love.graphics.setStencilMode functionality to setStencilState.
Add new higher level love.graphics.setStencilMode function.
- Add love.graphics.setStencilMode(mode [, value = 1])
- Add love.graphics.setStencilMode().
- Add mode, value = love.graphics.getStencilMode().

The possible modes are "off" (same as no parameters), "draw", and "test".
The "draw" mode disables color writes and sets the stencil state to ("replace", "always") using the given value.
The "test" mode enables color writes and sets the stencil state to ("keep", "equal") using the given value to compare to.
2024-01-04 16:23:49 -04:00
Sasha Szpakowski d7e0856dc6 tests: add basic graphics Buffer tests.
issue #1986
2023-12-31 16:06:45 -04:00
Sasha Szpakowski dbcdbc47d5 Add debugname field to shader options table. 2023-12-29 16:51:24 +01:00
Sasha Szpakowski cb4cb80595 tests: fix love.math.randomNormal test consistency
also test exact values to make sure the tests cover algorithm changes
2023-12-23 23:07:31 +01:00
Sasha Szpakowski 0be5a214dd tests: remove invalid parameter in readbackTexture calls. 2023-12-14 18:39:22 -04:00
Sasha Szpakowski cb24af7cc2 tests: add texture debug name check 2023-12-13 21:47:42 -04:00
Sasha Szpakowski b7e576efa8 tests: add some tolerance to video rewind test
It happens while the video is still playing, so the tell() query after the rewind isn't guaranteed to be 0.
2023-12-13 21:05:12 -04:00
Sasha Szpakowski a6ae0ae10d tests: more tolerance for sleep overshooting its time
CI machines can take a while doing some other thing during a sleep.
2023-12-12 20:16:51 -04:00
Sasha Szpakowski e6af895b01 tests: video play/pause time test waits for less time 2023-12-12 19:55:38 -04:00
Sasha Szpakowski 1f38b77bab tests: sleep for a shorter time in getTime test 2023-12-12 19:53:38 -04:00