Commit 839c1924 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: move all the cvars in polymost.cpp so that they're at least in the same spot

parent c1a128d7
......@@ -1055,6 +1055,7 @@ EXTERN uint16_t h_xsize[MAXTILES], h_ysize[MAXTILES];
EXTERN int8_t h_xoffs[MAXTILES], h_yoffs[MAXTILES];
EXTERN char *globalpalwritten;
EXTERN int16_t globalpicnum;
enum {
GLOBAL_NO_GL_TILESHADES = 1<<0,
......@@ -1562,7 +1563,6 @@ extern int32_t benchmarkScreenshot;
extern int32_t glanisotropy;
extern int32_t glusetexcompr;
extern int32_t gltexfiltermode;
extern int32_t r_useindexedcolortextures;
enum {
TEXFILTER_OFF = 0, // GL_NEAREST
......@@ -1575,21 +1575,6 @@ extern int32_t gltexmaxsize;
void gltexapplyprops (void);
void texcache_invalidate(void);
# ifdef USE_GLEXT
extern int32_t r_detailmapping;
extern int32_t r_glowmapping;
# endif
extern int32_t r_vertexarrays;
# ifdef USE_GLEXT
extern int32_t r_vbocount;
# endif
extern int32_t r_animsmoothing;
extern int32_t r_parallaxskyclamping;
extern int32_t r_parallaxskypanning;
extern int32_t r_fullbrights;
extern int32_t r_downsize;
extern int32_t r_downsizevar;
extern int32_t mdtims, omdtims;
extern int32_t glrendmode;
#endif
......
......@@ -7,10 +7,6 @@
#include "glad/glad.h"
#include "hightile.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int32_t rendmode;
extern float gtang;
extern int polymost2d;
......@@ -88,14 +84,38 @@ extern float shadescale;
extern int32_t shadescale_unbounded;
extern uint8_t alphahackarray[MAXTILES];
extern int32_t r_usenewshading;
extern int32_t r_usetileshades;
extern int32_t r_npotwallmode;
extern int32_t polymostcenterhoriz;
#ifdef POLYMOST2
extern int32_t r_enablepolymost2;
#endif // POLYMOST2
extern int16_t globalpicnum;
#ifdef USE_GLEXT
extern int32_t r_vbocount;
extern int32_t r_glowmapping;
extern int32_t r_detailmapping;
#endif
extern int32_t r_animsmoothing;
extern int32_t r_downsize;
extern int32_t r_downsizevar;
extern int32_t r_drawpolyVertsBufferLength;
extern int32_t r_flatsky;
extern int32_t r_fullbrights;
extern int32_t r_npotwallmode;
extern int32_t r_parallaxskyclamping;
extern int32_t r_parallaxskypanning;
extern int32_t r_polygonmode;
extern int32_t r_polymostDebug;
extern int32_t r_shadeinterpolate;
extern int32_t r_skyzbufferhack;
extern int32_t r_useindexedcolortextures;
extern int32_t r_usenewshading;
extern int32_t r_usesamplerobjects;
extern int32_t r_usetileshades;
extern int32_t r_vertexarrays;
extern int32_t r_yshearing;
extern int32_t r_persistentStreamBuffer;
extern int32_t polymostcenterhoriz;
// Compare with polymer_eligible_for_artmap()
static FORCE_INLINE int32_t eligible_for_tileshades(int32_t const picnum, int32_t const pal)
......@@ -317,9 +337,6 @@ static FORCE_INLINE bool polymost_testintersection(vec3_t const &pos, vec2_t con
extern void polymost_setupglowtexture(int32_t texunits, int32_t tex);
extern void polymost_setupdetailtexture(int32_t texunits, int32_t tex);
#ifdef __cplusplus
}
#endif
#endif
#endif
......@@ -1408,7 +1408,6 @@ static int32_t viewingrangerecip;
static int8_t globalxshift, globalyshift;
static int32_t globalxpanning, globalypanning;
int32_t globalshade, globalorientation;
int16_t globalpicnum;
static int16_t globalshiftval;
#ifdef HIGH_PRECISION_SPRITE
static int64_t globalzd;
......
......@@ -19,6 +19,37 @@ Ken Silverman's official web site: http://www.advsys.net/ken
#include "texcache.h"
#include "hash.h"
#ifdef POLYMOST2
int32_t r_enablepolymost2 = 0;
#endif // POLYMOST2
#ifdef USE_GLEXT
int32_t r_vbocount = 64;
int32_t r_glowmapping = 1;
int32_t r_detailmapping = 1;
#endif
int32_t r_animsmoothing = 1;
int32_t r_downsize;
int32_t r_downsizevar = -1;
int32_t r_drawpolyVertsBufferLength = 30000;
int32_t r_flatsky = 1;
int32_t r_fullbrights = 1; // This variable, and 'shadeforfullbrightpass' control the drawing of fullbright tiles. Also see 'fullbrightloadingpass'.
int32_t r_npotwallmode = 2;
int32_t r_parallaxskyclamping = 1;
int32_t r_parallaxskypanning = 1;
int32_t r_polygonmode; // 0:GL_FILL,1:GL_LINE,2:GL_POINT //FUK
int32_t r_polymostDebug;
int32_t r_shadeinterpolate = 1;
int32_t r_skyzbufferhack;
int32_t r_useindexedcolortextures = 1;
int32_t r_usenewshading = 4;
int32_t r_usesamplerobjects = 1;
int32_t r_usetileshades = 1;
int32_t r_vertexarrays = 1;
int32_t r_yshearing;
int32_t r_persistentStreamBuffer = 1;
extern char textfont[2048], smalltextfont[2048];
int32_t rendmode=0;
......@@ -52,13 +83,6 @@ static float dxb1[MAXWALLSB], dxb2[MAXWALLSB];
float shadescale = 1.0f;
int32_t shadescale_unbounded = 0;
int32_t r_polymostDebug = 0;
#ifdef POLYMOST2
int32_t r_enablepolymost2 = 0;
#endif // POLYMOST2
int32_t r_usenewshading = 4;
int32_t r_usetileshades = 1;
int32_t r_npotwallmode = 2;
int32_t polymostcenterhoriz = 100;
static float gviewxrange;
......@@ -84,9 +108,7 @@ static int32_t drawpoly_srepeat = 0, drawpoly_trepeat = 0;
#define BUFFER_OFFSET(bytes) (GLintptr) ((GLubyte*) NULL + (bytes))
// these cvars are never used directly in rendering -- only when glinit() is called/renderer reset
// We do this because we don't want to accidentally overshoot our existing buffer's bounds
uint32_t r_persistentStreamBuffer = 1;
uint32_t persistentStreamBuffer = r_persistentStreamBuffer;
int32_t r_drawpolyVertsBufferLength = 30000;
int32_t persistentStreamBuffer = r_persistentStreamBuffer;
int32_t drawpolyVertsBufferLength = r_drawpolyVertsBufferLength;
static GLuint drawpolyVertsID = 0;
static GLint drawpolyVertsOffset = 0;
......@@ -111,13 +133,8 @@ int32_t glusetexcache = 0, glusememcache = 0;
#else
int32_t glusetexcompr = 1;
int32_t glusetexcache = 2, glusememcache = 1;
int32_t r_polygonmode = 0; // 0:GL_FILL,1:GL_LINE,2:GL_POINT //FUK
static int32_t lastglpolygonmode = 0; //FUK
#endif
#ifdef USE_GLEXT
int32_t r_detailmapping = 1;
int32_t r_glowmapping = 1;
#endif
int polymost2d;
......@@ -126,24 +143,7 @@ int32_t gltexmiplevel = 0; // discards this many mipmap levels
int32_t glprojectionhacks = 2;
static GLuint polymosttext = 0;
int32_t glrendmode = REND_POLYMOST;
int32_t r_shadeinterpolate = 1;
// This variable, and 'shadeforfullbrightpass' control the drawing of
// fullbright tiles. Also see 'fullbrightloadingpass'.
int32_t r_fullbrights = 1;
int32_t r_vertexarrays = 1;
#ifdef USE_GLEXT
//POGOTODO: we no longer support rendering without VBOs -- update any outdated pre-GL2 code that renders without VBOs
int32_t r_vbocount = 64;
#endif
int32_t r_animsmoothing = 1;
int32_t r_downsize = 0;
int32_t r_downsizevar = -1;
int32_t r_yshearing = 0;
int32_t r_flatsky = 1;
int32_t r_skyzbufferhack = 0;
// used for fogcalc
static float fogresult, fogresult2;
......@@ -165,8 +165,6 @@ static GLint fogColorLoc = -1;
#endif // POLYMOST2
#define PALSWAP_TEXTURE_SIZE 2048
int32_t r_useindexedcolortextures = 1;
int32_t r_usesamplerobjects = 1;
static GLuint tilesheetTexIDs[MAXTILESHEETS];
static GLint tilesheetSize = 0;
static vec2f_t tilesheetHalfTexelSize = { 0.f, 0.f };
......@@ -238,10 +236,6 @@ static inline float float_trans(uint32_t maskprops, uint8_t blend)
char ptempbuf[MAXWALLSB<<1];
// polymost ART sky control
int32_t r_parallaxskyclamping = 1;
int32_t r_parallaxskypanning = 1;
#define MIN_CACHETIME_PRINT 10
// this was faster in MSVC but slower with GCC... currently unknown on ARM where both
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment