Revision d254d550
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/library/DistortedFramebuffer.java | ||
---|---|---|
249 | 249 |
/** |
250 | 250 |
* Draw the (texture,grid,effects) object to the Framebuffer. |
251 | 251 |
* <p> |
252 |
* Must be called from a thread holding OpenGL Context |
|
252 |
* Must be called from a thread holding OpenGL Context.
|
|
253 | 253 |
* |
254 | 254 |
* @param tex input Texture to use. |
255 | 255 |
* @param grid Class descendant from GridObject |
... | ... | |
271 | 271 |
/** |
272 | 272 |
* Draw the (framebuffer,grid,effects) object to the Framebuffer. |
273 | 273 |
* <p> |
274 |
* Must be called from a thread holding OpenGL Context |
|
274 |
* Must be called from a thread holding OpenGL Context.
|
|
275 | 275 |
* |
276 | 276 |
* @param fbo The Framebuffer whose COLOR attachment 0 will be used as input texture. |
277 | 277 |
* Please note that rendering from an FBO to itself is unsupported by OpenGL! |
... | ... | |
283 | 283 |
{ |
284 | 284 |
fbo.createFBO(); |
285 | 285 |
|
286 |
if( fbo.texIds[0]>=0 ) // we cannot (yet?) render to FBO created with the second constructor.
|
|
286 |
if( fbo.texIds[0]>=0 ) // we cannot (yet?) render from FBO created with the second constructor.
|
|
287 | 287 |
{ |
288 | 288 |
createFBO(); |
289 | 289 |
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboIds[0]); |
... | ... | |
298 | 298 |
/** |
299 | 299 |
* Draws the Tree, and all its children, to the Framebuffer. |
300 | 300 |
* <p> |
301 |
* Must be called from a thread holding OpenGL Context |
|
301 |
* Must be called from a thread holding OpenGL Context.
|
|
302 | 302 |
* |
303 | 303 |
* @param dt DistortedTree to render. |
304 | 304 |
* @param time Current time, in milliseconds. This will be passed to all the Effects stored in the Tree. |
Also available in: Unified diff
Comment!