Search in sources :

Example 6 with Application

use of com.badlogic.gdx.Application in project libgdx by libgdx.

the class Texture method getManagedStatus.

public static String getManagedStatus() {
    StringBuilder builder = new StringBuilder();
    builder.append("Managed textures/app: { ");
    for (Application app : managedTextures.keySet()) {
        builder.append(managedTextures.get(app).size);
        builder.append(" ");
    }
    builder.append("}");
    return builder.toString();
}
Also used : Application(com.badlogic.gdx.Application)

Example 7 with Application

use of com.badlogic.gdx.Application in project libgdx by libgdx.

the class GLFrameBuffer method getManagedStatus.

public static StringBuilder getManagedStatus(final StringBuilder builder) {
    builder.append("Managed buffers/app: { ");
    for (Application app : buffers.keySet()) {
        builder.append(buffers.get(app).size);
        builder.append(" ");
    }
    builder.append("}");
    return builder;
}
Also used : Application(com.badlogic.gdx.Application)

Example 8 with Application

use of com.badlogic.gdx.Application in project commons-gdx by gemserk.

the class GpuMemUtils method getTextures.

private static List<Texture> getTextures() throws NoSuchFieldException, IllegalAccessException {
    Field managedTexturesField = Texture.class.getDeclaredField("managedTextures");
    managedTexturesField.setAccessible(true);
    Map<Application, List<Texture>> managedTexturesPerApp = (Map<Application, List<Texture>>) managedTexturesField.get(null);
    List<Texture> managedTextures = managedTexturesPerApp.get(Gdx.app);
    return managedTextures;
}
Also used : Field(java.lang.reflect.Field) List(java.util.List) ArrayList(java.util.ArrayList) Application(com.badlogic.gdx.Application) Map(java.util.Map) ObjectMap(com.badlogic.gdx.utils.ObjectMap) Texture(com.badlogic.gdx.graphics.Texture)

Aggregations

Application (com.badlogic.gdx.Application)8 ApplicationType (com.badlogic.gdx.Application.ApplicationType)1 LifecycleListener (com.badlogic.gdx.LifecycleListener)1 Texture (com.badlogic.gdx.graphics.Texture)1 GdxRuntimeException (com.badlogic.gdx.utils.GdxRuntimeException)1 ObjectMap (com.badlogic.gdx.utils.ObjectMap)1 Field (java.lang.reflect.Field)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Map (java.util.Map)1