Files
SRB2Kart-Saturn/src/hardware/hw_clip.h
T
Alug c26d2faee9 OpenGL: fixup spherefrustum culling and use it for sprites
clips sprites that are out of our view, especially with precip this may lead to significant speedup in certain cases
huge thanks to indev for helping with this <3
huge thanks to dsda-doom for the maths needed!
2025-11-27 22:53:12 +01:00

33 lines
693 B
C

/*
* hw_clip.h
* SRB2CB
*
* PrBoom's OpenGL clipping
*
*
*/
#ifdef __cplusplus
extern "C" {
#endif
// OpenGL BSP clipping
#include "../doomdef.h"
#include "../tables.h"
#include "../doomtype.h"
#define HAVE_SPHEREFRUSTRUM // enable if you want gld_SphereInFrustum and related code
boolean gld_clipper_SafeCheckRange(angle_t startAngle, angle_t endAngle);
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_FrustumSetup(void);
boolean gld_SphereInFrustum(float x, float y, float z, float radius);
#endif
#ifdef __cplusplus
} // extern "C"
#endif