PixelRenderSystem.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:gaiasky 作者:
@Override
protected void initVertices() {
    meshes = new MeshData[1];
    curr = new MeshData();
    meshes[0] = curr;

    aux = new Vector3();

    /** Init renderer **/
    maxVertices = 3000000;

    VertexAttribute[] attribs = buildVertexAttributes();
    curr.mesh = new Mesh(false, maxVertices, 0, attribs);

    curr.vertices = new float[maxVertices * (curr.mesh.getVertexAttributes().vertexSize / 4)];
    curr.vertexSize = curr.mesh.getVertexAttributes().vertexSize / 4;
    curr.colorOffset = curr.mesh.getVertexAttribute(Usage.ColorPacked) != null ? curr.mesh.getVertexAttribute(Usage.ColorPacked).offset / 4 : 0;
    pmOffset = curr.mesh.getVertexAttribute(Usage.Tangent) != null ? curr.mesh.getVertexAttribute(Usage.Tangent).offset / 4 : 0;
    sizeOffset = curr.mesh.getVertexAttribute(Usage.Generic) != null ? curr.mesh.getVertexAttribute(Usage.Generic).offset / 4 : 0;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号