Revision dedacd82
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedFramebufferList.java | ||
---|---|---|
23 | 23 |
import java.util.Iterator; |
24 | 24 |
|
25 | 25 |
/** |
26 |
* List of all DistortedRenderTarget objects currently created by the application.
|
|
26 |
* List of all DistortedFramebuffer objects currently created by the application.
|
|
27 | 27 |
* |
28 |
* The point: we need to be able ot mark RenderTargets for deletion, and delete all marked |
|
29 |
* objects later at a convenient time. Thus we keep all of them in a LinkedList here. |
|
28 |
* The point: we need to be able to mark Framebuffers for deletion, and delete all marked |
|
29 |
* objects later at a convenient time (that's because we can only delete from a thread that |
|
30 |
* holds the OpenGL context so here we provide a framework where one is able to mark for deletion |
|
31 |
* at any place and actual deletion takes place on the next render). |
|
30 | 32 |
*/ |
31 | 33 |
|
32 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
50 | 52 |
mMarked = true; |
51 | 53 |
} |
52 | 54 |
|
55 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
56 |
|
|
57 |
static synchronized void release() |
|
58 |
{ |
|
59 |
mMarked = false; |
|
60 |
mList.clear(); |
|
61 |
} |
|
62 |
|
|
53 | 63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
54 | 64 |
// must be called form a thread holding OpenGL Context |
55 | 65 |
|
Also available in: Unified diff
Javadoc