r_program.h File Reference

#include "r_gl.h"
Include dependency graph for r_program.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  r_shader_s
struct  r_progvar_s
struct  r_program_s

Defines

#define GL_UNIFORM   1
#define GL_ATTRIBUTE   2
#define MAX_PROGRAM_VARS   32
#define MAX_PROGRAMS   16
#define MAX_SHADERS   MAX_PROGRAMS * 2

Typedefs

typedef struct r_shader_s r_shader_t
typedef struct r_progvar_s r_progvar_t
typedef struct r_program_s r_program_t

Functions

void R_UseProgram (r_program_t *prog)
void R_ShutdownPrograms (void)
void R_InitPrograms (void)
void R_AttributePointer (const char *name, GLuint size, const GLvoid *array)
void R_EnableAttribute (const char *name)
void R_DisableAttribute (const char *name)
void R_ProgramParameter1f (const char *name, GLfloat value)
void R_ProgramParameter1fvs (const char *name, GLint size, GLfloat *value)
void R_ProgramParameter1i (const char *name, GLint value)
void R_ProgramParameter2fv (const char *name, GLfloat *value)
void R_ProgramParameter2fvs (const char *name, GLint size, GLfloat *value)
void R_ProgramParameter3fv (const char *name, GLfloat *value)
void R_ProgramParameter4fv (const char *name, GLfloat *value)
void R_InitParticleProgram (r_program_t *prog)
void R_UseParticleProgram (r_program_t *prog)
r_program_tR_LoadProgram (const char *name, void *init, void *use)
void R_RestartPrograms_f (void)
 Reloads the glsl shaders.

Define Documentation

#define GL_ATTRIBUTE   2

Definition at line 35 of file r_program.h.

Referenced by R_AttributePointer(), R_DisableAttribute(), and R_EnableAttribute().

#define GL_UNIFORM   1
#define MAX_PROGRAM_VARS   32

Definition at line 45 of file r_program.h.

Referenced by R_ProgramVariable().

#define MAX_PROGRAMS   16

Definition at line 59 of file r_program.h.

Referenced by R_LoadProgram(), and R_ShutdownPrograms().

#define MAX_SHADERS   MAX_PROGRAMS * 2

Definition at line 60 of file r_program.h.

Referenced by R_LoadShader().


Typedef Documentation

typedef struct r_program_s r_program_t
typedef struct r_progvar_s r_progvar_t
typedef struct r_shader_s r_shader_t

Function Documentation

void R_AttributePointer ( const char *  name,
GLuint  size,
const GLvoid *  array 
)

pass file-line numbers for debugging

Definition at line 211 of file r_program.c.

References GL_ATTRIBUTE, r_progvar_s::location, and R_ProgramVariable().

Referenced by R_BindArray().

void R_DisableAttribute ( const char *  name  ) 
void R_EnableAttribute ( const char *  name  ) 
void R_InitParticleProgram ( r_program_t prog  ) 

Definition at line 794 of file r_program.c.

References R_ProgramParameter1i().

Referenced by CL_ParseMapParticle(), and CL_ParticleFunction().

void R_InitPrograms ( void   ) 
r_program_t* R_LoadProgram ( const char *  name,
void *  init,
void *  use 
)
void R_ProgramParameter1f ( const char *  name,
GLfloat  value 
)
void R_ProgramParameter1fvs ( const char *  name,
GLint  size,
GLfloat *  value 
)

Definition at line 141 of file r_program.c.

References GL_UNIFORM, r_progvar_s::location, and R_ProgramVariable().

Referenced by R_InitConvolveProgram().

void R_ProgramParameter1i ( const char *  name,
GLint  value 
)
void R_ProgramParameter2fv ( const char *  name,
GLfloat *  value 
)
void R_ProgramParameter2fvs ( const char *  name,
GLint  size,
GLfloat *  value 
)

Definition at line 169 of file r_program.c.

References GL_UNIFORM, r_progvar_s::location, and R_ProgramVariable().

Referenced by R_UseConvolveProgram().

void R_ProgramParameter3fv ( const char *  name,
GLfloat *  value 
)

Definition at line 183 of file r_program.c.

References GL_UNIFORM, r_progvar_s::location, and R_ProgramVariable().

void R_ProgramParameter4fv ( const char *  name,
GLfloat *  value 
)
void R_RestartPrograms_f ( void   ) 

Reloads the glsl shaders.

Definition at line 833 of file r_program.c.

References Com_Printf(), R_InitPrograms(), and R_ShutdownPrograms().

Referenced by R_BeginFrame().

void R_ShutdownPrograms ( void   ) 
void R_UseParticleProgram ( r_program_t prog  ) 

Definition at line 799 of file r_program.c.

Referenced by CL_ParseMapParticle(), and CL_ParticleFunction().

void R_UseProgram ( r_program_t prog  ) 

Generated by  doxygen 1.6.2