You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,4 @@ We cannot directly render to processing's own texture because it's bound `GL_TEX
5
5
6
6
**Behind the hood :**
7
7
8
-
I create a framebuffer object and a custom texture object, which is bound to target `GL_TEXTURE_2D`, and attach this texture to the previously created framebuffer at `GL_COLOR_ATTACHMENT0`. I then render SurfaceTexture's shader output to this framebuffer and it atomatically gets rendered upon the custom texture I created. I then call `glReadPixels` and assign these read pixels to `PImage`'s pixel array.
9
-
10
-
For an alternative approach, please head over to pixel_manipulation branch.
8
+
I create a framebuffer object and a custom texture object, which is bound to target `GL_TEXTURE_2D`, and attach this texture to the previously created framebuffer at `GL_COLOR_ATTACHMENT0`. I then render SurfaceTexture's shader output to this framebuffer and it atomatically gets rendered upon the custom texture I created. I then follow the approach as being done in the Syphon library - https://github.com/Syphon/Processing/blob/master/Processing_2_0/src/codeanticode/syphon/SyphonClient.java#L271
0 commit comments