@Override
public void create ()
{
// Init camera
this.camera = new PerspectiveCamera(70, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
this.camera.position.set(0,0,-20);
this.camera.lookAt(0,0,0);
this.camera.near = 0.05f;
this.camera.far = 600.0f;
this.camera.update();
// Init test shader
this.testShader = ShaderLoader.loadShader("test");
// Init test buffer
this.testBufferObject = new DynamicVertexBufferObject(3, new VertexAttributes(new VertexAttribute(Usage.Position, 4, "a_position")));
float[] vertices = new float[]
{
-10,0,0,1,0,2.5f,0,1,10,0,0,1
};
this.testBufferObject.setVertices(vertices, 0, vertices.length);
}
LibraryTest.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:libgdx-opencl
作者:
评论列表
文章目录