UFO: Alien Invasion
Loading...
Searching...
No Matches
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_t
struct  r_progvar_t
struct  r_program_t

Macros

#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 void(* programInitFunc_t) (struct r_program_s *prog)
typedef void(* programUseFunc_t) (struct r_program_s *prog)

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_ProgramParameter3fvs (const char *name, GLint size, GLfloat *value)
void R_ProgramParameter4fv (const char *name, GLfloat *value)
void R_ProgramParameter4fvs (const char *name, GLint size, GLfloat *value)
void R_ProgramParameterMatrix4fv (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, programInitFunc_t init, programUseFunc_t use)
void R_RestartPrograms_f (void)
 Reloads the glsl shaders.

Macro Definition Documentation

◆ GL_ATTRIBUTE

#define GL_ATTRIBUTE   2

Definition at line 36 of file r_program.h.

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

◆ GL_UNIFORM

◆ MAX_PROGRAM_VARS

#define MAX_PROGRAM_VARS   32

Definition at line 46 of file r_program.h.

Referenced by R_ProgramVariable().

◆ MAX_PROGRAMS

#define MAX_PROGRAMS   16

Definition at line 65 of file r_program.h.

Referenced by R_LoadProgram(), and R_ShutdownPrograms().

◆ MAX_SHADERS

#define MAX_SHADERS   MAX_PROGRAMS * 2

Definition at line 66 of file r_program.h.

Referenced by R_LoadShader().

Typedef Documentation

◆ programInitFunc_t

typedef void(* programInitFunc_t) (struct r_program_s *prog)

Definition at line 50 of file r_program.h.

◆ programUseFunc_t

typedef void(* programUseFunc_t) (struct r_program_s *prog)

Definition at line 51 of file r_program.h.

Function Documentation

◆ R_AttributePointer()

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

Definition at line 211 of file r_program.cpp.

References GL_ATTRIBUTE, GLuint, name, R_ProgramVariable(), and v.

Referenced by R_BindArray().

◆ R_DisableAttribute()

void R_DisableAttribute ( const char * name)

Definition at line 231 of file r_program.cpp.

References GL_ATTRIBUTE, name, R_ProgramVariable(), and v.

Referenced by R_EnableAnimation(), and R_EnableModelLights().

◆ R_EnableAttribute()

void R_EnableAttribute ( const char * name)

Definition at line 221 of file r_program.cpp.

References GL_ATTRIBUTE, name, R_ProgramVariable(), and v.

Referenced by R_EnableAnimation(), R_EnableModelLights(), and R_EnableWorldLights().

◆ R_InitParticleProgram()

void R_InitParticleProgram ( r_program_t * prog)

Definition at line 1012 of file r_program.cpp.

References R_ProgramParameter1i().

Referenced by CL_ParseMapParticle(), and CL_ParticleFunction().

◆ R_InitPrograms()

◆ R_LoadProgram()

◆ R_ProgramParameter1f()

◆ R_ProgramParameter1fvs()

void R_ProgramParameter1fvs ( const char * name,
GLint size,
GLfloat * value )

Definition at line 131 of file r_program.cpp.

References GL_UNIFORM, GLint, name, R_ProgramVariable(), and v.

Referenced by R_InitConvolveProgram().

◆ R_ProgramParameter1i()

◆ R_ProgramParameter2fv()

◆ R_ProgramParameter2fvs()

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

Definition at line 151 of file r_program.cpp.

References GL_UNIFORM, GLint, name, R_ProgramVariable(), and v.

Referenced by R_UseConvolveProgram().

◆ R_ProgramParameter3fv()

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

◆ R_ProgramParameter3fvs()

void R_ProgramParameter3fvs ( const char * name,
GLint size,
GLfloat * value )

Definition at line 171 of file r_program.cpp.

References GL_UNIFORM, GLint, name, R_ProgramVariable(), and v.

Referenced by R_EnableModelLights(), and R_EnableWorldLights().

◆ R_ProgramParameter4fv()

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

◆ R_ProgramParameter4fvs()

void R_ProgramParameter4fvs ( const char * name,
GLint size,
GLfloat * value )

Definition at line 191 of file r_program.cpp.

References GL_UNIFORM, GLint, name, R_ProgramVariable(), and v.

Referenced by R_EnableModelLights(), and R_EnableWorldLights().

◆ R_ProgramParameterMatrix4fv()

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

Definition at line 201 of file r_program.cpp.

References GL_UNIFORM, name, R_ProgramVariable(), and v.

◆ R_RestartPrograms_f()

void R_RestartPrograms_f ( void )

Reloads the glsl shaders.

Definition at line 1058 of file r_program.cpp.

References Com_Printf(), Cvar_Get(), R_InitFBObjects(), R_InitPrograms(), r_programs, and R_ShutdownPrograms().

Referenced by R_BeginFrame().

◆ R_ShutdownPrograms()

void R_ShutdownPrograms ( void )

◆ R_UseParticleProgram()

void R_UseParticleProgram ( r_program_t * prog)

Definition at line 1017 of file r_program.cpp.

Referenced by CL_ParseMapParticle(), and CL_ParticleFunction().

◆ R_UseProgram()