#include "r_gl.h"
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_t * | R_LoadProgram (const char *name, void *init, void *use) |
void | R_RestartPrograms_f (void) |
Reloads the glsl shaders. |
#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 |
Definition at line 34 of file r_program.h.
Referenced by R_ProgramParameter1f(), R_ProgramParameter1fvs(), R_ProgramParameter1i(), R_ProgramParameter2fv(), R_ProgramParameter2fvs(), R_ProgramParameter3fv(), R_ProgramParameter4fv(), and R_ProgramVariable().
#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 struct r_program_s r_program_t |
typedef struct r_progvar_s r_progvar_t |
typedef struct r_shader_s r_shader_t |
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 | ) |
Definition at line 239 of file r_program.c.
References GL_ATTRIBUTE, r_progvar_s::location, and R_ProgramVariable().
Referenced by R_EnableAnimation(), R_EnableBumpmap(), and R_EnableDynamicLights().
void R_EnableAttribute | ( | const char * | name | ) |
Definition at line 225 of file r_program.c.
References GL_ATTRIBUTE, r_progvar_s::location, and R_ProgramVariable().
Referenced by R_EnableAnimation(), R_EnableBumpmap(), and R_EnableDynamicLights().
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 | ) |
Definition at line 804 of file r_program.c.
References rstate_t::atmosphere_program, Com_Printf(), rstate_t::combine2_program, rstate_t::convolve_program, Cvar_Set(), DOUBLEQUOTE, FILTER_SIZE, rstate_t::geoscape_program, cvar_s::integer, cvar_s::modified, rstate_t::programs, qfalse, R_InitAtmosphereProgram(), R_InitCombine2Program(), R_InitConvolveProgram(), R_InitGeoscapeProgram(), R_InitSimpleGlowProgram(), R_InitWarpProgram(), R_InitWorldProgram(), R_LoadProgram(), r_programs, r_state, R_UseConvolveProgram(), R_UseWarpProgram(), R_UseWorldProgram(), rstate_t::shaders, rstate_t::simple_glow_program, rstate_t::warp_program, and rstate_t::world_program.
Referenced by R_Init(), and R_RestartPrograms_f().
r_program_t* R_LoadProgram | ( | const char * | name, | |
void * | init, | |||
void * | use | |||
) |
Definition at line 579 of file r_program.c.
References Com_Printf(), r_program_s::f, i, r_shader_s::id, r_program_s::id, r_program_s::init, MAX_PROGRAMS, MAX_STRING_CHARS, r_program_s::name, rstate_t::programs, Q_strncpyz(), R_LoadShader(), R_ShutdownProgram(), r_state, R_UseProgram(), r_program_s::use, r_program_s::v, and va().
Referenced by CL_ParseMapParticle(), CL_ParticleFunction(), and R_InitPrograms().
void R_ProgramParameter1f | ( | const char * | name, | |
GLfloat | value | |||
) |
Definition at line 127 of file r_program.c.
References GL_UNIFORM, r_progvar_s::location, and R_ProgramVariable().
Referenced by R_EnableAnimation(), R_EnableBumpmap(), R_EnableDynamicLights(), R_EnableGlowMap(), R_EnableShell(), R_InitSimpleGlowProgram(), R_InitWarpProgram(), R_InitWorldProgram(), R_SphereShadeGLSL(), R_StageGlow(), and R_UseMaterial().
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 | |||
) |
Definition at line 113 of file r_program.c.
References GL_UNIFORM, r_progvar_s::location, and R_ProgramVariable().
Referenced by R_EnableAnimation(), R_EnableBumpmap(), R_EnableDynamicLights(), R_EnableRoughnessMap(), R_EnableSpecularMap(), R_InitAtmosphereProgram(), R_InitCombine2Program(), R_InitConvolveProgram(), R_InitGeoscapeProgram(), R_InitParticleProgram(), R_InitSimpleGlowProgram(), R_InitWarpProgram(), and R_InitWorldProgram().
void R_ProgramParameter2fv | ( | const char * | name, | |
GLfloat * | value | |||
) |
Definition at line 155 of file r_program.c.
References GL_UNIFORM, r_progvar_s::location, and R_ProgramVariable().
Referenced by R_InitAtmosphereProgram(), and R_InitGeoscapeProgram().
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 | |||
) |
Definition at line 197 of file r_program.c.
References GL_UNIFORM, r_progvar_s::location, and R_ProgramVariable().
Referenced by R_InitAtmosphereProgram(), R_InitCombine2Program(), R_InitGeoscapeProgram(), R_InitWarpProgram(), and R_UseWarpProgram().
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 | ) |
Definition at line 274 of file r_program.c.
References i, r_program_s::id, cvar_s::integer, MAX_PROGRAMS, rstate_t::programs, r_programs, R_ShutdownProgram(), and r_state.
Referenced by R_RestartPrograms_f(), and R_Shutdown().
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 | ) |
Definition at line 35 of file r_program.c.
References rstate_t::active_program, r_program_s::id, r_state, and r_program_s::use.
Referenced by R_BlurStack(), R_DrawBloom(), R_DrawParticles(), R_EnableBlur(), R_EnableGlowMap(), R_EnableLighting(), R_EnableWarp(), and R_LoadProgram().