Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[All platforms]: Using capture functions removes any objects created on that same frame #635

Open
pouwelsjochem opened this issue Oct 11, 2023 · 3 comments

Comments

@pouwelsjochem
Copy link
Contributor

Describe the bug
Since Solar2D 3691, using any display capture functionality removes display objects created on the same frame.
Running the code below results in 2 rectangles on Solar2D 3690, and just the white rectangle on 3691.

Screenshot 2023-10-11 at 14 31 30

Probably related to: #566

To Reproduce

local whiteRect = display.newRect(display.contentCenterX, display.contentCenterY, 20, 20)
whiteRect:setFillColor(1, 1, 1)

timer.performWithDelay(1, function()
   local redRect = display.newRect(display.contentCenterX, display.contentCenterY + 20, 20, 20)
   redRect:setFillColor(1, 0, 0)
   
   display.colorSample(14, 14, function() end)
end)
@elpida-v
Copy link

@pouwelsjochem I have tested your code on Solar2D 3691 and I am getting both white and red rectangles.

@pouwelsjochem
Copy link
Contributor Author

Interesting, what device did you test on? I'm on a M1 Mac

@elpida-v
Copy link

I am on M1 Mac Mini with Ventura 13.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants