clean up stuff a little

This commit is contained in:
Alug committed 2024-03-10 18:53:38 +01:00
1 parent 50ba93541d
commit 8ec7e23217
5 files changed
+20 -15

No files matched your search

+5 -12
View File
@@ -68,15 +68,10 @@
**
*/
#include <math.h>
#include "../v_video.h"
#include "hw_main.h"
#include "hw_clip.h"
#include "hw_glob.h"
#include "../r_state.h"
#include "../tables.h"
#include "r_opengl/r_opengl.h"
#include "../r_main.h" // for cv_fov
// clipping code moved to r_opengl.c, let me qoute the below comment "only r_opengl.c can use the base gl funcs as it turns out.."
#ifdef HAVE_SPHEREFRUSTRUM
static GLdouble viewMatrix[16];
@@ -84,15 +79,13 @@ static GLdouble projMatrix[16];
float frustum[6][4];
#endif
// SRB2CB I don't think used any of this stuff, let's disable for now since SRB2 probably doesn't want it either
// compiler complains about (p)glGetFloatv anyway, in case anyone wants this
// only r_opengl.c can use the base gl funcs as it turns out, that's a problem for whoever wants sphere frustum checks
// btw to renable define HAVE_SPHEREFRUSTRUM in hw_clip.h
#ifdef HAVE_SPHEREFRUSTRUM
//
// gld_FrustrumSetup
// gld_FrustumSetup
//
#define CALCMATRIX(a, b, c, d, e, f, g, h)\
@@ -111,7 +104,7 @@ frustum[i][1] /= t; \
frustum[i][2] /= t; \
frustum[i][3] /= t
void gld_FrustrumSetup(void)
void gld_FrustumSetup(void)
{
float t;
float clip[16];
+1 -1
View File
@@ -19,6 +19,6 @@ void gld_clipper_SafeAddClipRange(angle_t startangle, angle_t endangle);
void gld_clipper_Clear(void);
angle_t gld_FrustumAngle(angle_t tiltangle);
#ifdef HAVE_SPHEREFRUSTRUM
void gld_FrustrumSetup(void);
void gld_FrustumSetup(void);
boolean gld_SphereInFrustum(float x, float y, float z, float radius);
#endif
+1 -1
View File
@@ -5545,7 +5545,7 @@ void HWR_ClearClipper(void)
gld_clipper_Clear();
gld_clipper_SafeAddClipRange(viewangle + a1, viewangle - a1);
#ifdef HAVE_SPHEREFRUSTRUM
gld_FrustrumSetup();
gld_FrustumSetup();
#endif
}
+10
View File
@@ -3353,6 +3353,16 @@ EXPORT void HWRAPI(SetScreenPalette)(RGBA_t *palette)
}
}
/*
* hw_clip
* SRB2CB
*
* PrBoom's OpenGL clipping
*
*
*/
typedef struct clipnode_s
{
struct clipnode_s *prev, *next;
+3 -1
View File
@@ -4338,7 +4338,9 @@ void M_Init(void)
OP_ExpOptionsMenu[op_exp_fofcut].status = IT_DISABLED;
}
if (rendermode == render_opengl){
if (rendermode == render_opengl)
{
OP_ExpOptionsMenu[op_exp_angleshit].status = IT_DISABLED;
OP_ExpOptionsMenu[op_exp_ffclip].status = IT_DISABLED;
OP_ExpOptionsMenu[op_exp_sprclip].status = IT_DISABLED;
}