Cleanup
This commit is contained in:
@@ -13,18 +13,18 @@ public class IndexedRenderer implements Disposable{
|
||||
|
||||
private Shader program = new Shader(
|
||||
Strings.join("\n",
|
||||
"attribute vec4 " + Shader.POSITION_ATTRIBUTE + ";",
|
||||
"attribute vec4 " + Shader.COLOR_ATTRIBUTE + ";",
|
||||
"attribute vec2 " + Shader.TEXCOORD_ATTRIBUTE + "0;",
|
||||
"attribute vec4 " + Shader.positionAttribute + ";",
|
||||
"attribute vec4 " + Shader.colorAttribute + ";",
|
||||
"attribute vec2 " + Shader.texcoordAttribute + "0;",
|
||||
"uniform mat4 u_projTrans;",
|
||||
"varying vec4 v_color;",
|
||||
"varying vec2 v_texCoords;",
|
||||
"",
|
||||
"void main(){",
|
||||
" v_color = " + Shader.COLOR_ATTRIBUTE + ";",
|
||||
" v_color = " + Shader.colorAttribute + ";",
|
||||
" v_color.a = v_color.a * (255.0/254.0);",
|
||||
" v_texCoords = " + Shader.TEXCOORD_ATTRIBUTE + "0;",
|
||||
" gl_Position = u_projTrans * " + Shader.POSITION_ATTRIBUTE + ";",
|
||||
" v_texCoords = " + Shader.texcoordAttribute + "0;",
|
||||
" gl_Position = u_projTrans * " + Shader.positionAttribute + ";",
|
||||
"}"),
|
||||
Strings.join("\n",
|
||||
"#ifdef GL_ES",
|
||||
@@ -222,9 +222,9 @@ public class IndexedRenderer implements Disposable{
|
||||
if(mesh != null) mesh.dispose();
|
||||
|
||||
mesh = new Mesh(true, 6 * sprites, 0,
|
||||
new VertexAttribute(Usage.Position, 2, "a_position"),
|
||||
new VertexAttribute(Usage.ColorPacked, 4, "a_color"),
|
||||
new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoord0"));
|
||||
new VertexAttribute(Usage.position, 2, "a_position"),
|
||||
new VertexAttribute(Usage.colorPacked, 4, "a_color"),
|
||||
new VertexAttribute(Usage.textureCoordinates, 2, "a_texCoord0"));
|
||||
vertices = new float[6 * sprites * vsize];
|
||||
mesh.setVertices(vertices);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user