Revision 2386a081
Added by Leszek Koltunski almost 6 years ago
src/main/java/org/distorted/library/main/EffectQueuePostprocess.java | ||
---|---|---|
85 | 85 |
} |
86 | 86 |
|
87 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
88 |
// TODO (now only really works in case of 1 effect!) |
|
88 | 89 |
|
89 | 90 |
int getQuality() |
90 | 91 |
{ |
... | ... | |
92 | 93 |
} |
93 | 94 |
|
94 | 95 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
96 |
// TODO (now only really works in case of 1 effect!) |
|
95 | 97 |
|
96 |
int getInternalQuality() |
|
98 |
private int getInternalQuality()
|
|
97 | 99 |
{ |
98 | 100 |
return mNumEffects>0 ? ((PostprocessEffect)mEffects[0]).getInternalQuality() : 0; |
99 | 101 |
} |
100 | 102 |
|
103 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
104 |
|
|
105 |
int preprocess(DistortedOutputSurface[] buffers, DistortedNode node, long time) |
|
106 |
{ |
|
107 |
int numRenders = 0; |
|
108 |
int quality = getInternalQuality(); |
|
109 |
|
|
110 |
buffers[quality].setAsOutput(); |
|
111 |
|
|
112 |
numRenders += node.markStencilAndDepth(time,buffers[quality],this); |
|
113 |
|
|
114 |
return numRenders; |
|
115 |
} |
|
116 |
|
|
101 | 117 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
102 | 118 |
|
103 | 119 |
int postprocess(DistortedOutputSurface[] buffers) |
Also available in: Unified diff
1. Hide internalQuality inside Postprocess effects.
2. First step to turn markStencilAndDepth into a more generic Postprocessing 'preprocess'.