public class GPUImageFilter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
mGLAttribPosition |
protected int |
mGLAttribTextureCoordinate |
protected int |
mGLProgId |
protected int |
mGLUniformTexture |
protected int |
mImageHeight |
protected int |
mImageWidth |
protected boolean |
mIsInitialized |
protected int |
mOutputHeight |
protected int |
mOutputWidth |
protected int |
mTextureTarget |
static java.lang.String |
NO_FILTER_FRAGMENT_SHADER |
static java.lang.String |
NO_FILTER_VERTEX_SHADER |
| Constructor and Description |
|---|
GPUImageFilter() |
GPUImageFilter(java.lang.String vertexShader,
java.lang.String fragmentShader) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkTextureTypeUpdate(int target) |
static java.lang.String |
convertStreamToString(java.io.InputStream is) |
void |
destroy() |
int |
getAttribPosition() |
int |
getAttribTextureCoordinate() |
java.lang.String |
getFragmentShader() |
int |
getLastTextureID() |
OF_EffectInfo |
getOfEffectInfo() |
int |
getOutputHeight() |
int |
getOutputWidth() |
int |
getProgram() |
float |
getStickerEffectParam() |
int |
getUniformTexture() |
void |
init() |
void |
initForExternalTextureInput() |
void |
isAnimationTagExist(java.lang.String tag) |
boolean |
isInitialized() |
static java.lang.String |
loadShader(java.lang.String file,
android.content.Context context) |
void |
onBeautyParamChanged() |
void |
onDestroy() |
void |
onDraw(int textureId,
java.nio.FloatBuffer cubeBuffer,
java.nio.FloatBuffer textureBuffer,
int textureTarget,
float[] texMatrix,
boolean background) |
protected void |
onDrawArraysPre(int textureId,
java.nio.FloatBuffer cubeBuffer,
java.nio.FloatBuffer textureBuffer,
int textureTarget,
float[] texMatrix) |
void |
onImageSizeChanged(int width,
int height) |
void |
onInit() |
void |
onInitExt(boolean isForExternalTextureInput) |
void |
onInitialized() |
void |
onOutputSizeChanged(int width,
int height) |
void |
removeJoyPkEffectWithTag(java.lang.String tag) |
protected void |
runOnDraw(java.lang.Runnable runnable) |
protected void |
runPendingOnDrawTasks() |
void |
setBeauty5Effect(java.lang.String effectPath) |
void |
setBeautyParam(float beautyParam) |
void |
setEncodeSize(int width,
int height) |
void |
setFaceLiftValue(java.util.Map<java.lang.Integer,java.lang.Float> faceLiftValue) |
void |
setFaceLiftValueOpt(java.util.Map<java.lang.Integer,java.lang.Float> faceLiftValue) |
protected void |
setFloat(int location,
float floatValue) |
protected void |
setFloatArray(int location,
float[] arrayValue) |
protected void |
setFloatVec2(int location,
float[] arrayValue) |
protected void |
setFloatVec3(int location,
float[] arrayValue) |
protected void |
setFloatVec4(int location,
float[] arrayValue) |
void |
setFragmentShader(java.lang.String newShader) |
void |
setGiftEffect(java.lang.String filePath) |
void |
setGPUImageBeautyFilter(IGPUProcess gpuImageBeauty) |
protected void |
setInteger(int location,
int intValue) |
void |
setJoyPkEffect(java.lang.String filePath,
int index,
java.lang.String tag) |
void |
setLookupTablePath(java.lang.String effectPath) |
void |
setNewStickerEffect(java.lang.String stickerEffect,
java.lang.String stickerLutEffect) |
protected void |
setPoint(int location,
android.graphics.PointF point) |
void |
setStickerEffect(java.lang.String filePath) |
void |
setStickerEffectParam(float value) |
void |
setThinFaceParam(float value) |
protected void |
setUniformMatrix3f(int location,
float[] matrix) |
protected void |
setUniformMatrix4f(int location,
float[] matrix) |
void |
setWitnessFilterPath(java.lang.String effectPath) |
public static final java.lang.String NO_FILTER_VERTEX_SHADER
public static final java.lang.String NO_FILTER_FRAGMENT_SHADER
protected int mGLProgId
protected int mGLAttribPosition
protected int mGLUniformTexture
protected int mGLAttribTextureCoordinate
protected int mOutputWidth
protected int mOutputHeight
protected int mImageWidth
protected int mImageHeight
protected int mTextureTarget
protected boolean mIsInitialized
public GPUImageFilter()
public GPUImageFilter(java.lang.String vertexShader,
java.lang.String fragmentShader)
public final void init()
public java.lang.String getFragmentShader()
public void setFragmentShader(java.lang.String newShader)
public final void initForExternalTextureInput()
public void onInit()
public void onInitExt(boolean isForExternalTextureInput)
public void onInitialized()
public final void destroy()
public void onDestroy()
public void onOutputSizeChanged(int width,
int height)
public void checkTextureTypeUpdate(int target)
public void onImageSizeChanged(int width,
int height)
public int getLastTextureID()
public void onDraw(int textureId,
java.nio.FloatBuffer cubeBuffer,
java.nio.FloatBuffer textureBuffer,
int textureTarget,
float[] texMatrix,
boolean background)
protected void onDrawArraysPre(int textureId,
java.nio.FloatBuffer cubeBuffer,
java.nio.FloatBuffer textureBuffer,
int textureTarget,
float[] texMatrix)
protected void runPendingOnDrawTasks()
public boolean isInitialized()
public int getOutputWidth()
public int getOutputHeight()
public int getProgram()
public int getAttribPosition()
public int getAttribTextureCoordinate()
public int getUniformTexture()
protected void setInteger(int location,
int intValue)
protected void setFloat(int location,
float floatValue)
protected void setFloatVec2(int location,
float[] arrayValue)
protected void setFloatVec3(int location,
float[] arrayValue)
protected void setFloatVec4(int location,
float[] arrayValue)
protected void setFloatArray(int location,
float[] arrayValue)
protected void setPoint(int location,
android.graphics.PointF point)
protected void setUniformMatrix3f(int location,
float[] matrix)
protected void setUniformMatrix4f(int location,
float[] matrix)
protected void runOnDraw(java.lang.Runnable runnable)
public static java.lang.String loadShader(java.lang.String file,
android.content.Context context)
public static java.lang.String convertStreamToString(java.io.InputStream is)
public void setEncodeSize(int width,
int height)
public void setWitnessFilterPath(java.lang.String effectPath)
public void setLookupTablePath(java.lang.String effectPath)
public void setBeauty5Effect(java.lang.String effectPath)
public void setBeautyParam(float beautyParam)
public void setStickerEffect(java.lang.String filePath)
public void setNewStickerEffect(java.lang.String stickerEffect,
java.lang.String stickerLutEffect)
public void setGiftEffect(java.lang.String filePath)
public void setJoyPkEffect(java.lang.String filePath,
int index,
java.lang.String tag)
public void removeJoyPkEffectWithTag(java.lang.String tag)
public void isAnimationTagExist(java.lang.String tag)
public void setFaceLiftValue(java.util.Map<java.lang.Integer,java.lang.Float> faceLiftValue)
public void setFaceLiftValueOpt(java.util.Map<java.lang.Integer,java.lang.Float> faceLiftValue)
public void setThinFaceParam(float value)
public void setStickerEffectParam(float value)
public void onBeautyParamChanged()
public float getStickerEffectParam()
public OF_EffectInfo getOfEffectInfo()
public void setGPUImageBeautyFilter(IGPUProcess gpuImageBeauty)