本文整理汇总了Java中com.badlogic.gdx.graphics.glutils.VertexArray类的典型用法代码示例。如果您正苦于以下问题:Java VertexArray类的具体用法?Java VertexArray怎么用?Java VertexArray使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VertexArray类属于com.badlogic.gdx.graphics.glutils包,在下文中一共展示了VertexArray类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transformClass
import com.badlogic.gdx.graphics.glutils.VertexArray; //导入依赖的package包/类
@Override
public void transformClass(ClassHolder cls, ClassReaderSource innerSource, Diagnostics diagnostics) {
if (cls.getName().equals(BufferUtils.class.getName())) {
transformBufferUtils(cls, innerSource);
} else if (cls.getName().equals(TextureData.Factory.class.getName())) {
transformTextureData(cls, innerSource);
} else if (cls.getName().equals(FileHandle.class.getName())) {
transformFileHandle(cls);
} else if (cls.getName().equals(Pixmap.class.getName())) {
replaceClass(cls, innerSource.get(PixmapEmulator.class.getName()));
} else if (cls.getName().equals(Matrix4.class.getName())) {
transformMatrix(cls, innerSource);
} else if (cls.getName().equals(VertexArray.class.getName()) ||
cls.getName().equals(VertexBufferObject.class.getName())) {
replaceClass(cls, innerSource.get(VertexArrayEmulator.class.getName()));
} else if (cls.getName().equals(IndexArray.class.getName()) ||
cls.getName().equals(IndexBufferObject.class.getName())) {
replaceClass(cls, innerSource.get(IndexArrayEmulator.class.getName()));
}
}
示例2: Mesh
import com.badlogic.gdx.graphics.glutils.VertexArray; //导入依赖的package包/类
public Mesh(Mesh.VertexDataType paramVertexDataType, boolean paramBoolean, int paramInt1, int paramInt2, VertexAttribute[] paramArrayOfVertexAttribute)
{
if (paramVertexDataType == Mesh.VertexDataType.VertexBufferObject)
{
this.vertices = new VertexBufferObject(paramBoolean, paramInt1, paramArrayOfVertexAttribute);
this.indices = new IndexBufferObject(paramBoolean, paramInt2);
this.isVertexArray = false;
}
while (true)
{
addManagedMesh(Gdx.app, this);
return;
if (paramVertexDataType == Mesh.VertexDataType.VertexBufferObjectSubData)
{
this.vertices = new VertexBufferObjectSubData(paramBoolean, paramInt1, paramArrayOfVertexAttribute);
this.indices = new IndexBufferObjectSubData(paramBoolean, paramInt2);
this.isVertexArray = false;
}
else
{
this.vertices = new VertexArray(paramInt1, paramArrayOfVertexAttribute);
this.indices = new IndexArray(paramInt2);
this.isVertexArray = true;
}
}
}