61 |
Paper bgPaper; |
Paper bgPaper; |
62 |
Paper bgHaloPaper; |
Paper bgHaloPaper; |
63 |
Paper noBgPaper; |
Paper noBgPaper; |
64 |
GL.Program fpDualBlur; |
Paper bgBlurPaper; |
65 |
|
GL.Program fpBlurDual; |
66 |
|
|
67 |
/** Return callgl code to bind this page's texture |
/** Return callgl code to bind this page's texture |
68 |
* to the given texunit. |
* to the given texunit. |
111 |
*/ |
*/ |
112 |
public static String setupHaloDualPass = null; |
public static String setupHaloDualPass = null; |
113 |
|
|
114 |
|
/** Set up code for being the extra pass with blurring. |
115 |
|
*/ |
116 |
|
public static String setupBlurDualPass = null; |
117 |
|
|
118 |
public static boolean withHalo = false; |
public static boolean withHalo = false; |
119 |
|
|
120 |
|
public static boolean withBlur = false; |
121 |
|
|
122 |
public static String teardown = null; |
public static String teardown = null; |
123 |
|
|
124 |
int paperSeed; |
int paperSeed; |
180 |
} |
} |
181 |
} |
} |
182 |
return bgHaloPaper; |
return bgHaloPaper; |
183 |
|
} else if (withBlur) { |
184 |
|
if (bgBlurPaper == null) { |
185 |
|
bgBlurPaper = (Paper)getBg().clone(); |
186 |
|
if(bgBlurPaper.getNPasses() == 1 && |
187 |
|
bgBlurPaper.getPass(0).getNTexGens() == 1) { |
188 |
|
// Draw text-haloed paper |
189 |
|
Paper.Pass pass = bgBlurPaper.getPass(0); |
190 |
|
pass.setNTexGens(2); |
191 |
|
pass.putNormalTexGen(1, getTexgen()); |
192 |
|
pass.setSetupcode( |
193 |
|
pass.getSetupcode() + |
194 |
|
setupBlurDualPass + |
195 |
|
getBindTexture(1)); |
196 |
|
pass.setTeardowncode(teardown + |
197 |
|
pass.getTeardowncode()); |
198 |
|
} else { |
199 |
|
// We don't have an optimized paper; |
200 |
|
// add a pass. |
201 |
|
addPaperPass(bgBlurPaper, setupExtraPass); |
202 |
|
// FIXME: add blur |
203 |
|
} |
204 |
|
} |
205 |
|
return bgBlurPaper; |
206 |
} else { |
} else { |
207 |
if(bgPaper == null) { |
if(bgPaper == null) { |
208 |
bgPaper = (Paper)getBg().clone(); |
bgPaper = (Paper)getBg().clone(); |