FragmentProgram Class Reference

Represents a Cg Fragment Shader for GPGPU. More...

#include <FragmentProgram.h>

List of all members.

Public Member Functions

 FragmentProgram (CGcontext fContext, CGprofile fProfile)
 Constructor 1.
 FragmentProgram (CGcontext fContext, CGprofile fProfile, char *FPname, GLuint texName, bool programInFile)
 Constructor 2.
 ~FragmentProgram ()
 Destructor.
void init (char *programSource)
 Initialize Shader from program source.
void activate ()
 Activate the Shader.
void bindTexture (GLuint texID)
 Bind Input Texture.
void bind ()
 Bind the Shader.
void deactivate ()
 Deactivate the Shader.
void getKernelParams ()
 Get Handle for parameters.
void setParams (int n, float *kernel1, float *kernel2, float offset)
 Set the parameters.

Public Attributes

CGprogram _FP
 The Fragment Program.
CGparameter _FPtexture1
 Some more CG parameters handles.
CGparameter _FPtexture2
 Some more CG Parameter handles.

Protected Attributes

bool _running
 Flag indicates program state.
CGparameter _FPoffset
 CG Parameter Handles used by different fragment shaders.
CGprofile _FPprofile
 CG Fragment Program Profile.
CGcontext _FPcontext
 CG Program Context.
GLuint _inputTextureID
 Current Input Texture Id.


Detailed Description

Represents a Cg Fragment Shader for GPGPU.

Provides an abstraction for the functionality provided by the CG Fragment Shader


Constructor & Destructor Documentation

FragmentProgram::FragmentProgram CGcontext  fContext,
CGprofile  fProfile,
char *  FPsource,
GLuint  textureID,
bool  programInFile
 

Constructor 2.

Parameters:
fContext : CG Context obtained on startup
fProfile : CG Profile obtained on startup
FPsource : Fragment Shader CG Code.
textureID,: texture ID associated with this fragment program during initialization
programInFile : If true, indicates program is to be read from file.


Member Function Documentation

void FragmentProgram::bindTexture GLuint  texID  ) 
 

Bind Input Texture.

Parameters:
texID : texture ID

void FragmentProgram::init char *  programSource  ) 
 

Initialize Shader from program source.

Parameters:
programSource : Cg Fragment Shader source code

void FragmentProgram::setParams int  n,
float *  kernel1,
float *  kernel2,
float  offset
 

Set the parameters.

Parameters:
n : size of kernel footprint
kernel1,kernel2 : array of values
offset : not used any more ..


The documentation for this class was generated from the following files:
Generated on Sat Apr 15 01:22:18 2006 for GpuVis by  doxygen 1.4.6-NO