Package com.jme3.scene

Examples of com.jme3.scene.Mesh.clearBuffer()


            VertexBuffer newPosVb = new VertexBuffer(Type.Position);
            newPosVb.setupData(positions.getUsage(),
                               positions.getNumComponents(),
                               posFmt,
                               newBuf);
            mesh.clearBuffer(Type.Position);
            mesh.setBuffer(newPosVb);
        }

        // normals, automatically convert to signed byte
        fb = (FloatBuffer) normals.getData();
View Full Code Here


        convertNormals(fb, bb);

        normals = new VertexBuffer(Type.Normal);
        normals.setupData(Usage.Static, 3, Format.Byte, bb);
        normals.setNormalized(true);
        mesh.clearBuffer(Type.Normal);
        mesh.setBuffer(normals);

        // texcoords
        fb = (FloatBuffer) texcoords.getData();
        if (tcFmt != Format.Float){
View Full Code Here

            VertexBuffer newTcVb = new VertexBuffer(Type.TexCoord);
            newTcVb.setupData(texcoords.getUsage(),
                              texcoords.getNumComponents(),
                              tcFmt,
                              newBuf);
            mesh.clearBuffer(Type.TexCoord);
            mesh.setBuffer(newTcVb);
        }
    }

    public static void compressIndexBuffer(Mesh mesh){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.