Exemplo n.º 1
0
  @Test
  public void render() {
    renderer.startLayer();
    renderer.drawQuad(tex, Area2D.of(0, 0, 1280, 720));
    renderer.render();

    checkRenderResult("quad");
  }
Exemplo n.º 2
0
  @Test
  public void renderInvalidTexture() {
    // The GL renderer only knows how to render TextureAdapters, not TextureStubs
    TextureStub invalidTex = new TextureStub(1, 1);

    renderer.startLayer();
    renderer.drawQuad(invalidTex, Area2D.of(0, 0, 1280, 720));
    renderer.render();

    checkRenderResult("quad-invalidtexture");
  }
Exemplo n.º 3
0
  @Test
  public void renderRotated() {
    renderer.startLayer();

    DrawTransform dt = new DrawTransform();
    MutableMatrix mm = new MutableMatrix();
    mm.translate(400, 0);
    mm.rotate(128); // Rotate right around (0,0) by a quarter turn
    dt.setTransform(mm.immutableCopy());
    renderer.drawQuad(tex, dt, Area2D.of(0, 0, 640, 400));
    renderer.render();

    checkRenderResult("quad-rotated");
  }