Revision b6a5d557
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedEffectQueues.java | ||
---|---|---|
154 | 154 |
* Copy constructor. |
155 | 155 |
* <p> |
156 | 156 |
* Whatever we do not clone gets created just like in the default constructor. |
157 |
* We only call this from the descendant's classes' constructors where we have to pay attention |
|
158 |
* to give it the appropriate type of a DistortedObject! |
|
159 | 157 |
* |
160 | 158 |
* @param dc Source object to create our object from |
161 | 159 |
* @param flags A bitmask of values specifying what to copy. |
... | ... | |
169 | 167 |
|
170 | 168 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
171 | 169 |
/** |
172 |
* Draw the DistortedObject to the location specified by current Matrix effects. |
|
173 |
* <p> |
|
174 |
* Must be called from a thread holding OpenGL Context |
|
175 |
* |
|
176 |
* @param currTime current time, in milliseconds. |
|
177 |
* This gets passed on to Dynamics inside the Effects that are currently applied to the |
|
178 |
* Object. |
|
179 |
*/ |
|
180 |
public void draw(long currTime, DistortedTexture tex, GridObject grid) |
|
181 |
{ |
|
182 |
tex.createTexture(); |
|
183 |
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0); |
|
184 |
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, tex.mTextureDataH[0]); |
|
185 |
drawPriv(currTime, tex, grid, Distorted.mFramebuffer); |
|
186 |
DistortedFramebuffer.deleteAllMarked(); |
|
187 |
DistortedTexture.deleteAllMarked(); |
|
188 |
} |
|
189 |
|
|
190 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
191 |
/** |
|
192 |
* Draw the DistortedObject to the Framebuffer passed. |
|
170 |
* Draw the (texture,grid) object to the Framebuffer passed. |
|
193 | 171 |
* <p> |
194 | 172 |
* Must be called from a thread holding OpenGL Context |
195 | 173 |
* |
Also available in: Unified diff
Change in the API: we always have to create a DistortedFramebuffer to render to.