Revision 3c8b1903
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java | ||
---|---|---|
68 | 68 |
|
69 | 69 |
mScreenW = 9*LEAF_SIZE; |
70 | 70 |
mScreenH = 9*LEAF_SIZE; |
71 |
|
|
72 | 71 |
mScreen = new DistortedObjectTree(new DistortedTexture(mScreenW,mScreenH), queue, grid); |
73 | 72 |
|
74 | 73 |
Dynamic1D rot = new Dynamic1D(5000,0.0f); |
... | ... | |
87 | 86 |
|
88 | 87 |
for(int i=0; i<NUM_CIRCLES; i++) |
89 | 88 |
{ |
90 |
if( i==0 )
|
|
89 |
if( i<=1 )
|
|
91 | 90 |
{ |
92 | 91 |
queue = new DistortedEffectQueues(); |
93 | 92 |
mCircleNode[i] = new DistortedObjectTree(new DistortedTexture(3*LEAF_SIZE,3*LEAF_SIZE), queue, grid); |
94 | 93 |
|
95 |
for(int j=0; j<NUM_LEAVES; j++) |
|
94 |
for(int j=0; j<NUM_LEAVES-i; j++)
|
|
96 | 95 |
{ |
97 | 96 |
queue = new DistortedEffectQueues(); |
98 | 97 |
mCircleNode[i].attach(mLeaf, queue, grid); |
... | ... | |
104 | 103 |
{ |
105 | 104 |
mCircleNode[i] = new DistortedObjectTree(mCircleNode[0], Distorted.CLONE_BITMAP|Distorted.CLONE_CHILDREN); |
106 | 105 |
} |
107 |
|
|
106 |
|
|
108 | 107 |
mScreen.attach(mCircleNode[i]); |
109 | 108 |
queue = mCircleNode[i].getQueues(); |
110 | 109 |
queue.move( new Static3D(positions[2*i], positions[2*i+1], 0) ); |
Also available in: Unified diff
Major restructuring with DistortedTexture. One now is able to create Textures anywhere, even from a thread which does not hold the OpenGL context. Same for DistortedFramebuffers.