-
Notifications
You must be signed in to change notification settings - Fork 120
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
p5/ Skia in Pycharm rendering just a black screen #424
Comments
Thank you for submitting your first issue to p5py |
You are calling background(0) at the end, which basically means to set everything to black. Move this to the top in draw() |
Thank you for taking time to help with my issue. I really look forward to this application in python. That is originally how I had it. However that doesn't work If I just try drawing a white BG it doesn't render it. Size of canvas does change if I change size param. from p5 import * def setup(): def draw(): run(renderer="skia") |
Resolved by using run(renderer='skia') instead of run(renderer="skia") |
@tushar5526 Can you reopen this issue? Because I've just run into the same problem of getting a black screen with skia. example code: from p5 import *
def setup():
size(640, 640)
no_stroke()
def draw():
background(128)
fill(255)
circle((width/2, height/2), 256)
run(renderer='skia') P5 runs in a virtual environment with all the packages installed that come with the P5 library. (The size disparity in window sizes seems to be a scaling issue from Windows; I dragged the P5 window onto my second monitor to take the screenshot.) Is there something obvious I'm missing or is this maybe a bug in P5 related to skia? |
Hey, this is fixed by #420. Try installing git from github directly, a new release is not made yet. |
Thanks for the quick answer. I tried |
Possibly related to #425 Can you try removing |
Yes, this seems to work indeed. Interesting bug. |
#399 is the cause majorly |
So is it not possible to have a different size canvas with the skia renderer currently? |
It is possible - You can set the size in draw() when frame_rate == 1. I have not got the chance to work on the fix yet. |
Hey folks, I finally sat down to put out a fix for this. It should be solved now by #446. The weird behaviour is majorly due to the swapping of buffers. Tested it on my local and seems to be working fine. Closing the issue now :) |
Can confirm that it works on my side 👍 |
New to Github, p5, sorry if I missed something
Describe the bug
trying to use skia as the renderer however it is not drawing I added background to end of draw to circumvent bug putting it in setup. Works properly in visper but not skia see screenshots for reference.
To Reproduce
from p5 import *
circlex = 200
def setup():
size(400, 300)
def draw():
global circlex
no_stroke()
fill(255)
circle(circlex, 150, 24)
background(0)
run(renderer="skia")
Expected behavior
White circle drawn at 200, 150
Screenshots
System information:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: