92 |
*/ |
*/ |
93 |
public final float origWidth, origHeight; |
public final float origWidth, origHeight; |
94 |
|
|
95 |
|
private String filterSettings; |
96 |
|
|
97 |
|
/** Set the callgl string for filtering the texture. |
98 |
|
* The texture should be assumed to be loaded to TEXTURE_2D already. |
99 |
|
*/ |
100 |
|
public void setFilterSettings(String s) { |
101 |
|
filterSettings = s; |
102 |
|
reFilter(); |
103 |
|
} |
104 |
|
|
105 |
/** Open (if not already open) and return the ZipFile. |
/** Open (if not already open) and return the ZipFile. |
106 |
*/ |
*/ |
107 |
synchronized private ZipFile getZipFile() throws IOException { |
synchronized private ZipFile getZipFile() throws IOException { |
261 |
levels[j].wasDiscarded(); |
levels[j].wasDiscarded(); |
262 |
GLUtil.reloadCompressed(tex, |
GLUtil.reloadCompressed(tex, |
263 |
currentBaseLevel, levels.length); |
currentBaseLevel, levels.length); |
264 |
|
reFilter(); |
265 |
} |
} |
266 |
for(int i=currentBaseLevel; i<levels.length; i++) { |
for(int i=currentBaseLevel; i<levels.length; i++) { |
267 |
levels[i].loadData(); |
levels[i].loadData(); |
362 |
|
|
363 |
GLUtil.reloadCompressed(tex, |
GLUtil.reloadCompressed(tex, |
364 |
goalBaseLevel, levels.length); |
goalBaseLevel, levels.length); |
365 |
|
reFilter(); |
366 |
if(currentBaseLevel < goalBaseLevel) |
if(currentBaseLevel < goalBaseLevel) |
367 |
setBaseLevel(goalBaseLevel); |
setBaseLevel(goalBaseLevel); |
368 |
else |
else |
406 |
return tex; |
return tex; |
407 |
} |
} |
408 |
|
|
409 |
|
/** CallGL to set the texture filters right. |
410 |
|
*/ |
411 |
|
private void reFilter() { |
412 |
|
GL.call("BindTexture TEXTURE_2D "+tex.getTexId()+"\n"+ |
413 |
|
filterSettings+"\n"+ |
414 |
|
"BindTexture TEXTURE_2D 0\n"); |
415 |
|
} |
416 |
|
|
417 |
/** Get the amount of memory currently used. |
/** Get the amount of memory currently used. |
418 |
* @return Memory, in bytes |
* @return Memory, in bytes |
419 |
*/ |
*/ |