playn.java
Class JavaGLShader

java.lang.Object
  extended by playn.core.gl.IndexedTrisShader
      extended by playn.java.JavaGLShader
All Implemented Interfaces:
GLShader

public class JavaGLShader
extends IndexedTrisShader

Implements shaders for Java.


Field Summary
protected  int aMatrix
           
protected  int aPosition
           
protected  int aTexture
           
protected  int aTranslation
           
protected  playn.java.JavaGLContext ctx
           
protected  int elementBuffer
           
protected  ShortBuffer elementData
           
protected  int elementOffset
           
protected  int program
           
protected  int uScreenSizeLoc
           
protected  int vertexBuffer
           
protected  FloatBuffer vertexData
           
protected  int vertexOffset
           
 
Fields inherited from interface playn.core.gl.GLShader
COLOR_FRAG_SHADER, QUAD_VERTEX_SHADER, TEX_FRAG_SHADER, VERTEX_SHADER
 
Constructor Summary
protected JavaGLShader(playn.java.JavaGLContext ctx, String fragShader)
           
 
Method Summary
protected  void addElement(int index)
           
protected  void addVertex(float m00, float m01, float m10, float m11, float tx, float ty, float dx, float dy, float sx, float sy)
           
protected  int beginPrimitive(int vertexCount, int elemCount)
           
protected  int createProgram(String vertexSource, String fragmentSource)
           
 void flush()
           
protected  boolean prepare(int fbufWidth, int fbufHeight)
           
 
Methods inherited from class playn.core.gl.IndexedTrisShader
addQuad, addQuad, addTriangles, addTriangles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

protected final playn.java.JavaGLContext ctx

program

protected final int program

uScreenSizeLoc

protected final int uScreenSizeLoc

aMatrix

protected final int aMatrix

aTranslation

protected final int aTranslation

aPosition

protected final int aPosition

aTexture

protected final int aTexture

vertexData

protected FloatBuffer vertexData

elementData

protected ShortBuffer elementData

vertexBuffer

protected final int vertexBuffer

elementBuffer

protected final int elementBuffer

vertexOffset

protected int vertexOffset

elementOffset

protected int elementOffset
Constructor Detail

JavaGLShader

protected JavaGLShader(playn.java.JavaGLContext ctx,
                       String fragShader)
Method Detail

prepare

protected boolean prepare(int fbufWidth,
                          int fbufHeight)

flush

public void flush()

beginPrimitive

protected int beginPrimitive(int vertexCount,
                             int elemCount)
Specified by:
beginPrimitive in class IndexedTrisShader

addVertex

protected void addVertex(float m00,
                         float m01,
                         float m10,
                         float m11,
                         float tx,
                         float ty,
                         float dx,
                         float dy,
                         float sx,
                         float sy)
Specified by:
addVertex in class IndexedTrisShader

addElement

protected void addElement(int index)
Specified by:
addElement in class IndexedTrisShader

createProgram

protected int createProgram(String vertexSource,
                            String fragmentSource)


Copyright © 2012. All Rights Reserved.