Property | Type | Description | |
---|---|---|---|
MarginX | float | ||
MarginY | float | ||
Mode | FragmentFilterMode | ||
OffsetX | float | ||
OffsetY | float | ||
Resolution | float |
Property | Type | Description | |
---|---|---|---|
NumPasses | int | ||
TexCoordsID | int | ||
VertexPosID | int |
Method | Description | |
---|---|---|
Cache ( ) : void |
Caches the filter output into a Texture. An uncached filter is rendered in every frame; a cached filter only once. However, if the filtered object or the filter settings change, it has to be updated manually; to do that, call "cache" again.
|
|
ClearCache ( ) : void |
Clears the cached output of the filter. After calling this method, the filter will be executed once per frame again.
|
|
RenderObject ( |
Applies the filter on a certain display object, rendering the output into the current render target. This method is called automatically by Sparrow's rendering system for the object the filter is attached to.
|
Method | Description | |
---|---|---|
ActivateWithPass ( int pass, |
Subclasses must override this method and use it to activate their shader program. The 'ActivateWithPass' call directly precedes the call to 'GL.DrawElements'.
|
|
CreatePrograms ( ) : void |
Subclasses must override this method and use it to create their fragment and vertex shaders.
|
|
DeactivateWithPass ( int pass, |
This method is called directly after 'GL.DrawElements'. If you need to clean up any resources, you can do so in this method
|
|
FragmentFilter ( int numPasses = 1, float resolution = 1.0f ) : System |
Initializes a fragment filter with the specified number of passes and resolution.
|
|
StandardFragmentShader ( ) : String |
The standard fragment shader code. It just forwards the texture color to the output.
|
|
StandardVertexShader ( ) : String |
The standard vertex shader code.
|
Method | Description | |
---|---|---|
CalcBounds ( |
||
CreateTexture ( int width, int height, float scale ) : |
||
DisposeCache ( ) : void | ||
DisposePassTextures ( ) : void | ||
PassTextureForPass ( int pass ) : |
||
RenderPasses ( |
||
UpdateBuffers ( |
||
UpdatePassTextures ( int width, int height, float scale ) : void |
protected abstract ActivateWithPass ( int pass, |
||
pass | int | |
texture | ||
mvpMatrix | Matrix | |
return | void |
protected DeactivateWithPass ( int pass, |
||
pass | int | |
texture | ||
return | void |
protected FragmentFilter ( int numPasses = 1, float resolution = 1.0f ) : System | ||
numPasses | int | |
resolution | float | |
return | System |
public RenderObject ( |
||
obj | ||
support | ||
return | void |
protected static StandardFragmentShader ( ) : String | ||
return | String |
protected static StandardVertexShader ( ) : String | ||
return | String |