Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

cgsh.h File Reference


Compounds

struct  _shaderlist

Defines

#define wglGetProcAddress(x)   glXGetProcAddressARB((const GLubyte *)(x))

Typedefs

typedef _shaderlist shaderlist

Functions

CGprogram getprogram (char type, const char *sfile, const char *sname)
void createCg ()
void destroyCg ()

Variables

CGcontext cgContext = NULL
CGprofile vProfile
CGprofile fProfile
shaderlistshlist

Define Documentation

#define wglGetProcAddress      glXGetProcAddressARB((const GLubyte *)(x))
 


Typedef Documentation

typedef struct _shaderlist shaderlist
 

linked list with loaded shaders


Function Documentation

void createCg  
 

Initialize Cg environment.

void destroyCg  
 

Quit Cg environment.

CGprogram getprogram char    type,
const char *    sfile,
const char *    sname
 

get program from shader list, loading it if not in memory

Parameters:
type type of shader ('f'=fragment, 'v'=vertex)
sfile name of file with shader
sname name of function within the file to be loaded


Variable Documentation

CGcontext cgContext = NULL
 

CGprofile fProfile
 

shaderlist* shlist
 

list of shaders in application

CGprofile vProfile