Created
June 1, 2012 12:50
-
-
Save Danny02/2851918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Element position = new Element(new GenericVector(DataType.FLOAT, 3), "Position"); | |
DataLayout layout = new DataLayout(position); | |
VertexBuffer vertexBuffer = new VertexBuffer(layout, 100); | |
//Erstellt eine tessiliertes Quadrat, | |
//der tessFactor sagt wieviele spalten udn reihen es geben soll | |
CellFactory factory = new CellFactory(10); | |
factory.createCell(new Vector2(0,0)); | |
factory.fillVBufferPerVertex(vertexBuffer, new PerVertexFiller() { | |
@Override | |
public void fill(Vertex vertex, Vector2 pos) | |
{ | |
vertex.setAttribute(position, pos.getX(), pos.getY(), height); | |
} | |
}); | |
ByteBuffer datenBuffer = vertexBuffer.buffer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment