public class

GLHelper

extends Object
java.lang.Object
   ↳ org.anddev.andengine.opengl.util.GLHelper

Class Overview

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

Summary

Constants
int BYTES_PER_FLOAT
int BYTES_PER_PIXEL_RGBA
Fields
public static boolean EXTENSIONS_DRAWTEXTURE
public static boolean EXTENSIONS_TEXTURE_NON_POWER_OF_TWO
public static boolean EXTENSIONS_VERTEXBUFFEROBJECTS
Public Constructors
GLHelper()
Public Methods
static void bindBuffer(GL11 pGL11, int pHardwareBufferID)
static void bindTexture(GL10 pGL, int pHardwareTextureID)
static void blendFunction(GL10 pGL, int pSourceBlendMode, int pDestinationBlendMode)
static void bufferData(GL11 pGL11, ByteBuffer pByteBuffer, int pUsage)
static void checkGLError(GL10 pGL)
static void deleteBuffer(GL11 pGL11, int pHardwareBufferID)
static void deleteTexture(GL10 pGL, int pHardwareTextureID)
static void disableBlend(GL10 pGL)
static void disableCulling(GL10 pGL)
static void disableDepthTest(GL10 pGL)
static void disableDither(GL10 pGL)
static void disableLightning(GL10 pGL)
static void disableMultisample(GL10 pGL)
static void disableScissorTest(GL10 pGL)
static void disableTexCoordArray(GL10 pGL)
static void disableTextures(GL10 pGL)
static void disableVertexArray(GL10 pGL)
static void enableBlend(GL10 pGL)
static void enableCulling(GL10 pGL)
static void enableDepthTest(GL10 pGL)
static void enableDither(GL10 pGL)
static void enableExtensions(GL10 pGL, RenderOptions pRenderOptions)
static void enableLightning(GL10 pGL)
static void enableMultisample(GL10 pGL)
static void enableScissorTest(GL10 pGL)
static void enableTexCoordArray(GL10 pGL)
static void enableTextures(GL10 pGL)
static void enableVertexArray(GL10 pGL)
static void forceBindTexture(GL10 pGL, int pHardwareTextureID)
static int[] getPixelsARGB_8888(Bitmap pBitmap)
static void glTexImage2D(GL10 pGL, int pTarget, int pLevel, Bitmap pBitmap, int pBorder, Texture.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?'
static void glTexSubImage2D(GL10 pGL, int pTarget, int pLevel, int pXOffset, int pYOffset, Bitmap pBitmap, Texture.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?'
static void lineWidth(GL10 pGL, float pLineWidth)
static void reset(GL10 pGL)
static void setColor(GL10 pGL, float pRed, float pGreen, float pBlue, float pAlpha)
static void setModelViewIdentityMatrix(GL10 pGL)
static void setPerspectiveCorrectionHintFastest(GL10 pGL)
static void setProjectionIdentityMatrix(GL10 pGL)
static void setShadeModelFlat(GL10 pGL)
static void switchToModelViewMatrix(GL10 pGL)
static void switchToProjectionMatrix(GL10 pGL)
static void texCoordPointer(GL10 pGL, FastFloatBuffer pTextureFloatBuffer)
static void texCoordZeroPointer(GL11 pGL11)
static void vertexPointer(GL10 pGL, FastFloatBuffer pVertexFloatBuffer)
static void vertexZeroPointer(GL11 pGL11)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int BYTES_PER_FLOAT

Constant Value: 4 (0x00000004)

public static final int BYTES_PER_PIXEL_RGBA

Constant Value: 4 (0x00000004)

Fields

public static boolean EXTENSIONS_DRAWTEXTURE

public static boolean EXTENSIONS_TEXTURE_NON_POWER_OF_TWO

public static boolean EXTENSIONS_VERTEXBUFFEROBJECTS

Public Constructors

public GLHelper ()

Public Methods

public static void bindBuffer (GL11 pGL11, int pHardwareBufferID)

public static void bindTexture (GL10 pGL, int pHardwareTextureID)

See Also
  • {@link GLHelper#forceBindTexture(GL10, int)}

public static void blendFunction (GL10 pGL, int pSourceBlendMode, int pDestinationBlendMode)

public static void bufferData (GL11 pGL11, ByteBuffer pByteBuffer, int pUsage)

public static void checkGLError (GL10 pGL)

Throws
GLException

public static void deleteBuffer (GL11 pGL11, int pHardwareBufferID)

public static void deleteTexture (GL10 pGL, int pHardwareTextureID)

public static void disableBlend (GL10 pGL)

public static void disableCulling (GL10 pGL)

public static void disableDepthTest (GL10 pGL)

public static void disableDither (GL10 pGL)

public static void disableLightning (GL10 pGL)

public static void disableMultisample (GL10 pGL)

public static void disableScissorTest (GL10 pGL)

public static void disableTexCoordArray (GL10 pGL)

public static void disableTextures (GL10 pGL)

public static void disableVertexArray (GL10 pGL)

public static void enableBlend (GL10 pGL)

public static void enableCulling (GL10 pGL)

public static void enableDepthTest (GL10 pGL)

public static void enableDither (GL10 pGL)

public static void enableExtensions (GL10 pGL, RenderOptions pRenderOptions)

public static void enableLightning (GL10 pGL)

public static void enableMultisample (GL10 pGL)

public static void enableScissorTest (GL10 pGL)

public static void enableTexCoordArray (GL10 pGL)

public static void enableTextures (GL10 pGL)

public static void enableVertexArray (GL10 pGL)

public static void forceBindTexture (GL10 pGL, int pHardwareTextureID)

See Also
  • {@link GLHelper#bindTexture(GL10, int)}

public static int[] getPixelsARGB_8888 (Bitmap pBitmap)

public static void glTexImage2D (GL10 pGL, int pTarget, int pLevel, Bitmap pBitmap, int pBorder, Texture.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 static void glTexSubImage2D (GL10 pGL, int pTarget, int pLevel, int pXOffset, int pYOffset, Bitmap pBitmap, Texture.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 static void lineWidth (GL10 pGL, float pLineWidth)

public static void reset (GL10 pGL)

public static void setColor (GL10 pGL, float pRed, float pGreen, float pBlue, float pAlpha)

public static void setModelViewIdentityMatrix (GL10 pGL)

public static void setPerspectiveCorrectionHintFastest (GL10 pGL)

public static void setProjectionIdentityMatrix (GL10 pGL)

public static void setShadeModelFlat (GL10 pGL)

public static void switchToModelViewMatrix (GL10 pGL)

public static void switchToProjectionMatrix (GL10 pGL)

public static void texCoordPointer (GL10 pGL, FastFloatBuffer pTextureFloatBuffer)

public static void texCoordZeroPointer (GL11 pGL11)

public static void vertexPointer (GL10 pGL, FastFloatBuffer pVertexFloatBuffer)

public static void vertexZeroPointer (GL11 pGL11)