Revision 09ab7524
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedOutputSurface.java | ||
---|---|---|
43 | 43 |
|
44 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
45 | 45 |
|
46 |
DistortedOutputSurface(int width, int height, int createColor, int createDepth, int fbo, boolean system)
|
|
46 |
DistortedOutputSurface(int width, int height, int createColor, int createDepth, int fbo, int type)
|
|
47 | 47 |
{ |
48 |
super(width,height,createColor,system);
|
|
48 |
super(width,height,createColor,type);
|
|
49 | 49 |
|
50 | 50 |
mProjectionMatrix = new float[16]; |
51 | 51 |
|
... | ... | |
114 | 114 |
mRender++; |
115 | 115 |
|
116 | 116 |
// change tree topology (attach and detach children) |
117 |
// create and delete all underlying OpenGL resources |
|
118 |
// Watch out: FIRST change topology, only then deal |
|
119 |
// with OpenGL resources. That's because changing Tree |
|
120 |
// can result in additional Framebuffers that would need |
|
121 |
// to be created immediately, before the calls to drawRecursive() |
|
122 |
|
|
123 | 117 |
boolean changed = DistortedAttachDaemon.toDo(); |
124 | 118 |
|
119 |
// if some changes have been made, we need to rebuilt our tree-isomorphism data structures. |
|
125 | 120 |
if( changed ) |
126 | 121 |
{ |
127 | 122 |
for(int i=0; i<mNumChildren; i++) |
... | ... | |
133 | 128 |
DistortedNode.debugMap(); |
134 | 129 |
} |
135 | 130 |
|
131 |
// create and delete all underlying OpenGL resources |
|
132 |
// Watch out: FIRST change topology, only then deal |
|
133 |
// with OpenGL resources. That's because changing Tree |
|
134 |
// can result in additional Framebuffers that would need |
|
135 |
// to be created immediately, before the calls to drawRecursive() |
|
136 | 136 |
toDo(); |
137 | 137 |
|
138 | 138 |
if( changed ) |
Also available in: Unified diff
Introduce 3 types of Surfaces: System, Tree, User