#include <Kernel.h>
Public Member Functions | |
Kernel () | |
Constructor. | |
Kernel (CGcontext fContext, CGprofile fProfile, char *directory, char *FPname, bool programInFile) | |
Constructor : Kernel Processor Object (abstraction of stream processor). | |
void | setRange (int ranWidth, int ranHeight) |
Set Function Range ( 0 - ranWidth ) and ( 0 - ranHeight ). | |
void | activate () |
Enable this Kernel Processo. | |
void | deactivate () |
Disable this Kernel Processor. | |
void | bindInput (GLuint texID) |
Bind The Texture 'texID' as Input Stream. | |
void | execute (float Op_top, float Op_left, float Op_bot, float Op_right, float Ip_top, float Ip_left, float Ip_bot, float Ip_right) |
Render Output Quad Op(top,left,bot,right) within render target Quad (ranH,0,0,ranW)using Input Texture Ip( , , , ). | |
Public Attributes | |
FragmentProgram * | fProgram |
Fragment Program Object. | |
bool | swapNeeded |
If True (0,0) = Top-left, else Bot-left. | |
int | ranH |
Function Range (0 - ranW) X (0 - ranH ). |
This object represents a computation that is invoked locally over the image specified as texture. Computation is invoked by specifying Output Coordinates in the render target and also by specifying the input texture coordinates. Thus a Kernel represents a function that maps an input Quad Memory Block to an output Quad memory block.
In simplest GPGPU scenario, the Kernel can be set up to do 1-1 Pixel to Texel Mapping. By Setting the Range of the Function we can apply the kernel to a subset of the range and also specify a subset of the function domain by appropriately choosing texture coordinates.