public class

GLState

extends Object
java.lang.Object
   ↳ org.andengine.opengl.util.GLState

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Constants
int GL_UNPACK_ALIGNMENT_DEFAULT
Public Constructors
GLState()
Public Methods
void activeTexture(int pGLActiveTexture)
void bindArrayBuffer(int pHardwareBufferID)
void bindFramebuffer(int pFramebufferID)
void bindIndexBuffer(int pHardwareBufferID)
void bindTexture(int pHardwareTextureID)
void blendFunction(int pSourceBlendMode, int pDestinationBlendMode)
void checkError()
void checkFramebufferStatus()
void clearError()
void deleteArrayBuffer(int pHardwareBufferID)
void deleteFramebuffer(int pHardwareFramebufferID)
void deleteIndexBuffer(int pHardwareBufferID)
void deleteProgram(int pShaderProgramID)
void deleteTexture(int pHardwareTextureID)
void disableBlend()
void disableCulling()
void disableDepthTest()
void disableDither()
void disableScissorTest()
void enableBlend()
void enableCulling()
void enableDepthTest()
void enableDither()
void enableScissorTest()
void finish()
Tells the OpenGL driver to send all pending commands to the GPU immediately, and then blocks until the effects of those commands have been completed on the GPU.
void flush()
Tells the OpenGL driver to send all pending commands to the GPU immediately.
int generateArrayBuffer(int pSize, int pUsage)
int generateBuffer()
int generateFramebuffer()
int generateIndexBuffer(int pSize, int pUsage)
int generateTexture()
int getActiveFramebuffer()
int getActiveTexture()
int getError()
String getExtensions()
int getFramebufferStatus()
int getInteger(int pAttribute)
int getMaximumFragmentShaderUniformVectorCount()
int getMaximumTextureSize()
int getMaximumTextureUnits()
int getMaximumVertexAttributeCount()
int getMaximumVertexShaderUniformVectorCount()
float[] getModelViewGLMatrix()
float[] getModelViewProjectionGLMatrix()
float[] getProjectionGLMatrix()
String getRenderer()
String getVersion()
void glTexImage2D(int pTarget, int pLevel, Bitmap pBitmap, int pBorder, PixelFormat pPixelFormat)
Note: does not pre-multiply the alpha channel!
Except that difference, same as: texSubImage2D(int, int, int, int, Bitmap, int, int)

See topic: 'PNG loading that doesn't premultiply alpha?'
void glTexSubImage2D(int pTarget, int pLevel, int pX, int pY, Bitmap pBitmap, PixelFormat pPixelFormat)
Note: does not pre-multiply the alpha channel!
Except that difference, same as: texSubImage2D(int, int, int, int, Bitmap, int, int)

See topic: 'PNG loading that doesn't premultiply alpha?'
boolean isTexture(int pHardwareTextureID)
void lineWidth(float pLineWidth)
void loadModelViewGLMatrixIdentity()
void loadProjectionGLMatrixIdentity()
void orthoModelViewGLMatrixf(float pLeft, float pRight, float pBottom, float pTop, float pZNear, float pZFar)
void orthoProjectionGLMatrixf(float pLeft, float pRight, float pBottom, float pTop, float pZNear, float pZFar)
void popModelViewGLMatrix()
void popProjectionGLMatrix()
void pushModelViewGLMatrix()
void pushProjectionGLMatrix()
void reset(RenderOptions pRenderOptions, ConfigChooser pConfigChooser, EGLConfig pEGLConfig)
void resetGLMatrixStacks()
void resetModelViewGLMatrixStack()
void resetProjectionGLMatrixStack()
void rotateModelViewGLMatrixf(float pAngle, float pX, float pY, float pZ)
void rotateProjectionGLMatrixf(float pAngle, float pX, float pY, float pZ)
void scaleModelViewGLMatrixf(float pScaleX, float pScaleY, int pScaleZ)
void scaleProjectionGLMatrixf(float pScaleX, float pScaleY, float pScaleZ)
void skewModelViewGLMatrixf(float pSkewX, float pSkewY)
void skewProjectionGLMatrixf(float pSkewX, float pSkewY)
void translateModelViewGLMatrixf(float pX, float pY, float pZ)
void translateProjectionGLMatrixf(float pX, float pY, float pZ)
void useProgram(int pShaderProgramID)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int GL_UNPACK_ALIGNMENT_DEFAULT

Constant Value: 4 (0x00000004)

Public Constructors

public GLState ()

Public Methods

public void activeTexture (int pGLActiveTexture)

Parameters
pGLActiveTexture from GL_TEXTURE0 to GL_TEXTURE31.

public void bindArrayBuffer (int pHardwareBufferID)

