Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
I tried to isolate the problem, but if I get rid of the PGraphics for example the bug seems to disappear.
If I run the below script I get:

importprocessing.video.*; PGraphicsbig; PGraphicssmall; booleanfrom_big_pg = true; Moviemovie; voidsetup(){size(320, 180, P2D); movie = newMovie(this, "big.mp4"); movie.loop(); big = createGraphics(1280, 720, P2D); small = createGraphics(32, 18, P2D)} //void movieEvent(Movie m){// m.read();//}voiddraw(){if (movie.available()){movie.read()} // only works with `void movieEvent(Movie m)`// and not with `if (movie.available())` (it stays grey)gl_texture(movie).usingMipmaps(true, 3); gl_texture(big).usingMipmaps(true, 3); gl_texture(small).usingMipmaps(true, 3); big.beginDraw(); big.image(movie, 0, 0, big.width, big.height); big.endDraw(); small.beginDraw(); small.image(from_big_pg ? big : movie, 0, 0, small.width, small.height); small.endDraw(); image(small, 0, 0, 320, 180)} publicTexturegl_texture(PImageimg){return ((PGraphicsOpenGL)g).getTexture(img)}If I comment out the following: (which is not what I want):
gl_texture(movie).usingMipmaps(true, 3); gl_texture(big).usingMipmaps(true, 3); gl_texture(small).usingMipmaps(true, 3);Then it works again:

Now the interesting part:
If I use:
voidmovieEvent(Moviem){m.read()}Instead of:
if (movie.available()){movie.read()}Then the usingMipmaps part works...
(Also if the usingMipmaps is before if (movie.available()){ then there is a nullpointerException).
The video file:
https://github.com/processing/processing-video/assets/738650/f7a6ba31-b697-49fb-aeac-110823d0453d
Metadata
Metadata
Assignees
Labels
No labels