Package k8.buffer

Source Code of k8.buffer.TexCoordsBuffer

package k8.buffer;

import k8.buffer.var.VARTexCoordsBuffer;
import k8.buffer.vbo.VBOTexCoordsBuffer;

import org.lwjgl.opengl.GLContext;


public abstract class TexCoordsBuffer extends Buffer {
   
    /**
     * Creates an instance of TexCoordsBuffer.
     *
     * @param initialcapacity
     *          Initial capacity (number of indices)
     */
    public TexCoordsBuffer(int initialcapacity) {
        super(2*initialcapacity);
    }
   
    /**
     * Gets an instance of TexCoordsBuffer.
     *
     * @param initialcapacity
     *          Initial capacity (number of vertices)
     */
    public static TexCoordsBuffer getInstance(int initialcapacity) {
       return ( GLContext.getCapabilities().GL_ARB_vertex_buffer_object ) ? new VBOTexCoordsBuffer(initialcapacity) : new VARTexCoordsBuffer(initialcapacity);
    }
   
    /** Gets a Slice of this buffer */
    public Slice getSlice() {
      return getSlice(24);
    }
   
    /** Tells OpenGL this buffer contains the texture coordinates */
    public abstract void glTexCoordPointer();

}
TOP

Related Classes of k8.buffer.TexCoordsBuffer

TOP
Copyright © 2018 www.massapi.com. 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.