summaryrefslogtreecommitdiff
path: root/src/renderer/tr_local.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/tr_local.h')
-rw-r--r--src/renderer/tr_local.h38
1 files changed, 32 insertions, 6 deletions
diff --git a/src/renderer/tr_local.h b/src/renderer/tr_local.h
index 76acb15e..b8d89af8 100644
--- a/src/renderer/tr_local.h
+++ b/src/renderer/tr_local.h
@@ -323,10 +323,12 @@ typedef struct {
struct shaderCommands_s;
-#define LIGHTMAP_2D -4 // shader is for 2D rendering
-#define LIGHTMAP_BY_VERTEX -3 // pre-lit triangle models
-#define LIGHTMAP_WHITEIMAGE -2
-#define LIGHTMAP_NONE -1
+// any change in the LIGHTMAP_* defines here MUST be reflected in
+// R_FindShader() in tr_bsp.c
+#define LIGHTMAP_2D -4 // shader is for 2D rendering
+#define LIGHTMAP_BY_VERTEX -3 // pre-lit triangle models
+#define LIGHTMAP_WHITEIMAGE -2
+#define LIGHTMAP_NONE -1
typedef enum {
CT_FRONT_SIDED,
@@ -434,6 +436,8 @@ typedef struct {
vec3_t vieworg;
vec3_t viewaxis[3]; // transformation matrix
+ stereoFrame_t stereoFrame;
+
int time; // time in milliseconds for shader effects and other time dependent rendering issues
int rdflags; // RDF_NOWORLDMODEL, etc
@@ -505,6 +509,7 @@ typedef struct {
cplane_t frustum[4];
vec3_t visBounds[2];
float zFar;
+ stereoFrame_t stereoFrame;
} viewParms_t;
@@ -990,11 +995,12 @@ extern cvar_t *r_verbose; // used for verbose debug spew
extern cvar_t *r_ignoreFastPath; // allows us to ignore our Tess fast paths
extern cvar_t *r_znear; // near Z clip plane
+extern cvar_t *r_zproj; // z distance of projection plane
+extern cvar_t *r_stereoSeparation; // separation of cameras for stereo rendering
extern cvar_t *r_stencilbits; // number of desired stencil bits
extern cvar_t *r_depthbits; // number of desired depth bits
extern cvar_t *r_colorbits; // number of desired color bits, only relevant for fullscreen
-extern cvar_t *r_stereo; // desired pixelformat stereo flag
extern cvar_t *r_texturebits; // number of desired texture bits
// 0 = use framebuffer depth
// 16 = use 16-bit textures
@@ -1085,6 +1091,11 @@ extern cvar_t *r_smp;
extern cvar_t *r_showSmp;
extern cvar_t *r_skipBackEnd;
+extern cvar_t *r_stereoEnabled;
+extern cvar_t *r_anaglyphMode;
+
+extern cvar_t *r_greyscale;
+
extern cvar_t *r_ignoreGLErrors;
extern cvar_t *r_overBrightBits;
@@ -1133,6 +1144,7 @@ int R_CullLocalBox (vec3_t bounds[2]);
int R_CullPointAndRadius( vec3_t origin, float radius );
int R_CullLocalPointAndRadius( vec3_t origin, float radius );
+void R_SetupProjection(viewParms_t *dest, float zProj, qboolean computeFrustum);
void R_RotateForEntity( const trRefEntity_t *ent, const viewParms_t *viewParms, orientationr_t *or );
/*
@@ -1611,6 +1623,18 @@ typedef struct {
qboolean motionJpeg;
} videoFrameCommand_t;
+typedef struct
+{
+ int commandId;
+
+ GLboolean rgba[4];
+} colorMaskCommand_t;
+
+typedef struct
+{
+ int commandId;
+} clearDepthCommand_t;
+
typedef enum {
RC_END_OF_LIST,
RC_SET_COLOR,
@@ -1619,7 +1643,9 @@ typedef enum {
RC_DRAW_BUFFER,
RC_SWAP_BUFFERS,
RC_SCREENSHOT,
- RC_VIDEOFRAME
+ RC_VIDEOFRAME,
+ RC_COLORMASK,
+ RC_CLEARDEPTH
} renderCommand_t;