Commit Graph

56 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 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 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 f1d350703a tests: another attempt at fixing the shader pixel coordinate test 2024-03-22 19:55:17 -03: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
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 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
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 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 e6af895b01 tests: video play/pause time test waits for less time 2023-12-12 19:55:38 -04:00
ell 6a2ba9322e tweaks for hardware tests 2023-12-05 10:26:24 +00:00
ell f846d4ab91 review changes
- spaced out object class tests and added more defined comment groups

- changed reusing vars in case it causes unexpected asserts in future

- fixed some shape:point test having wrong params

- added assertTrue + assertFalse for basic checks

- used assertRange more for some of the physics + audio tests
2023-11-23 12:52:54 +00:00
ell 825e46621e finished obj tests
- added physics.Contact, physics.Body, and physics.Shape obj tests
- added graphics.Mesh and graphics.ParticleSystem obj tests
- fixed some rgba tolerance needed on a couple methods
- added test conclusion to zip artifact name for quick checking on PRs
- ignored testsuite on compat mode windows builds
2023-11-20 20:05:30 +00:00
ell 89119c554a add runner exceptions to readme 2023-11-17 12:19:56 +00:00
ell a8c714bc89 change to exact rgba comparison for visual tests 2023-11-17 00:11:32 +00:00
ell d1307584e5 add graphics pixel comparison tests
- added an automatic check for expected vs actual with the images already shown in the report - used a 1px tolerance for now for each of the pixels checked
2023-11-16 23:28:50 +00:00
ell 37961f92d6 floor joint pos 2023-11-16 22:09:31 +00:00
ell 8124804d49 more graphics + some physics tests
- added obj tests for graphics.SpriteBatch, and graphics.Video
- added obj tests for physics.World
- added test for setStencilMode and removed deprecated stencil+setStencilTest
- added graphics.drawInstanced
- fixed deprecated physic shape calls (body now added as first param)
2023-11-16 19:22:40 +00:00
ell 1323bb1452 ignore setMipmapFilter on opengl ES 2023-11-15 20:34:34 +00:00
ell 0ef417f60c fix test.graphics.Canvas 2023-11-15 19:54:14 +00:00
ell 038b36a67d add renderer to report md 2023-11-15 19:52:17 +00:00
ell ad44eb4fd7 more graphics class tests
- added graphics.Canvas, graphics.Font, graphics.Image, graphics.Quad, graphics.Shader and graphics.Text
- removed rogue resource img
- removed event wait test placeholder
- updated todo list
2023-11-15 19:32:39 +00:00
ell 137126656a update ci run 2023-11-14 13:00:09 +00:00
ell 658c75b5c3 latest from love-test 2023-11-14 09:47:36 +00:00