C# Class NewTOAPIA.GL.Imaging.BinaryTextureProcessor

This class serves as a base class for all image processors that follow a particular pattern. That pattern is there is a single fragment shader that is executed across the entirety of the image. Grayscale conversion would be one example. I takes care of drawing into a Quad to ensure each texel of the source image is operated on. A subclasser need only supply the fragment shader string. This class will allocate a texture object based on the width and height specified and return that texture object to the caller during the ProcessImage() call.
Inheritance: GIObject, IBinaryTextureProcessor
Show file Open project: Wiladams/NewTOAPIA

Public Properties

Property Type Description
FixedFrag string
FixedVert string

Public Methods

Method Description
BinaryTextureProcessor ( GraphicsInterface gi, int width, int height ) : System
BinaryTextureProcessor ( GraphicsInterface gi, int width, int height, string fragmentString ) : System
CreateRenderTarget ( ) : GLRenderTarget
ProcessTwoTextures ( GLTexture2D baseTexture, GLTexture2D blendTexture ) : GLTexture2D

Peform conversion to grayscale

Protected Methods

Method Description
BindRenderTarget ( ) : void
BindShaderProgram ( ) : void
BindTexture ( GLTextureUnit aUnit, GLTexture aTexture ) : void
BindTextures ( ) : void
CreateOutputTexture ( int width, int height ) : GLTexture2D
RenderGeometry ( ) : void
SetUniformVariables ( ) : void
UnbindRenderTarget ( ) : void
UnbindShaderProgram ( ) : void
UnbindTextures ( ) : void

Method Details

BinaryTextureProcessor() public method

public BinaryTextureProcessor ( GraphicsInterface gi, int width, int height ) : System
gi GraphicsInterface
width int
height int
return System

BinaryTextureProcessor() public method

public BinaryTextureProcessor ( GraphicsInterface gi, int width, int height, string fragmentString ) : System
gi GraphicsInterface
width int
height int
fragmentString string
return System

BindRenderTarget() protected method

protected BindRenderTarget ( ) : void
return void

BindShaderProgram() protected method

protected BindShaderProgram ( ) : void
return void

BindTexture() protected method

protected BindTexture ( GLTextureUnit aUnit, GLTexture aTexture ) : void
aUnit GLTextureUnit
aTexture GLTexture
return void

BindTextures() protected method

protected BindTextures ( ) : void
return void

CreateOutputTexture() protected method

protected CreateOutputTexture ( int width, int height ) : GLTexture2D
width int
height int
return GLTexture2D

CreateRenderTarget() public method

public CreateRenderTarget ( ) : GLRenderTarget
return GLRenderTarget

ProcessTwoTextures() public method

Peform conversion to grayscale
public ProcessTwoTextures ( GLTexture2D baseTexture, GLTexture2D blendTexture ) : GLTexture2D
baseTexture GLTexture2D
blendTexture GLTexture2D
return GLTexture2D

RenderGeometry() protected method

protected RenderGeometry ( ) : void
return void

SetUniformVariables() protected method

protected SetUniformVariables ( ) : void
return void

UnbindRenderTarget() protected method

protected UnbindRenderTarget ( ) : void
return void

UnbindShaderProgram() protected method

protected UnbindShaderProgram ( ) : void
return void

UnbindTextures() protected method

protected UnbindTextures ( ) : void
return void

Property Details

FixedFrag public static property

This string represents a fragment shader that is a pass-through when you have a texture object.
public static string FixedFrag
return string

FixedVert public static property

public static string FixedVert
return string