Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.VertexAttributes


    if ((usage & Usage.TextureCoordinates) == Usage.TextureCoordinates)
      attrs.add(new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE+"0"));
    final VertexAttribute attributes[] = new VertexAttribute[attrs.size];
    for (int i = 0; i < attributes.length; i++)
      attributes[i] = attrs.get(i);
    return new VertexAttributes(attributes);
  }
View Full Code Here


   * @param isStatic whether the vertex data is static.
   * @param numVertices the maximum number of vertices
   * @param attributes the {@link VertexAttribute}s. */
  public VertexBufferObjectSubData (boolean isStatic, int numVertices, VertexAttribute... attributes) {
    this.isStatic = isStatic;
    this.attributes = new VertexAttributes(attributes);
// if (Gdx.app.getType() == ApplicationType.Android
// && Gdx.app.getVersion() < 5) {
// byteBuffer = ByteBuffer.allocate(this.attributes.vertexSize
// * numVertices);
// byteBuffer.order(ByteOrder.nativeOrder());
View Full Code Here

   *
   * @param isStatic whether the vertex data is static.
   * @param numVertices the maximum number of vertices
   * @param attributes the {@link VertexAttribute}s. */
  public VertexBufferObject (boolean isStatic, int numVertices, VertexAttribute... attributes) {
    this(isStatic, numVertices, new VertexAttributes(attributes));
  }
View Full Code Here

  /** Constructs a new interleaved VertexArray
   *
   * @param numVertices the maximum number of vertices
   * @param attributes the {@link VertexAttribute}s */
  public VertexArray (int numVertices, VertexAttribute... attributes) {
    this(numVertices, new VertexAttributes(attributes));
  }
View Full Code Here

   *
   * @param isStatic whether the vertex data is static.
   * @param numVertices the maximum number of vertices
   * @param attributes the {@link VertexAttribute}s. */
  public VertexBufferObject (boolean isStatic, int numVertices, VertexAttribute... attributes) {
    this(isStatic, numVertices, new VertexAttributes(attributes));
  }
View Full Code Here

* </p>
*
* @author mzechner, Dave Clayton <contact@redskyforge.com> */
public class VertexArray extends VertexBufferObject {
  public VertexArray (int numVertices, VertexAttribute... attributes) {
    this(numVertices, new VertexAttributes(attributes));
  }
View Full Code Here

    if ((usage & Usage.TextureCoordinates) == Usage.TextureCoordinates)
      attrs.add(new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE + "0"));
    final VertexAttribute attributes[] = new VertexAttribute[attrs.size];
    for (int i = 0; i < attributes.length; i++)
      attributes[i] = attrs.get(i);
    return new VertexAttributes(attributes);
  }
View Full Code Here

   *
   * @param isStatic whether the vertex data is static.
   * @param numVertices the maximum number of vertices
   * @param attributes the {@link VertexAttribute}s. */
  public VertexBufferObject (boolean isStatic, int numVertices, VertexAttribute... attributes) {
    this(isStatic, numVertices, new VertexAttributes(attributes));
  }
View Full Code Here

    if ((usage & Usage.TextureCoordinates) == Usage.TextureCoordinates)
      attrs.add(new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE + "0"));
    final VertexAttribute attributes[] = new VertexAttribute[attrs.size];
    for (int i = 0; i < attributes.length; i++)
      attributes[i] = attrs.get(i);
    return new VertexAttributes(attributes);
  }
View Full Code Here

   * @param isStatic whether the vertex data is static.
   * @param numVertices the maximum number of vertices
   * @param attributes the {@link VertexAttribute}s. */
  public VertexBufferObjectSubData (boolean isStatic, int numVertices, VertexAttribute... attributes) {
    this.isStatic = isStatic;
    this.attributes = new VertexAttributes(attributes);
    byteBuffer = BufferUtils.newByteBuffer(this.attributes.vertexSize * numVertices);
    isDirect = true;

    usage = isStatic ? GL20.GL_STATIC_DRAW : GL20.GL_DYNAMIC_DRAW;
    buffer = byteBuffer.asFloatBuffer();
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.VertexAttributes

Copyright © 2018 www.massapicom. 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.