git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4613 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4deebba5ee
commit
a3d4e46edc
2 changed files with 7 additions and 6 deletions
|
@ -2132,7 +2132,8 @@ void CLQ1_DrawLine(shader_t *shader, vec3_t v1, vec3_t v2, float r, float g, flo
|
||||||
cl_numstrisvert += 2;
|
cl_numstrisvert += 2;
|
||||||
}
|
}
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
void CL_AddOrientedCube(float *normal, float dist, float r, float g, float b, qboolean enqueue)
|
//well, 8192
|
||||||
|
void CL_DrawDebugPlane(float *normal, float dist, float r, float g, float b, qboolean enqueue)
|
||||||
{
|
{
|
||||||
scenetris_t *t;
|
scenetris_t *t;
|
||||||
if (!enqueue)
|
if (!enqueue)
|
||||||
|
|
|
@ -796,7 +796,7 @@ void R_ObliqueNearClip(float *viewmat, mplane_t *wplane)
|
||||||
r_refdef.m_projection[14] = c[3];
|
r_refdef.m_projection[14] = c[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestDrawPlane(float *normal, float dist, float r, float g, float b, qboolean enqueue);
|
void CL_DrawDebugPlane(float *normal, float dist, float r, float g, float b, qboolean enqueue);
|
||||||
void GLR_DrawPortal(batch_t *batch, batch_t **blist, batch_t *depthmasklist[2], int portaltype)
|
void GLR_DrawPortal(batch_t *batch, batch_t **blist, batch_t *depthmasklist[2], int portaltype)
|
||||||
{
|
{
|
||||||
entity_t *view;
|
entity_t *view;
|
||||||
|
@ -1109,13 +1109,13 @@ void GLR_DrawPortal(batch_t *batch, batch_t **blist, batch_t *depthmasklist[2],
|
||||||
if (r_portaldrawplanes.ival)
|
if (r_portaldrawplanes.ival)
|
||||||
{
|
{
|
||||||
//the front of the plane should generally point away from the camera, and will be drawn in bright green. woo
|
//the front of the plane should generally point away from the camera, and will be drawn in bright green. woo
|
||||||
TestDrawPlane(plane.normal, plane.dist+0.01, 0.0, 0.5, 0.0, false);
|
CL_DrawDebugPlane(plane.normal, plane.dist+0.01, 0.0, 0.5, 0.0, false);
|
||||||
TestDrawPlane(plane.normal, plane.dist-0.01, 0.0, 0.5, 0.0, false);
|
CL_DrawDebugPlane(plane.normal, plane.dist-0.01, 0.0, 0.5, 0.0, false);
|
||||||
//the back of the plane points towards the camera, and will be drawn in blue, for the luls
|
//the back of the plane points towards the camera, and will be drawn in blue, for the luls
|
||||||
VectorNegate(plane.normal, plane.normal);
|
VectorNegate(plane.normal, plane.normal);
|
||||||
plane.dist *= -1;
|
plane.dist *= -1;
|
||||||
TestDrawPlane(plane.normal, plane.dist+0.01, 0.0, 0.0, 0.2, false);
|
CL_DrawDebugPlane(plane.normal, plane.dist+0.01, 0.0, 0.0, 0.2, false);
|
||||||
TestDrawPlane(plane.normal, plane.dist-0.01, 0.0, 0.0, 0.2, false);
|
CL_DrawDebugPlane(plane.normal, plane.dist-0.01, 0.0, 0.0, 0.2, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue