|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproject.android.imageprocessing.GLRenderer
public abstract class GLRenderer
The base renderer class that all inputs, filters and endpoints must extend.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_POSITION
|
static java.lang.String |
ATTRIBUTE_TEXCOORD
|
static java.lang.String |
UNIFORM_TEXTURE0
|
static java.lang.String |
VARYING_TEXCOORD
|
Constructor Summary | |
---|---|
GLRenderer()
|
Method Summary | |
---|---|
void |
destroy()
Cleans up the opengl objects for this renderer. |
float |
getBackgroundAlpha()
Returns the alpha component of the background colour currently set for this GLRenderer. |
float |
getBackgroundBlue()
Returns the blue component of the background colour currently set for this GLRenderer. |
float |
getBackgroundGreen()
Returns the green component of the background colour currently set for this GLRenderer. |
float |
getBackgroundRed()
Returns the red component of the background colour currently set for this GLRenderer. |
int |
getHeight()
Returns the current height the GLRenderer is rendering at. |
int |
getWidth()
Returns the current width the GLRenderer is rendering at. |
void |
onDrawFrame()
Draws the given texture using OpenGL and the given vertex and fragment shaders. |
void |
reInitialize()
Re-initializes the filter on the next drawing pass. |
void |
rotateClockwise90Degrees(int numOfTimes)
Rotates the renderer clockwise by 90 degrees a given number of times. |
void |
rotateCounterClockwise90Degrees(int numOfTimes)
Rotates the renderer counter-clockwise by 90 degrees a given number of times. |
void |
setBackgroundAlpha(float alpha)
Sets only the alpha component of the background colour currently set for this GLRenderer. |
void |
setBackgroundBlue(float blue)
Sets only the blue component of the background colour currently set for this GLRenderer. |
void |
setBackgroundColour(float red,
float green,
float blue,
float alpha)
Sets the background colour for this GLRenderer to the given colour in rgba space. |
void |
setBackgroundGreen(float green)
Sets only the green component of the background colour currently set for this GLRenderer. |
void |
setBackgroundRed(float red)
Sets only the red component of the background colour currently set for this GLRenderer. |
void |
setRenderSize(int width,
int height)
Sets the render size of the renderer to the given width and height. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ATTRIBUTE_POSITION
public static final java.lang.String ATTRIBUTE_TEXCOORD
public static final java.lang.String VARYING_TEXCOORD
public static final java.lang.String UNIFORM_TEXTURE0
Constructor Detail |
---|
public GLRenderer()
Method Detail |
---|
public int getWidth()
public int getHeight()
public void rotateClockwise90Degrees(int numOfTimes)
numOfTimes
- The number of times this renderer should be rotated clockwise by 90 degrees.public void rotateCounterClockwise90Degrees(int numOfTimes)
numOfTimes
- The number of times this renderer should be rotated counter-clockwise by 90 degrees.public void setRenderSize(int width, int height)
width
- The width at which the renderer should draw at.height
- The height at which the renderer should draw at.public void reInitialize()
public void onDrawFrame()
FastImageProcessingPipeline
or other filters
and should not be called manually.
public void destroy()
FastImageProcessingPipeline
.
public void setBackgroundColour(float red, float green, float blue, float alpha)
red
- The red component of the colour.green
- The green component of the colour.blue
- The blue component of the colour.alpha
- The alpha component of the colour.public float getBackgroundRed()
public void setBackgroundRed(float red)
red
- The red component to set as the background colour.public float getBackgroundGreen()
public void setBackgroundGreen(float green)
green
- The green component to set as the background colour.public float getBackgroundBlue()
public void setBackgroundBlue(float blue)
blue
- The blue component to set as the background colour.public float getBackgroundAlpha()
public void setBackgroundAlpha(float alpha)
alpha
- The alpha component to set as the background colour.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |