Revision a0f644b7
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedEffects.java | ||
---|---|---|
165 | 165 |
initializeEffectLists(dc,flags); |
166 | 166 |
} |
167 | 167 |
|
168 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
169 |
/** |
|
170 |
* Draw the (texture,grid) object to the Framebuffer passed. |
|
171 |
* <p> |
|
172 |
* Must be called from a thread holding OpenGL Context |
|
173 |
* |
|
174 |
* @param currTime Current time, in milliseconds. |
|
175 |
* @param df Framebuffer to render this to. |
|
176 |
*/ |
|
177 |
public void draw(long currTime, DistortedTexture tex, GridObject grid, DistortedFramebuffer df) |
|
178 |
{ |
|
179 |
tex.createTexture(); |
|
180 |
df.createFBO(); |
|
181 |
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, df.fboIds[0]); |
|
182 |
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, tex.mTextureDataH[0]); |
|
183 |
drawPriv(currTime, tex, grid, df); |
|
184 |
DistortedFramebuffer.deleteAllMarked(); |
|
185 |
DistortedTexture.deleteAllMarked(); |
|
186 |
} |
|
187 |
|
|
188 | 168 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
189 | 169 |
/** |
190 | 170 |
* Releases all resources. After this call, the queue should not be used anymore. |
Also available in: Unified diff
Again change of API. Now instead of the 'DistortedEffects.draw() and DistortedTree.draw()' we have 'DistortedFramebuffer.renderTo()'