Package playn.core

Class TexturedBatch

java.lang.Object
playn.core.GLBatch
playn.core.TexturedBatch
All Implemented Interfaces:
AutoCloseable, Closeable
Direct Known Subclasses:
QuadBatch

public class TexturedBatch extends GLBatch
A batch that renders textured primitives.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Provides some standard bits for a shader program that uses a tint and a texture.

    Nested classes/interfaces inherited from interface react.Closeable

    Closeable.Set, Closeable.Util
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final GL20
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    end()
    Must be called when one is done using this batch to accumulate and send drawing commands.
    void
    Prepares this batch to render using the supplied texture.

    Methods inherited from class playn.core.GLBatch

    begin, close, flush

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • gl

      public final GL20 gl
  • Method Details

    • setTexture

      public void setTexture(Texture texture)
      Prepares this batch to render using the supplied texture. If pending operations have been added to this batch for a different texture, this call will trigger a GLBatch.flush().

      Note: if you call add methods that take a texture, you do not need to call this method manually. Only if you're adding bare primitives is it needed.

    • end

      public void end()
      Description copied from class: GLBatch
      Must be called when one is done using this batch to accumulate and send drawing commands. The default implementation calls GLBatch.flush() and marks this batch as inactive.
      Overrides:
      end in class GLBatch