corona
corona copied to clipboard
Mac Simulator: TextureResource Canvas rendering problem on MacBook Pro 2017 & 2018
- [ ] I tried searching Solar2D forums for the solution.
Describe the bug TextureResource Canvas rendering problem on MacBook Pro 2017 & 2018.
To Reproduce Steps to reproduce the behavior:
local tex = graphics.newTexture( { type="canvas", width=128, height=128 } )
local rect = display.newImageRect(
tex.filename,
tex.baseDir,
display.contentWidth,
display.contentHeight
)
rect.x = display.contentCenterX
rect.y = display.contentCenterY
local circ = display.newCircle( 0, 0, 64 )
circ:setFillColor( { type="gradient", color1={0,0.2,1}, color2={0.8,0.8,0.8}, direction="down" } )
tex:draw( circ )
tex:invalidate()
Run the code with Corona Simulator on MacBook Pro 2017 or 2018, and the result will be:
but the correct result should be:
Target platform and where build was made:
- Device: MacBook Pro 2017 & 2018.
- OS: macOS Big Sur
Additional context This problem only occurs on the simulator. If I build & run it with Xcode iPhone simulator, the problem will not occur.
more info: https://forums.solar2d.com/t/textureresourcecanvas-rendering-problem/353274/4
Is it possible to use metal instead of OpenGL in the simulator to avoid this problem?
Using metal on macOS is ongoing project, which has high priority. It should fix this.
I have a 2018 MacBookPro and when using three TextureResource Canvases am getting a hard crash that shuts my mac down. Drawing to one is fine, but drawing to a second in the same frame causes flickering and glitches, and if left for too long the computer hard resets.
I was noticing Solar2D shutdown with the message starting GPU Hang in some cases before this.