/external/libgdx/tests/gdx-tests/src/com/badlogic/gdx/tests/ |
SpriteBatchRotationTest.java | 24 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
28 SpriteBatch spriteBatch;
39 spriteBatch.begin();
40 spriteBatch.draw(texture, 16, 10, 16, 16, 32, 32, 1, 1, 0, 0, 0, texture.getWidth(), texture.getHeight(), false, false);
41 spriteBatch.draw(texture, 64, 10, 32, 32, 0, 0, texture.getWidth(), texture.getHeight(), false, false);
42 spriteBatch.draw(texture, 112, 10, 0, 0, texture.getWidth(), texture.getHeight());
44 spriteBatch.draw(texture, 16, 58, 16, 16, 32, 32, 1, 1, angle, 0, 0, texture.getWidth(), texture.getHeight(), false, false);
45 spriteBatch.draw(texture, 64, 58, 16, 16, 32, 32, scale, scale, 0, 0, 0, texture.getWidth(), texture.getHeight(), false,
47 spriteBatch.draw(texture, 112, 58, 16, 16, 32, 32, scale, scale, angle, 0, 0, texture.getWidth(), texture.getH (…) [all...] |
TextureDataTest.java | 22 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
27 private SpriteBatch spriteBatch;
31 spriteBatch = new SpriteBatch();
38 spriteBatch.begin();
39 spriteBatch.draw(texture, 100, 100);
40 spriteBatch.end();
|
BitmapFontMetricsTest.java | 24 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 31 private SpriteBatch spriteBatch; 38 spriteBatch = new SpriteBatch(); 44 renderer.setProjectionMatrix(spriteBatch.getProjectionMatrix()); 55 spriteBatch.begin(); 65 smallFont.draw(spriteBatch, "draw position", 20, viewHeight - 0); 67 smallFont.draw(spriteBatch, "bounds", 20, viewHeight - 20); 69 smallFont.draw(spriteBatch, "baseline", 20, viewHeight - 40) [all...] |
BitmapFontFlipTest.java | 27 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
33 private SpriteBatch spriteBatch;
51 spriteBatch = new SpriteBatch();
52 spriteBatch.setProjectionMatrix(new Matrix4().setToOrtho(0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), 0, 0, 1));
103 spriteBatch.begin();
104 logoSprite.draw(spriteBatch);
123 spriteBatch.end();
129 font.draw(spriteBatch, text, 0, 320 - 300, 480, Align.center, false); [all...] |
PixmapBlendingTest.java | 26 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
31 private SpriteBatch spriteBatch;
40 if (spriteBatch != null) return;
41 spriteBatch = new SpriteBatch();
46 spriteBatch.setTransformMatrix(transform);
69 spriteBatch.begin();
70 logoSprite.draw(spriteBatch);
71 spriteBatch.end(); [all...] |
SimpleAnimationTest.java | 23 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
40 private SpriteBatch spriteBatch;
61 spriteBatch = new SpriteBatch();
70 spriteBatch.begin();
72 spriteBatch.draw(frame, position.x, position.y);
73 spriteBatch.end();
85 spriteBatch.dispose();
|
BitmapFontTest.java | 28 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 41 private SpriteBatch spriteBatch; 50 spriteBatch = new SpriteBatch(); 63 renderer.setProjectionMatrix(spriteBatch.getProjectionMatrix()); 109 spriteBatch.begin(); 120 font.draw(spriteBatch, layout, 10, 10 + meowy); 121 spriteBatch.end(); 147 spriteBatch.begin() [all...] |
SpriteBatchShaderTest.java | 26 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
39 SpriteBatch spriteBatch;
61 spriteBatch.begin();
67 spriteBatch.draw(texture, coords[i], coords[i + 1], 0, 0, 32, 32);
71 spriteBatch.setColor(col);
73 spriteBatch.draw(texture2, coords2[i], coords2[i + 1], 0, 0, 32, 32);
77 // spriteBatch.drawText(font, "Question?", 100, 300, Color.RED);
78 // spriteBatch.drawText(font, "and another this is a test", 200, 100, Color.WHITE);
79 // spriteBatch.drawText(font, "all hail and another this is a test", 200, 200, Color.WHITE); [all...] |
BitmapFontDistanceFieldTest.java | 27 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 57 private SpriteBatch spriteBatch; 70 spriteBatch = new SpriteBatch(); 93 spriteBatch.begin(); 102 spriteBatch.end(); 109 spriteBatch.setShader(null); 110 descriptionFont.draw(spriteBatch, description, x, y); 111 spriteBatch.flush() [all...] |
BitmapFontAlignmentTest.java | 29 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
35 private SpriteBatch spriteBatch;
52 spriteBatch = new SpriteBatch();
68 spriteBatch.begin();
69 logoSprite.draw(spriteBatch);
90 spriteBatch.end();
104 font.draw(spriteBatch, text, x, y);
122 cache.draw(spriteBatch);
[all...] |
ParticleEmitterTest.java | 25 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
30 private SpriteBatch spriteBatch;
40 spriteBatch = new SpriteBatch();
126 spriteBatch.dispose();
131 spriteBatch.getProjectionMatrix().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
134 spriteBatch.begin();
135 effect.draw(spriteBatch, delta);
136 spriteBatch.end(); [all...] |
SpriteBatchTest.java | 27 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
40 SpriteBatch spriteBatch;
79 spriteBatch.begin();
84 spriteBatch.draw(texture, sprites[i], sprites[i + 1], 16, 16, 32, 32, scale, scale, angle, 0, 0, 32, 32, false, false);
89 spriteBatch
94 // spriteBatch.drawText(font, "Question?", 100, 300, Color.RED);
95 // spriteBatch.drawText(font, "and another this is a test", 200, 100, Color.WHITE);
96 // spriteBatch.drawText(font, "all hail and another this is a test", 200, 200, Color.WHITE);
97 // spriteBatch.drawText(font, "normal fps: " + Gdx.graphics.getFramesPerSecond(), 10, 30, Color.RED); [all...] |
TextAreaTest.java | 21 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
61 SpriteBatch spriteBatch = (SpriteBatch)stage.getBatch();
62 Gdx.app.log("X", "render calls: " + spriteBatch.totalRenderCalls);
63 spriteBatch.totalRenderCalls = 0;
|
TextButtonTest.java | 21 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
53 SpriteBatch spriteBatch = (SpriteBatch)stage.getBatch();
54 Gdx.app.log("X", "render calls: " + spriteBatch.totalRenderCalls);
55 spriteBatch.totalRenderCalls = 0;
|
ParticleEmittersTest.java | 29 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 47 private SpriteBatch spriteBatch; 60 spriteBatch = new SpriteBatch(); 96 spriteBatch.dispose(); 107 spriteBatch.getProjectionMatrix().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); 110 spriteBatch.begin(); 112 e.draw(spriteBatch, delta); 113 spriteBatch.end() [all...] |
FrameBufferTest.java | 40 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
57 SpriteBatch spriteBatch;
109 spriteBatch.begin();
110 spriteBatch.draw(frameBuffer.getColorBufferTexture(), 0, 0, 256, 256, 0, 0, frameBuffer.getColorBufferTexture().getWidth(),
113 spriteBatch.draw(stencilFrameBuffer.getColorBufferTexture(), 256, 256, 256, 256, 0, 0, frameBuffer.getColorBufferTexture()
115 spriteBatch.end();
134 spriteBatch = new SpriteBatch();
163 spriteBatch.dispose(); [all...] |
PathTest.java | 24 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 40 SpriteBatch spriteBatch; 57 spriteBatch = new SpriteBatch(); 145 renderer.begin(spriteBatch.getProjectionMatrix(), GL20.GL_LINE_STRIP); 155 spriteBatch.begin(); 156 obj.draw(spriteBatch); 157 obj2.draw(spriteBatch); 158 spriteBatch.end() [all...] |
/external/libgdx/gdx/src/com/badlogic/gdx/graphics/g2d/ |
DistanceFieldFont.java | 32 * the SpriteBatch with the {@link #createDistanceFieldShader()} shader. 90 /** @param distanceFieldSmoothing Set the distance field smoothing factor for this font. SpriteBatch needs to have this shader 97 * u_smoothing uniform > 0.0. Otherwise the same code as the default SpriteBatch shader is used. */ 157 private void setSmoothingUniform (Batch spriteBatch, float smoothing) { 158 spriteBatch.flush(); 159 spriteBatch.getShader().setUniformf("u_smoothing", smoothing); 163 public void draw (Batch spriteBatch) { 164 setSmoothingUniform(spriteBatch, getSmoothingFactor()); 165 super.draw(spriteBatch); 166 setSmoothingUniform(spriteBatch, 0) [all...] |
BitmapFontCache.java | 232 public void draw (Batch spriteBatch) { 237 spriteBatch.draw(regions.get(j).getTexture(), vertices, 0, idx[j]); 242 public void draw (Batch spriteBatch, int start, int end) { 244 spriteBatch.draw(font.getRegion().getTexture(), pageVertices[0], start * 20, (end - start) * 20); 273 spriteBatch.draw(regions.get(i).getTexture(), pageVertices[i], offset * 20, count * 20); 277 public void draw (Batch spriteBatch, float alphaModulation) { 279 draw(spriteBatch); 286 draw(spriteBatch);
|
PolygonSprite.java | 262 public void draw (PolygonSpriteBatch spriteBatch) {
264 spriteBatch.draw(region.region.texture, getVertices(), 0, vertices.length, region.triangles, 0, region.triangles.length);
267 public void draw (PolygonSpriteBatch spriteBatch, float alphaModulation) {
272 draw(spriteBatch);
|
/external/libgdx/tests/gdx-tests/src/com/badlogic/gdx/tests/g3d/ |
ModelLoaderTest.java | 24 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
35 SpriteBatch spriteBatch;
46 spriteBatch = new SpriteBatch();
79 spriteBatch.begin();
80 spriteBatch.draw(assets.get("data/g3d/checkboard.png", Texture.class), 0, 0, 100, 100);
81 spriteBatch.draw(assets.get("data/g3d/Knight.png", Texture.class), 100, 0, 100, 100);
82 spriteBatch.end();
90 spriteBatch.dispose(); [all...] |
/external/libgdx/tests/gdx-tests/src/com/badlogic/gdx/tests/extensions/ |
FreeTypeMetricsTest.java | 25 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 35 private SpriteBatch spriteBatch; 42 spriteBatch = new SpriteBatch(); 54 renderer.setProjectionMatrix(spriteBatch.getProjectionMatrix()); 65 spriteBatch.begin(); 75 smallFont.draw(spriteBatch, "draw position", 20, viewHeight - 0); 77 smallFont.draw(spriteBatch, "bounds", 20, viewHeight - 20); 79 smallFont.draw(spriteBatch, "baseline", 20, viewHeight - 40) [all...] |
/external/libgdx/extensions/gdx-bullet/src/com/badlogic/gdx/physics/bullet/ |
DebugDrawer.java | 22 import com.badlogic.gdx.graphics.g2d.SpriteBatch; 35 private SpriteBatch spriteBatch; 73 if (spriteBatch == null) { 74 spriteBatch = new SpriteBatch(); 90 spriteBatch.begin(); 93 font.draw(spriteBatch, textString, location.x, location.y, 0, textString.length(), 0, Align.center, false); 95 spriteBatch.end(); 145 public SpriteBatch getSpriteBatch () [all...] |
/external/libgdx/tests/gdx-tests/src/com/badlogic/gdx/tests/g3d/voxel/ |
VoxelTest.java | 24 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
36 SpriteBatch spriteBatch;
46 spriteBatch = new SpriteBatch();
81 spriteBatch.begin();
82 font.draw(spriteBatch, "fps: " + Gdx.graphics.getFramesPerSecond() + ", #visible chunks: " + voxelWorld.renderedChunks
84 spriteBatch.end();
89 spriteBatch.getProjectionMatrix().setToOrtho2D(0, 0, width, height);
|
/external/libgdx/extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/ |
ParticleEditor.java | 48 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
302 private SpriteBatch spriteBatch;
306 if (spriteBatch != null) return;
308 spriteBatch = new SpriteBatch();
374 spriteBatch.setProjectionMatrix(worldCamera.combined);
376 spriteBatch.begin();
377 spriteBatch.enableBlending();
378 spriteBatch.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); [all...] |