shaders.c File Reference

Go to the source code of this file.

Defines

#define __gl2_main_
#define N_PROGRAMS_MAX   30
#define nPrograms   8

Functions

void ShadersInitTour (char *root)
void ShadersInit (char *root, BOOL preview)
int LoadAndCompileShader (char *name)
void UnloadCompiledShader (int id)
void UseSingleShaderProgram (long id)
void UseShaderProgram (long id)
void UnloadShaders (void)
void SetUniformInteger (int id, char *name, GLint val)
void SetUniformVariable (int id, char *name, GLfloat val)
void SetUniformVector (int id, char *name, GLfloat a, GLfloat b, GLfloat c)
void SetUniformVector2 (int id, char *name, GLfloat a, GLfloat b)
void SetUniformMatrix3 (int id, char *name, GLfloat m[3][3])
void SetUniformMatrix4 (int id, char *name, GLfloat m[4][4])
void SetAttributeInteger (int id, char *name, GLshort val)
void SetAttributeVariable (int id, char *name, GLfloat val)
void SetAttributeVector (int id, char *name, GLfloat a, GLfloat b, GLfloat c)
void BindAttributeVector (int id, char *name, int loc)
void SetAttributeVectorID (int id, int loc, GLfloat a, GLfloat b, GLfloat c)
GLint GetAttibuteLocation (int id, char *name)


Define Documentation

#define __gl2_main_

Definition at line 15 of file shaders.c.

#define N_PROGRAMS_MAX   30

Definition at line 20 of file shaders.c.

Referenced by ShadersInit().

#define nPrograms   8

Definition at line 26 of file shaders.c.

Referenced by ShadersInit(), and UnloadShaders().


Function Documentation

void ShadersInitTour ( char *  root  ) 

Definition at line 35 of file shaders.c.

References FALSE, ShadersInit(), and TRUE.

void ShadersInit ( char *  root,
BOOL  preview 
)

Definition at line 40 of file shaders.c.

References FALSE, N_PROGRAMS_MAX, nPrograms, and TRUE.

int LoadAndCompileShader ( char *  name  ) 

Definition at line 94 of file shaders.c.

References FALSE, and TRUE.

void UnloadCompiledShader ( int  id  ) 

Definition at line 129 of file shaders.c.

References FALSE.

void UseSingleShaderProgram ( long  id  ) 

Definition at line 137 of file shaders.c.

void UseShaderProgram ( long  id  ) 

Definition at line 143 of file shaders.c.

Referenced by DrawExternalMaterialPolys(), and Make3dDisplayListProg().

void UnloadShaders ( void   ) 

Definition at line 149 of file shaders.c.

References FALSE, and nPrograms.

Referenced by CloseGlWindow().

void SetUniformInteger ( int  id,
char *  name,
GLint  val 
)

Definition at line 160 of file shaders.c.

void SetUniformVariable ( int  id,
char *  name,
GLfloat  val 
)

Definition at line 169 of file shaders.c.

void SetUniformVector ( int  id,
char *  name,
GLfloat  a,
GLfloat  b,
GLfloat  c 
)

Definition at line 177 of file shaders.c.

void SetUniformVector2 ( int  id,
char *  name,
GLfloat  a,
GLfloat  b 
)

Definition at line 185 of file shaders.c.

void SetUniformMatrix3 ( int  id,
char *  name,
GLfloat  m[3][3] 
)

Definition at line 193 of file shaders.c.

References TRUE.

void SetUniformMatrix4 ( int  id,
char *  name,
GLfloat  m[4][4] 
)

Definition at line 203 of file shaders.c.

References TRUE.

void SetAttributeInteger ( int  id,
char *  name,
GLshort  val 
)

Definition at line 211 of file shaders.c.

void SetAttributeVariable ( int  id,
char *  name,
GLfloat  val 
)

Definition at line 219 of file shaders.c.

void SetAttributeVector ( int  id,
char *  name,
GLfloat  a,
GLfloat  b,
GLfloat  c 
)

Definition at line 227 of file shaders.c.

void BindAttributeVector ( int  id,
char *  name,
int  loc 
)

Definition at line 235 of file shaders.c.

void SetAttributeVectorID ( int  id,
int  loc,
GLfloat  a,
GLfloat  b,
GLfloat  c 
)

Definition at line 240 of file shaders.c.

GLint GetAttibuteLocation ( int  id,
char *  name 
)

Definition at line 245 of file shaders.c.


Generated on Sun Apr 27 14:20:17 2014 for OpenFX by  doxygen 1.5.6