28 #include "../../shared/cxx.h" 41 #define SKYBOX_DEPTH -9999.0f 44 #define GL_ARRAY_LENGTH_CHUNK 4096 48 typedef struct gltexunit_s {
58 #define MAX_GL_TEXUNITS 6 61 #define texunit_0 r_state.texunits[0] 62 #define texunit_1 r_state.texunits[1] 63 #define texunit_2 r_state.texunits[2] 64 #define texunit_3 r_state.texunits[3] 65 #define texunit_4 r_state.texunits[4] 66 #define texunit_5 r_state.texunits[5] 68 #define texunit_diffuse texunit_0 69 #define texunit_lightmap texunit_1 70 #define texunit_deluxemap texunit_2 71 #define texunit_normalmap texunit_3 72 #define texunit_glowmap texunit_4 73 #define texunit_specularmap texunit_5 74 #define texunit_roughnessmap texunit_2 76 #define COMPONENTS_VERTEX_ARRAY3D 3 77 #define COMPONENTS_VERTEX_ARRAY2D 2 78 #define COMPONENTS_COLOR_ARRAY 4 79 #define COMPONENTS_INDEX_ARRAY 1 80 #define COMPONENTS_NORMAL_ARRAY 3 81 #define COMPONENTS_TANGENT_ARRAY 4 82 #define COMPONENTS_TEXCOORD_ARRAY 2 84 #define DOWNSAMPLE_PASSES 5 85 #define DOWNSAMPLE_SCALE 2 87 #define fbo_screen nullptr 88 #define fbo_render r_state.renderBuffer 89 #define fbo_bloom0 r_state.bloomBuffer0 90 #define fbo_bloom1 r_state.bloomBuffer1 92 #define default_program nullptr 96 typedef struct rstate_s {
183 void R_BindTextureDebug(
int texnum,
const char* file,
int line,
const char*
function);
184 #define R_BindTexture(tn) R_BindTextureDebug(tn, __FILE__, __LINE__, __PRETTY_FUNCTION__) 210 void R_EnableAnimation(
const struct mAliasMesh_s* mesh,
float backlerp,
bool enable);
void R_EnableBlur(r_program_t *program, bool enable, r_framebuffer_t *source, r_framebuffer_t *dest, int dir)
void R_EnableShell(bool enable)
bool stencil_test_enabled
void R_BindArray(GLenum target, GLenum type, const void *array)
const struct image_s * active_normalmap
GLfloat * next_vertex_array_3d
QGL_EXTERN GLint GLenum type
void R_ReallocateStateArrays(int size)
Reallocate arrays of GL primitives if needed.
void R_EnableBumpmap(const struct image_s *normalmap)
r_program_t * combine2_program
void R_EnableRoughnessMap(const struct image_s *image, bool enable)
r_framebuffer_t * renderBuffer
void R_SetDefaultState(void)
GLfloat * vertex_array_3d
bool dynamic_lighting_enabled
void R_EnableFog(bool enable)
void R_TexOverride(vec4_t rgba)
Sets special texture environment mode to override texture color; don't forget to call R_TexOverride(n...
bool roughnessmap_enabled
r_program_t * model_program
GLfloat * next_normal_array
bool R_EnableLighting(r_program_t *program, bool enable)
Enables hardware-accelerated lighting with the specified program. This should be called after any tex...
r_program_t * simple_glow_program
void R_EnableMultisample(bool enable)
void R_EnableDrawAsGlow(bool enable)
void R_BindDeluxemapTexture(GLuint texnum)
void R_EnableAnimation(const struct mAliasMesh_s *mesh, float backlerp, bool enable)
r_program_t * geoscape_program
const vec2_t default_texcoords[4]
#define DOWNSAMPLE_PASSES
r_program_t * convolve_program
gltexunit_t * active_texunit
void R_TexEnv(GLenum value)
void R_SetupSpotLight(int index, const light_t *light)
r_framebuffer_t * bloomBuffer1
void R_EnableTexture(gltexunit_t *texunit, bool enable)
void R_EnableBlend(bool enable)
void R_BindTextureDebug(int texnum, const char *file, int line, const char *function)
bool frameBufferObjectsInitialized
void R_BindBuffer(GLenum target, GLenum type, GLuint id)
void R_UseMaterial(const material_t *material)
QGL_EXTERN GLenum GLuint * dest
bool R_SelectTexture(gltexunit_t *texunit)
Returns false if the texunit is not supported.
r_program_t * active_program
QGL_EXTERN const GLuint *QGL_EXTERN GLuint *QGL_EXTERN GLenum
void R_EnableAlphaTest(bool enable)
bool renderbuffer_enabled
void R_EnableStencilTest(bool enable)
const material_t * active_material
void R_BindLightmapTexture(GLuint texnum)
r_program_t * world_program
GLfloat * next_tangent_array
void R_BlendFunc(GLenum src, GLenum dest)
texunits maintain multitexture state
void R_EnableGlowMap(const struct image_s *image)
r_program_t * warp_program
r_program_t * atmosphere_program
void R_DisableSpotLight(int index)
GLshort * vertex_array_2d
const r_framebuffer_t * activeFramebuffer
void R_EnableWarp(r_program_t *program, bool enable)
void R_EnableSpecularMap(const struct image_s *image, bool enable)
void R_ReallocateTexunitArray(gltexunit_t *texunit, int size)
Reallocate texcoord array of the specified texunit, if needed.
void R_BindDefaultArray(GLenum target)
Binds the appropriate shared vertex array to the specified target.
r_framebuffer_t * bloomBuffer0
void R_EnableColorArray(bool enable)
void R_BindNormalmapTexture(GLuint texnum)
void R_BindTextureForTexUnit(GLuint texnum, gltexunit_t *texunit)
Header file for the render material subsystem.