FileDocCategorySizeDatePackage
RawTexture.javaAPI DocAndroid 5.1 API2018Thu Mar 12 22:22:42 GMT 2015com.android.gallery3d.glrenderer

RawTexture

public class RawTexture extends BasicTexture

Fields Summary
private static final String
TAG
private final boolean
mOpaque
private boolean
mIsFlipped
Constructors Summary
public RawTexture(int width, int height, boolean opaque)


           
        mOpaque = opaque;
        setSize(width, height);
    
Methods Summary
protected intgetTarget()

        return GL11.GL_TEXTURE_2D;
    
public booleanisFlippedVertically()

        return mIsFlipped;
    
public booleanisOpaque()

        return mOpaque;
    
protected booleanonBind(GLCanvas canvas)

        if (isLoaded()) return true;
        Log.w(TAG, "lost the content due to context change");
        return false;
    
protected voidprepare(GLCanvas canvas)

        GLId glId = canvas.getGLId();
        mId = glId.generateTexture();
        canvas.initializeTextureSize(this, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE);
        canvas.setTextureParameters(this);
        mState = STATE_LOADED;
        setAssociatedCanvas(canvas);
    
public voidsetIsFlippedVertically(boolean isFlipped)

        mIsFlipped = isFlipped;
    
public voidyield()

         // we cannot free the texture because we have no backup.