protected QuadBatch createSepiaBatch() { return new TriangleBatch(game.graphics.gl, new TriangleBatch.Source() { @Override protected String textureTint () { return super.textureTint() + " float grey = dot(textureColor.rgb, vec3(0.299, 0.587, 0.114));\n" + " textureColor = vec4(grey * vec3(1.2, 1.0, 0.8), textureColor.a);\n"; } }); }
/** Creates the {@link QuadBatch} used as the default top-level batch when rendering the scene * graph. This uses {@link UniformQuadBatch} if possible, {@link TriangleBatch} otherwise. */ protected QuadBatch createDefaultBatch (GL20 gl) { try { if (UniformQuadBatch.isLikelyToPerform(gl)) return new UniformQuadBatch(gl); } catch (Exception e) { // oops, fall through and use a TriangleBatch } return new TriangleBatch(gl); } }
final TriangleBatch triangleBatch = new TriangleBatch(game.graphics.gl); final AffineTransform af = new AffineTransform(). scale(game.graphics.scale().factor, game.graphics.scale().factor).