APISonar


com.badlogic.gdx.Gdx.app.log

> com > badlogic > gdx > Gdx > app > log
com APIs badlogic APIs gdx APIs Gdx APIs app APIs log APIs

Example 1
public void create () {
		Timer timer = new Timer();
		Task task = timer.scheduleTask(new Task() {
			@Override
			public void run () {
				Gdx.app.log("TimerTest", "ping");
			}
		}, 1, 1);
		
		Gdx.app.log("TimerTest","is task scheduled: "+String.valueOf(task.isScheduled()));
	}
Example 2
public int lookUpPointerIndex (int pointerId) {
		int len = realId.length;
		for (int i = 0; i < len; i++) {
			if (realId[i] == pointerId) return i;
		}

		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < len; i++) {
			sb.append(i + ":" + realId[i] + " ");
		}
		Gdx.app.log("AndroidInput", "Pointer ID lookup failed: " + pointerId + ", " + sb.toString());
		return -1;
	}
Example 3
public RemoteSender (String ip, int port) {
		try {
			Socket socket = new Socket(ip, port);
			socket.setTcpNoDelay(true);
			socket.setSoTimeout(3000);
			out = new DataOutputStream(socket.getOutputStream());
			out.writeBoolean(Gdx.input.isPeripheralAvailable(Peripheral.MultitouchScreen));
			connected = true;
			Gdx.input.setInputProcessor(this);
		} catch (Exception e) {
			Gdx.app.log("RemoteSender", "couldn't connect to " + ip + ":" + port);
		}
	}
Example 4
private void logAction (int action) {
		String actionStr = "";
		if (action == MotionEvent.ACTION_HOVER_ENTER)
			actionStr = "HOVER_ENTER";
		else if (action == MotionEvent.ACTION_HOVER_MOVE)
			actionStr = "HOVER_MOVE";
		else if (action == MotionEvent.ACTION_HOVER_EXIT)
			actionStr = "HOVER_EXIT";
		else if (action == MotionEvent.ACTION_SCROLL)
			actionStr = "SCROLL";
		else
			actionStr = "UNKNOWN (" + action + ")";
		Gdx.app.log("AndroidMouseHandler", "action " + actionStr);
	}
Example 5
public void create () {
		texture = new Texture(Gdx.files.internal("data/badlogicsmall.jpg"));
		mesh = new Mesh(true, 3, 0, new VertexAttribute(Usage.Position, 3, "a_pos"), new VertexAttribute(Usage.TextureCoordinates,
			2, "a_tex"));
		mesh.setVertices(new float[] {-1, -1, 0, 0, 1, 0, 1, 0, 0.5f, 0, 1, -1, 0, 1, 1});

		DisplayMode[] modes = Gdx.graphics.getDisplayModes();
		for (DisplayMode mode : modes) {
			System.out.println(mode);
		}
		Gdx.graphics.setDisplayMode(800, 600, true);
		Gdx.app.log("FullscreenTest", Gdx.graphics.getBufferFormat().toString());
	}
Example 6
public void render () {
        Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
        stage.draw();
        Gdx.app.log("X", "FPS: " + Gdx.graphics.getFramesPerSecond());
        SpriteBatch spriteBatch = (SpriteBatch)stage.getBatch();
        Gdx.app.log("X", "render calls: " + spriteBatch.totalRenderCalls);
        spriteBatch.totalRenderCalls = 0;
    }
Example 7
public void render () {
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		batch.begin();
		batch.draw(texture, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
		batch.end();
		
		Pixmap pixmap = ScreenUtils.getFrameBufferPixmap(0,  0,  Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
		int color = pixmap.getPixel(0, pixmap.getHeight() - 1);
		Gdx.app.log("AlphaTest", Integer.toHexString(color));
		pixmap.dispose();
	}
Example 8
protected void removeController(int deviceId) {
		AndroidController controller = controllerMap.remove(deviceId);
		if(controller != null) {
			synchronized(eventQueue) {
				AndroidControllerEvent event = eventPool.obtain();
				event.type = AndroidControllerEvent.DISCONNECTED;
				event.controller = controller;
				eventQueue.add(event);
			}
			Gdx.app.log(TAG, "removed controller '" + controller.getName() + "'");
		}
	}
Example 9
private void logConfig(EGLConfig config) {
        EGL10 egl = (EGL10) EGLContext.getEGL();
        EGLDisplay display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
        int r = getAttrib(egl, display, config, EGL10.EGL_RED_SIZE, 0);
        int g = getAttrib(egl, display, config, EGL10.EGL_GREEN_SIZE, 0);
        int b = getAttrib(egl, display, config, EGL10.EGL_BLUE_SIZE, 0);
        int a = getAttrib(egl, display, config, EGL10.EGL_ALPHA_SIZE, 0);
        int d = getAttrib(egl, display, config, EGL10.EGL_DEPTH_SIZE, 0);
        int s = getAttrib(egl, display, config, EGL10.EGL_STENCIL_SIZE, 0);

        Gdx.app.log("AndroidGraphics", "framebuffer: (" + r + ", " + g + ", " + b + ", " + a + ")");
        Gdx.app.log("AndroidGraphics", "depthbuffer: (" + d + ")");
        Gdx.app.log("AndroidGraphics", "stencilbuffer: (" + s + ")");
    }