-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Can't capture webcam pixel when switch to P3D, everything turns black #207
Comments
Not fixed with video library 2.2.2 |
I just tested and can also confirm the bug on Windows 11 with the latest Processing & Processing Video lib |
try to add this in draw(). I tested video library in P2D, P3D mode, there are some problems with getting pixels.(and found workaround)
add image()
I guess problem is in Capture.java(and Movie.java)
add updatePixels()
Processing 4.1.1 / Video library 2.2.2 / MacBook Pro m1 |
Thanks jaegonlee! Nice work. |
Update: This does not work with
to import processing.opengl.PGraphicsOpenGL;
...
Object cache = ((PGraphicsOpenGL)(parent.g)).getTexture(Capture.this); or Object cache = null;
try {
Method m = parent.g.getClass().getMethod("getTexture", new Class[] { PImage.class });
cache = m.invoke(parent.g, new Object[] { Capture.this });
}
catch (Exception e) {
e.printStackTrace();
} |
Related to #203 |
Hi, I encountered this in Processing video. I was following an old tutorial about 2018 step by step. The instructor had not encountered the same issue. Everything works fine on their end.
Everthing works fine in 2D, size(800,600); while drawing rectangles using webcam pixels to fill the color
when use size(800,600,P3D), to draw boxes, everything turns black, looks like it cannot catch the correct pixel[] in P3D.
here is the code
The text was updated successfully, but these errors were encountered: