|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gzz.gfx.gl.MipzipMemoryConsumer
An adapter between MipzipLoader and MemoryConsumer.
Field Summary | |
static boolean |
dbg
|
Constructor Summary | |
MipzipMemoryConsumer(gzz.mem.MemoryPartitioner pool,
MipzipLoader mipzip)
|
Method Summary | |
int |
getMaxBytes(float quality)
The maximum number of bytes this object would like to consume. |
float |
getQuality()
Get the quality currently used. |
int |
getReservation()
Get the number of bytes currently used. |
boolean |
getScalable()
Whether this object can make use of byte amounts less than getMaxBytes() returns. |
GL.Texture |
getTexture(float importance,
float quality)
The public API: ask for the texture at given importance and quality. |
void |
loadToBaseLevelSynch(int level)
|
int |
setReservation(float priority,
int bytes,
float quality,
Obs o)
Set the amount of memory this object is allowed to consume. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean dbg
Constructor Detail |
public MipzipMemoryConsumer(gzz.mem.MemoryPartitioner pool, MipzipLoader mipzip)
Method Detail |
public boolean getScalable()
gzz.mem.MemoryConsumer
getScalable
in interface gzz.mem.MemoryConsumer
public int getMaxBytes(float quality)
gzz.mem.MemoryConsumer
getMaxBytes
in interface gzz.mem.MemoryConsumer
quality
- The quality at which the maximum bytes are requested.public int setReservation(float priority, int bytes, float quality, Obs o)
gzz.mem.MemoryConsumer
This method may only be called by MemoryPartitioner
.
setReservation
in interface gzz.mem.MemoryConsumer
priority
- The priority to use for scheduling
this operation.bytes
- The maximum amount of bytes this object should reserve.quality
- Maximum quality that should be loaded (if quality is
adjusted in discrete steps, the class may round upwards).o
- Observer to call (if non-null) when size has been adjusted
public void loadToBaseLevelSynch(int level)
public int getReservation()
gzz.mem.MemoryConsumer
getReservation
in interface gzz.mem.MemoryConsumer
public float getQuality()
gzz.mem.MemoryConsumer
getQuality
in interface gzz.mem.MemoryConsumer
public GL.Texture getTexture(float importance, float quality)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |