mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Allow disabling of the HOM correction hack
git-svn-id: https://svn.eduke32.com/eduke32@204 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8b8cb97b77
commit
450047627a
4 changed files with 9 additions and 4 deletions
|
@ -472,7 +472,8 @@ extern long glusetexcompr;
|
||||||
extern long gltexfiltermode;
|
extern long gltexfiltermode;
|
||||||
extern long glredbluemode;
|
extern long glredbluemode;
|
||||||
extern long glusetexcache, glusetexcachecompression;
|
extern long glusetexcache, glusetexcachecompression;
|
||||||
extern long glmultisample, glnvmultisamplehint, glwidescreen, glhudcorrect;
|
extern long glmultisample, glnvmultisamplehint;
|
||||||
|
extern long glwidescreen, glhudcorrect, glprojectionhacks;
|
||||||
void gltexapplyprops (void);
|
void gltexapplyprops (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,7 @@ long gltexmiplevel = 0; // discards this many mipmap levels
|
||||||
static long lastglpolygonmode = 0; //FUK
|
static long lastglpolygonmode = 0; //FUK
|
||||||
long glpolygonmode = 0; // 0:GL_FILL,1:GL_LINE,2:GL_POINT //FUK
|
long glpolygonmode = 0; // 0:GL_FILL,1:GL_LINE,2:GL_POINT //FUK
|
||||||
long glwidescreen = 0;
|
long glwidescreen = 0;
|
||||||
|
long glprojectionhacks = 1;
|
||||||
long glhudcorrect = 0;
|
long glhudcorrect = 0;
|
||||||
static GLuint polymosttext = 0;
|
static GLuint polymosttext = 0;
|
||||||
extern char nofog;
|
extern char nofog;
|
||||||
|
@ -592,15 +593,15 @@ void resizeglcheck ()
|
||||||
glox1 = windowx1; gloy1 = windowy1;
|
glox1 = windowx1; gloy1 = windowy1;
|
||||||
glox2 = windowx2; gloy2 = windowy2;
|
glox2 = windowx2; gloy2 = windowy2;
|
||||||
|
|
||||||
fovcorrect = glwidescreen?0:(((windowx2-windowx1+1) * 1.2) - (windowx2-windowx1+1));
|
fovcorrect = glprojectionhacks?(glwidescreen?0:(((windowx2-windowx1+1) * 1.2) - (windowx2-windowx1+1))):0;
|
||||||
|
|
||||||
bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1);
|
bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1);
|
||||||
|
|
||||||
bglMatrixMode(GL_PROJECTION);
|
bglMatrixMode(GL_PROJECTION);
|
||||||
memset(m,0,sizeof(m));
|
memset(m,0,sizeof(m));
|
||||||
m[0][0] = (float)ydimen / 1.2; m[0][2] = 1.0;
|
m[0][0] = (float)ydimen / (glprojectionhacks?1.2:1); m[0][2] = 1.0;
|
||||||
m[1][1] = (float)xdimen; m[1][2] = 1.0;
|
m[1][1] = (float)xdimen; m[1][2] = 1.0;
|
||||||
m[2][2] = 1.0; m[2][3] = (float)ydimen / 1.2;
|
m[2][2] = 1.0; m[2][3] = (float)ydimen / (glprojectionhacks?1.2:1);
|
||||||
m[3][2] =-1.0;
|
m[3][2] =-1.0;
|
||||||
bglLoadMatrixf(&m[0][0]);
|
bglLoadMatrixf(&m[0][0]);
|
||||||
//bglLoadIdentity();
|
//bglLoadIdentity();
|
||||||
|
|
|
@ -617,6 +617,7 @@ int32 CONFIG_ReadSetup( void )
|
||||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
|
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
|
||||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
||||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLHUDCorrect", &glhudcorrect);
|
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLHUDCorrect", &glhudcorrect);
|
||||||
|
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLProjectionFix", &glprojectionhacks);
|
||||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCompr", &glusetexcompr);
|
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCompr", &glusetexcompr);
|
||||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLWidescreen", &glwidescreen);
|
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLWidescreen", &glwidescreen);
|
||||||
|
|
||||||
|
@ -762,6 +763,7 @@ void CONFIG_WriteSetup( void )
|
||||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,false,false);
|
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,false,false);
|
||||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLHUDCorrect",glhudcorrect,false,false);
|
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLHUDCorrect",glhudcorrect,false,false);
|
||||||
|
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLProjectionFix",glprojectionhacks,false,false);
|
||||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,false,false);
|
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,false,false);
|
||||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,false,false);
|
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,false,false);
|
||||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", glusetexcachecompression,false,false);
|
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", glusetexcachecompression,false,false);
|
||||||
|
|
|
@ -469,6 +469,7 @@ struct cvarmappings {
|
||||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 0, 1 },
|
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, CVAR_BOOL, 0, 0, 1 },
|
||||||
{ "r_hudcorrect", "r_hudcorrect: enable/disable correct HUD weapon rendering", (void*)&glhudcorrect, CVAR_BOOL, 0, 0, 1 },
|
{ "r_hudcorrect", "r_hudcorrect: enable/disable correct HUD weapon rendering", (void*)&glhudcorrect, CVAR_BOOL, 0, 0, 1 },
|
||||||
|
{ "r_projectionhack", "r_projectionhack: enable/disable projection hack", (void*)&glprojectionhacks, CVAR_BOOL, 0, 0, 1 },
|
||||||
#endif
|
#endif
|
||||||
{ "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&useprecache, CVAR_BOOL, 0, 0, 1 }
|
{ "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&useprecache, CVAR_BOOL, 0, 0, 1 }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue