Mesh attribute cleanup
This commit is contained in:
@@ -3,7 +3,6 @@ package mindustry.graphics;
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.Texture.*;
|
||||
import arc.graphics.VertexAttributes.*;
|
||||
import arc.graphics.gl.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
@@ -60,9 +59,7 @@ public class CubemapMesh implements Disposable{
|
||||
public CubemapMesh(Cubemap map){
|
||||
this.map = map;
|
||||
this.map.setFilter(TextureFilter.linear);
|
||||
this.mesh = new Mesh(true, vertices.length, 0,
|
||||
new VertexAttribute(Usage.position, 3, "a_position")
|
||||
);
|
||||
this.mesh = new Mesh(true, vertices.length, 0, VertexAttribute.position3);
|
||||
mesh.getVerticesBuffer().limit(vertices.length);
|
||||
mesh.getVerticesBuffer().put(vertices, 0, vertices.length);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package mindustry.graphics;
|
||||
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.VertexAttributes.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.graphics.gl.*;
|
||||
import arc.math.*;
|
||||
@@ -200,9 +199,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"));
|
||||
VertexAttribute.position,
|
||||
VertexAttribute.color,
|
||||
VertexAttribute.texCoords);
|
||||
vertices = new float[6 * sprites * vsize];
|
||||
mesh.setVertices(vertices);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package mindustry.graphics.g3d;
|
||||
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.VertexAttributes.*;
|
||||
import arc.graphics.gl.*;
|
||||
import arc.math.geom.*;
|
||||
import mindustry.graphics.g3d.PlanetGrid.*;
|
||||
|
||||
@@ -92,9 +90,9 @@ public class MeshBuilder{
|
||||
|
||||
private static void begin(int count){
|
||||
mesh = new Mesh(true, count, 0,
|
||||
new VertexAttribute(Usage.position, 3, Shader.positionAttribute),
|
||||
new VertexAttribute(Usage.normal, 3, Shader.normalAttribute),
|
||||
new VertexAttribute(Usage.colorPacked, 4, Shader.colorAttribute)
|
||||
VertexAttribute.position3,
|
||||
VertexAttribute.normal,
|
||||
VertexAttribute.color
|
||||
);
|
||||
|
||||
mesh.getVerticesBuffer().limit(mesh.getMaxVertices());
|
||||
|
||||
Reference in New Issue
Block a user