public void bindFramebuffer (int pFramebufferID)

public void bindIndexBuffer (int pHardwareBufferID)

public void bindTexture (int pHardwareTextureID)

See Also
  • {@link GLState#forceBindTexture(GLES20, int)}

public void blendFunction (int pSourceBlendMode, int pDestinationBlendMode)

public void checkError ()

Throws
GLException

public void checkFramebufferStatus ()

public void clearError ()

public void deleteArrayBuffer (int pHardwareBufferID)

public void deleteFramebuffer (int pHardwareFramebufferID)

public void deleteIndexBuffer (int pHardwareBufferID)

public void deleteProgram (int pShaderProgramID)

public void deleteTexture (int pHardwareTextureID)

public void disableBlend ()

public void disableCulling ()

public void disableDepthTest ()

public void disableDither ()

public void disableScissorTest ()

public void enableBlend ()

public void enableCulling ()

public void enableDepthTest ()

public void enableDither ()

public void enableScissorTest ()

public void finish ()

Tells the OpenGL driver to send all pending commands to the GPU immediately, and then blocks until the effects of those commands have been completed on the GPU. Since this is a costly method it should be only called when really needed.

See Also
  • {@link GLState#flush()}, {@link RenderTexture#end(GLState, boolean, boolean)}.

public void flush ()

Tells the OpenGL driver to send all pending commands to the GPU immediately.

See Also
  • {@link GLState#finish()}, {@link RenderTexture#end(GLState, boolean, boolean)}.

public int generateArrayBuffer (int pSize, int pUsage)

public int generateBuffer ()

public int generateFramebuffer ()

public int generateIndexBuffer (int pSize, int pUsage)

public int generateTexture ()

public int getActiveFramebuffer ()

public int getActiveTexture ()

public int getError ()

public String getExtensions ()

public int getFramebufferStatus ()

public int getInteger (int pAttribute)

public int getMaximumFragmentShaderUniformVectorCount ()

public int getMaximumTextureSize ()

public int getMaximumTextureUnits ()

public int getMaximumVertexAttributeCount ()

public int getMaximumVertexShaderUniformVectorCount ()

public float[] getModelViewGLMatrix ()

public float[] getModelViewProjectionGLMatrix ()

public float[] getProjectionGLMatrix ()

public String getRenderer ()

public String getVersion ()

public void glTexImage2D (int pTarget, int pLevel, Bitmap pBitmap, int pBorder, PixelFormat pPixelFormat)

Note: does not pre-multiply the alpha channel!
Except that difference, same as: texSubImage2D(int, int, int, int, Bitmap, int, int)

See topic: 'PNG loading that doesn't premultiply alpha?'

public void glTexSubImage2D (int pTarget, int pLevel, int pX, int pY, Bitmap pBitmap, PixelFormat pPixelFormat)

Note: does not pre-multiply the alpha channel!
Except that difference, same as: texSubImage2D(int, int, int, int, Bitmap, int, int)

See topic: 'PNG loading that doesn't premultiply alpha?'

public boolean isTexture (int pHardwareTextureID)

public void lineWidth (float pLineWidth)

public void loadModelViewGLMatrixIdentity ()

public void loadProjectionGLMatrixIdentity ()

public void orthoModelViewGLMatrixf (float pLeft, float pRight, float pBottom, float pTop, float pZNear, float pZFar)

public void orthoProjectionGLMatrixf (float pLeft, float pRight, float pBottom, float pTop, float pZNear, float pZFar)

public void popModelViewGLMatrix ()

public void popProjectionGLMatrix ()

public void pushModelViewGLMatrix ()

public void pushProjectionGLMatrix ()

public void reset (RenderOptions pRenderOptions, ConfigChooser pConfigChooser, EGLConfig pEGLConfig)

public void resetGLMatrixStacks ()

public void resetModelViewGLMatrixStack ()

public void resetProjectionGLMatrixStack ()

public void rotateModelViewGLMatrixf (float pAngle, float pX, float pY, float pZ)

public void rotateProjectionGLMatrixf (float pAngle, float pX, float pY, float pZ)

public void scaleModelViewGLMatrixf (float pScaleX, float pScaleY, int pScaleZ)

public void scaleProjectionGLMatrixf (float pScaleX, float pScaleY, float pScaleZ)

public void skewModelViewGLMatrixf (float pSkewX, float pSkewY)

public void skewProjectionGLMatrixf (float pSkewX, float pSkewY)

public void translateModelViewGLMatrixf (float pX, float pY, float pZ)

public void translateProjectionGLMatrixf (float pX, float pY, float pZ)

public void useProgram (int pShaderProgramID)