We are about to switch to a new forum software. Until then we have removed the registration on this forum.
All the examples for framebuffers uses opengl... Are there any examples available on how to use Framebuffer or any other way to render to texture using the current version of processing or compatible libraries. Thanks in advance processing gurus!
Answers
Just mebe u should place
shape( shapeSphere );
after the endDraw()? :-/@GoToLoop - Thanks for your input... Explain your rationale, if I put the shape out then it wont be rendered to the buffer... The code sorta works however i have the following unrelated gripes: 1) Is the performance good to be called per frame ?(Ok while tested... however only one shpere is rendered) 2) Rendering is becomes funny when switching from different types of shaders eg Light, Texlight and so on even if you declare a shader texlight and dont use the light... light gets somewhat calculated.... however if you use an unlit type of shaders Processing AUTOMAGICALLY forces to the default shader...!!!
Notice that I have to reverse the background color as a hack to try to get the desired effect... Because of the directional light of the scene is located on the center of the sun the light iluminates the BACK of the faces hence rendering them as shadows EVEN THOUGH I DONT USE LIGHT TO RENDER THE SUN...
I confess I dunno much about PShape! What I know is that we gotta specify which PGraphics to issue a drawing command.
So,
shape(shapeSphere);
renders in the Processing's own canvas rather than a specific PGraphics!@GoToLoop - Rendering the geometry between the PGraphics.beginDraw()/EndDraw only renders to the PGraphics and not to processing own canvas...