All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.badlogic.gdx.graphics.glutils.VertexArray Maven / Gradle / Ivy

Go to download

JVM AOT compiler currently generating JavaScript, Haxe, with initial focus on Kotlin and games.

There is a newer version: 0.6.7
Show newest version
/*******************************************************************************
 * Copyright 2011 See AUTHORS file.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/

package com.badlogic.gdx.graphics.glutils;

import com.badlogic.gdx.graphics.VertexAttribute;
import com.badlogic.gdx.graphics.VertexAttributes;

/** 

* A {@link VertexData} implementation based on OpenGL vertex buffer objects. *

* *

* If the OpenGL ES context was lost you can call {@link #invalidate()} to recreate a new OpenGL vertex buffer object. This class * can be used seamlessly with OpenGL ES 1.x and 2.0. *

* *

* In case OpenGL ES 2.0 is used in the application the data is bound via glVertexAttribPointer() according to the attribute * aliases specified via {@link VertexAttributes} in the constructor. *

* *

* Uses indirect Buffers on Android 1.5/1.6 to fix GC invocation due to leaking PlatformAddress instances. *

* *

* VertexBufferObjects must be disposed via the {@link #dispose()} method when no longer needed *

* * @author mzechner, Dave Clayton */ public class VertexArray extends VertexBufferObject { public VertexArray (int numVertices, VertexAttribute... attributes) { this(numVertices, new VertexAttributes(attributes)); } /** Constructs a new interleaved VertexArray * * @param numVertices the maximum number of vertices * @param attributes the {@link VertexAttributes} */ public VertexArray (int numVertices, VertexAttributes attributes) { super(false, numVertices, attributes); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy